class RenderQueue(models.Model): user = models.ForeignKey(User) http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships
Hope that helps you along in the right direction! -Doug On Mar 29, 8:42 pm, "Ben Stahl" <[EMAIL PROTECTED]> wrote: > Hi, I think I understand modeling, and user/session authentication. > But, what I don't understand is how to use these together to tie some > object instances (stored in the database) to a specific user. For > example, I want each authenticated user of the application to have a > single instance of my model class RenderQueue. Each user has one and > only one of these, and it's specific to that user. If another user > logs in, they get either their own blank RenderQueue (if they've never > created one), or they get the one they had filled out when they were > last logged in. If I receive the form fields back in my view, and call > save() on that, it may save it to the db, but how do I tell it for > which user? Do I add a 'user = User()' instance variable to my > RenderQueue model class and set that to the current user before > saving? Do I need to subclass/extend/rewrite the Django built-in User > model? It looked like the 'Chapter 13: Comments' of the Django Book > was going to address this, but that chapter has not been written yet. > TIA --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---