On 2/19/07, kbochert <[EMAIL PROTECTED]> wrote: > > > > On Feb 19, 1:11 pm, "Chris Brand" <[EMAIL PROTECTED]> wrote: > > > I then erase my apps database and run 'manage.py syncdb' > > > > Are you aware that you don't have to erase the database before running > > syncdb ? If you don't erase the db, you won't need to recreate the > > superuser... > > > > If I add or remove a field from my model, and then run syncdb (or > not), The admin screen reflects the changed fields. > Attemping to add a record will draw an error message like "Failure, > field xxx cannot be null", where xxx is a field I removed from the > model. (I don't remember the exact wording). > If I have added a field, I get an admin screen that shows the new > field, and an error message when I add a record, saying that the field > doesn't exist.
syncdb works at table-level, so you will have to drop the entire table for it to get picked up by syncdb... or you can do it manually (adding a field = models.CharField(maxlength=100) ): alter table app_model ad column field varchar(100); update app_model set field = ''; alter table app_model alter column field set not null; > > ??? > Karl > > > > > -- Honza Kr�l E-Mail: [EMAIL PROTECTED] ICQ#: 107471613 Phone: +420 606 678585 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---