mdn/django-locallibrary-tutorial

Language Options

bridgetsarah opened this issue · 3 comments

I've got up to chapter 11 now but I really want to try and add some books to the database in admin. Is it possible for MDN to share the code for the language options as without this I cannot add any book because its required field. I have making choices but did not work.

any help much appreciated, by the way. Real good tutorial!

4ka0 commented

I have the same issue as above. Some guidance regarding this would be a big help. Many thanks.

4ka0 commented

The problem is solved if you register the Language class in admin.py.

from catalog.models import Author, Genre, Book, BookInstance, Language

admin.site.register(Genre)
admin.site.register(Book)
admin.site.register(BookInstance)
admin.site.register(Author)
admin.site.register(Language)

Since writing that last week I've started building Django on both ends, silly as its something so silly once you learn the grasp of it :)