Ayaz Ahmed Khan wrote: > bhunter wrote: >> This should be a simple question. I'd like an Employee model. First >> name, last name, username, password--basically all the same stuff >> that's already in django.contrib.auth.models.User. Maybe I want some >> other things like salary, too. So, it makes sense that I should just >> inherit from this class. >> [...] > > You don't need to derive a class from the User model. This is a > common use-case. You should be looking at Django Profiles: > http://www.djangoproject.com/documentation/authentication/#storing-additional-information-about-users
Really? I was sort of hoping with model inheritance and newforms-admin I would finally be able to get rid of user profile. It was a useful hack but now that there is a general solution the special case should be disfavored, no? Maybe I'm using it wrong. I dislike having to user.get_profile.myvar select_related doesn't seem to apply to user profiles and in a template loop of say blogs the "caching" fails. {% for blog in blogs %} blog.author.get_profile.something {% endfor %} If there are 10 blogs by the same author then there are 10 hits on user_profile to read it each time. -- Norman J. Harman Jr. Senior Web Specialist, Austin American-Statesman ___________________________________________________________________________ You've got fun! Check out Austin360.com for all the entertainment info you need to live it up in the big city! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---