Unknown field(s) (scientific_genus, genus, common_name, common_examples,
description, image_url) specified for Genus.
Check fields/fieldsets/exclude attributes of class GenusAdmi
Your help will be greatly appreciated
Hello,
I suspect you didn't make/run migrations:
python manage.py makemigrations
python manage.py migrate
The first command creat the so-called migration files that are required to update the database by adding new tables and fields, while the second one does the actual upgrade.
Also, allow me some comments.
You may want to omit genus_id from your model, as it gets created automatically anyway. One field less to manage while you write your code. Of course, it's up to you.
The second one is your choice field. By convention, Django people do it this way:
EXAMPLE_CHOICES = (
('short code to store in DB', 'long text to display'),
…
)
field = models.CharField(choices=EXAMPLE_CHOICES)
My main point here other than conventions is that "short code" won't get displayed for the user, so make your choice list based on this.
Third, eggplant is Solanum if I recall well :)
Best,
Gergely
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3b131d1a-78b9-4294-adad-1040a5ab7a12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Polonkai,