HW: Auto populate author field with admins
So in the course of working on the homework I ended up changing the models around a bit. I added another class called Author and made the author field of Post refer to one of them through the Foreign key. Once I got the django/south settled with the new structure. I went to the admin site to create a couple posts. (all my posts were deleted in the process).
I go to create the post but I can't select an author. just "-----" which it doesn't allow. In the video the author was automatically populated with the available admins' names. I realized it had to do with the foreign key to the 'user' model imported from django.contrib.auth.models. I think you mentioned this would phase out by 1.5? I would still like to have this functionality is there a new best practice to implement this feature? Or shall I continue to use the same structure from the 1.4?
Answers
The Django user model is still around and perfectly fine to use in 1.5.
In the admin, to the side of the select widget where you choose your author, is there a plus sign? If so, click it to add a new Author instance. If there's not, you probably need to register your Author model with the admin (done the same way we did it for Post).