Hi!

1st think, syncdb does not update your tables defi9nition so, if you change
something in the class, you'll have to "ALTER TALBE" it in order not to drop
the table. It's a pitty but you have to do it with regular SQL through your
mySql client.

About not required fields, you just have to specify "blank=True"

name = models.CharField(maxlength=50)
age    = models.PositiveIntegerField(blank=True)

in the admin view, you'll see that the age field willl not be bolded ;)

If anything else come up, let me know.

good luck!

Tkm


On 5/3/07, nerezus <[EMAIL PROTECTED]> wrote:
>
>
> I've just dropped all the tables and "syncdb" another one time. And
> it's working now!
>
> But what should I do if I want to add new field to model? Dropping
> tables is not a good idea... And without dropping "syncdb" does not
> work.
>
> P.S. How to add an unneccessary field which can be left empty in
> Django administration panel?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to