Tuesday, April 27, 2010

dJango : Braindump ~ tips/tricks

Note: These are braindumps !

While learning any topic I make notes, at first they are very basic and progressively they get advanced.

Don't expect super wisdom ("Gyan") out of these.
As I said just braindumps 8-)

If you have some tips you'd like to share, post in comments and I'll include them here for everybodys benefit.

dJango


Altering tables in dJango

Everything changes (eventually). Once you code is stable, there comes a point when you need to add a feature which requires change in DB. For dJango/MySQL this is the process you should follow. Link - http://www.djangobook.com/en/1.0/chapter05/


Sending emails

http://docs.djangoproject.com/en/1.1/topics/email/


Selecting only a few columns

Many times you don't need to select all the columns/fields, in that case use the defer keyword -

Entry.objects.defer("lede", "body")

Which will select everything but "lede" & "body".



No comments:

Post a Comment