Im tryng to use the Django user/group tables in my aplication. So, In a project, a manager have to be a django user.
But I tried in many ways and keep getting errors, like NameError: name 'User' is not defined After much time, if finally achieve it to work: ----------------------------------------------------------------------- from django.core import meta from django.models import auth class Project(meta.Model): project = meta.CharField(maxlength=200) description = meta.TextField() url = meta.CharField(maxlength=255) creation_date = meta.DateField() manager = meta.ForeignKey(auth.User) class META: admin = meta.Admin() class Version(meta.Model): project = meta.ForeignKey(Project) version = meta.CharField(maxlength=200) description = meta.TextField() planned_date = meta.DateField() release_date = meta.DateField() class META: admin = meta.Admin() ----------------------------------------------------------------------- Looks the secret is : from django.models import auth # the correct way to call the class manager = meta.ForeignKey(auth.User) #the correct way to call the auth derived table ------------------------------------------------------------------------------------------- Alexandre Miguel de Andrade Souza Visite meu blog http://alexandremas.blogspot.com/ Sobre php, linux e afins