On 6/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > i like to use the authentication modules in the contrib modul of django > (using 0.95). > But i have to build a foreign key with the user id to my tables in my > application. > > I have to know which record in my local tables is depending to which > auth group. > > Until now i did not find a solution to build a foreign key between > table myapp_<tablename> to auth_user_groups. > > Do you have a starting point for me or a is there somewhere a snippet.
Is this what you're looking for? from django.contrib.auth.models import User class YourTable(models.Model): .... user = models.ForeignKey(User) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---