Sunday, March 18, 2012

Django Tips

Here are Fafadia Tech we have been toying with Django for some time now, out of frustration of not finding good tips here are some that will help

1. Feature Branching: Until you're working with a bigger team you won't understand value of using Git and feature branching. Code reusability and easy merging are some of the advantages of using feature branching. Although its not directly associated with Django framework it helps while working with non-trivial applications. Do read this interesting article on doing same with Git.

2. Migrations: South is an interesting application which allows you to version changes to your schema. It generates migration files that you can add to your SCM.

3. Maximize use of Django Apps: Django Packages is a great website that has listing of all Django apps. So make sure before you set out to writing your own app see whats available. Django's abstraction on how it treats application makes it easy to swap in/out apps in your project.

4. Beware of Cyclic References: While using Django's ORM, make sure you think through your Model classes, if you're ending up in a situation of cyclic references, group set of classes into same application.

5. Use more of virtualenv, fab & pip: Pro Pythonistas already know tricks of trade for successful Python projects. When deploying/trying to re-create dev environment these tools will save you productive time.

We're playing around with Django Jenkins and Django Selenium to figure out how we can integrate them more in our projects. So expect more articles from us on those lines.

No comments:

Post a Comment