Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a good Django workflow?

Tags:

python

django

I'm a beginner to Python and Django.

When starting a new project what do you do first before diving into the code?

For example, one could take the following steps:

  1. Configure the settings.py file first
  2. Configure models.py to lay out data structure
  3. Create template files
  4. Define the views/pages
  5. Syncdb
  6. etc

So my question is, what is a good workflow to get through the required steps for a Django application? This also serves as a checklist of things to do. In the definitive guide to Django, the author talks about approaching top down or bottom up. Can anyone expand further on this and perhaps share their process?

Thanks.

like image 805
super9 Avatar asked Mar 11 '11 03:03

super9


People also ask

What is Django workflow?

django-flows - explicit, single user, sequential, static workflow, that keeps flow state in external storage, to allow user to close or open page on another tab and continue working. django-fsm - implicit, multi-user, sequential, static workflow - the most compact and lightweight state machine library.

Is Django good for production?

Django comes with it's own light-weight development Web server that you access via the runserver command from manage.py. This server is intended for development only and is not suitable for production use. It's not secure nor very performant.

Can I use HTML CSS with Django?

Django would be used to match urls with pages. Specifically you would need to create a view that renders a template (here comes the html) and some static files (css, js). If you wont use a database i would suggest that you use flask which does the thing is described above much more easily.

Can javascript and Django work together?

Talking about the future web apps, Django has a lot to offer and has the ability to accommodate any modern web apps structures. Stacking Django and Javascript web frameworks to build modern web apps is one of the best way to stack backend and frontend frameworks.


1 Answers

Follow the Agile approach. Finish one small case, from the start to the end. From the models to the tests to user experience. Then build on it. Iterate.

Thats the right way to software development.

To do it efficiently, you need: (don't bother right away, you will need it.)

Automated schema migration, automated build system, auto updating and deployment. - None of these, django has got anything to do with. Use pip, fabric, hudson, twill and south appropriately.

Take care not to over burden yourself with all these right away, particularly since you say, you are beginning.

like image 175
lprsd Avatar answered Oct 18 '22 05:10

lprsd