user206306
user206306

Reputation:

New field in Django model doesn't show up in admin interface or model forms

I've created a model in one of my apps which works fine. However, I needed to add a new field. I did this, and used manage.py reset <appname> to drop the tables and add them again. This process went fine - the new field appears in the database. However, I can't get the field to show up in the admin interface, nor in the custom model form I've created. Because I haven't given it a default value (and don't want to, nor should I need to) I can't use either method to add a row into the database. Any ideas?

Model snippet:

use_balance = models.BooleanField()

Upvotes: 5

Views: 5266

Answers (2)

Daniel Roseman
Daniel Roseman

Reputation: 599490

Have you restarted your server?

Upvotes: 7

lemonad
lemonad

Reputation: 4198

By any chance, did you forget to update your ModelAdmin definitions?

Upvotes: 1

Related Questions