I am trying to import Group from the auth models in to my model.
I like to get a select box in the admin area just like the one we get
when we are in the admin user panel  for my Company model.
Here is what I got but as soon as I add the line "groups =
models.ManyTo...." the Company module disappears from the admin site.

<code>
from django.db import models
from django.contrib.auth.models import User
from django.contrib.auth.models import Group

class Company(models.Model):
    name = models.CharField(maxlength=30, verbose_name=_('Company'))
    groups = models.ManyToManyField(Group, verbose_name=_('Groups'),
blank=True)
    added   = models.DateTimeField('Date', auto_now_add=True)
    owner = models.ForeignKey(User)
</code>


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to