pytz.all_timezones returns empty list

2014-02-02 Thread Pradeep Kumar
Tried installing package via pip then from source still the problem exists. Application throws UnknownTimeZoneError wherever my timezone operations on code exist. UnAnswered stack overflow question here http://stackoverflow.com/questions/19828607/pytz-all-timezones-returns-empty-list-when-execut

South doesn't recognize modification in ManytoMany fields

2013-08-14 Thread Pradeep Kumar
I have made a model change from standard = models.ManyToManyField(Standard) to standard = models.ManyToManyField(Standard, blank = True, null = True) South schemamigration for this app doesn't recognize the change ? http://stackoverflow.com/questions/18243039/south-migrating-foriegn-key-many-t

Re: problem with inserting data through sqlite manually.

2013-05-11 Thread Pradeep Kumar
Hi Anvesh, I didn't understand how you were trying to insert into the tables. Probably your sql code would have helped us hitting on the nail of the problem but anyways let me give you general answers: a) If id field is auto in the database one doesn't need to mention or enter it explicitly while

Re: handling IntegrityError: Duplicate entry in UserCreationForm

2013-04-25 Thread Pradeep Kumar
Hi Sachin, If you have added the unique=True later and migrated the existing table, I would also suggest you to first clean up the NULL and duplicate entries using a script or even from shell. After doing that you can use * try: * # your code here * except IntegrityError: * #create v

Accessing Django project models from CGI

2013-04-07 Thread Pradeep Kumar
Hi, I am creating a widget for one of our projects for the first time. The script file used calls a python file in cgi-bin/widget.py Is there a way I can access models of a particular project in widget.py using import ? say : from django.*projectname.appname.models* import * I tried relocating