Commit c4f6862f authored by Olga Brani's avatar Olga Brani
Browse files

No groups found issue resolved

parent abcbffd9
......@@ -146,19 +146,20 @@ def get_services(request):
@api_method()
def get_menu(request, with_extra_links=False, with_signout=True):
index_url = reverse('index')
user = request.user
if not isinstance(user, AstakosUser):
cookie = unquote(request.COOKIES.get(COOKIE_NAME, ''))
email = cookie.partition('|')[0]
try:
if email:
user = AstakosUser.objects.get(email=email, is_active=True)
except AstakosUser.DoesNotExist:
pass
absolute = lambda (url): request.build_absolute_uri(url)
l = [{ 'url': absolute(index_url), 'name': "Sign in"}]
cookie = unquote(request.COOKIES.get(COOKIE_NAME, ''))
email = cookie.partition('|')[0]
try:
if not email:
raise ValueError
user = AstakosUser.objects.get(email=email, is_active=True)
except AstakosUser.DoesNotExist:
pass
except ValueError:
pass
if not isinstance(user, AstakosUser):
index_url = reverse('index')
l = [{ 'url': absolute(index_url), 'name': "Sign in"}]
else:
l = []
l.append(dict(url=absolute(reverse('index')), name=user.email))
......
[
{
"model": "auth.group",
"pk": 1,
"fields": {
"name": "default"
}
},
{
"model": "auth.group",
"pk": 2,
"fields": {
"name": "academic"
}
},
{
"model": "auth.group",
"pk": 3,
"fields": {
"name": "shibboleth"
}
},
{
"model": "auth.group",
"pk": 4,
"fields": {
"name": "helpdesk"
}
},
{
"model": "auth.group",
"pk": 4,
"fields": {
"name": "faculty"
},
"permissions": ""
},
{
"model": "auth.group",
"pk": 4,
"fields": {
"name": "ugrad"
}
},
{
"model": "auth.group",
"pk": 4,
"fields": {
"name": "grad"
}
},
{
"model": "auth.group",
"pk": 4,
"fields": {
"name": "researcher"
}
},
{
"model": "auth.group",
"pk": 4,
"fields": {
"name": "associate"
}
},
{
"model": "im.GroupKind",
"pk": 1,
"fields": {
"name": "course"
}
},
{
"model": "im.GroupKind",
"pk": 2,
"fields": {
"name": "project"
}
},
{
"model": "im.GroupKind",
"pk": 3,
"fields": {
"name": "laboratory"
}
},
{
"model": "im.GroupKind",
"pk": 4,
"fields": {
"name": "organization"
}
}
]
......@@ -41,9 +41,8 @@ from uuid import uuid4
from django.core.management.base import BaseCommand, CommandError
from django.core.validators import validate_email
from django.core.exceptions import ValidationError
from django.contrib.auth.models import Group
from astakos.im.models import AstakosUser
from astakos.im.models import AstakosUser, AstakosGroup
from astakos.im.util import reserved_email
from ._common import add_user_permission
......@@ -121,10 +120,10 @@ class Command(BaseCommand):
groupname = options.get('add-group')
if groupname is not None:
try:
group = Group.objects.get(name=groupname)
user.groups.add(group)
group = AstakosGroup.objects.get(name=groupname)
user.astakos_groups.add(group)
self.stdout.write('Group: %s added successfully\n' % groupname)
except Group.DoesNotExist, e:
except AstakosGroup.DoesNotExist, e:
self.stdout.write('Group named %s does not exist\n' % groupname)
pname = options.get('add-permission')
......
......@@ -71,7 +71,7 @@ class Command(BaseCommand):
elif options['pending_send_mail']:
users = users.filter(is_active=False, activation_sent=None)
labels = ('id', 'email', 'real name', 'active', 'admin', 'provider', 'groups')
labels = ('id', 'email', 'real name', 'active', 'admin', 'provider')
columns = (3, 24, 24, 6, 5, 12, 24)
if not options['csv']:
......@@ -84,8 +84,7 @@ class Command(BaseCommand):
id = str(user.id)
active = format_bool(user.is_active)
admin = format_bool(user.is_superuser)
fields = (id, user.email, user.realname, active, admin, user.provider,
','.join([g.name for g in user.groups.all()]))
fields = (id, user.email, user.realname, active, admin, user.provider)
if options['csv']:
line = '|'.join(fields)
......
......@@ -74,13 +74,14 @@ class Command(BaseCommand):
'provider': user.provider,
'verified': format_bool(user.is_verified),
'has_credits': format_bool(user.has_credits),
'groups': [elem.name for elem in user.groups.all()],
'groups': [elem.name for elem in user.astakos_groups.all()],
'permissions': [elem.codename for elem in user.user_permissions.all()],
'group_permissions': user.get_group_permissions(),
'third_party_identifier': user.third_party_identifier,
'email_verified': format_bool(user.email_verified),
'username': user.username,
'activation_sent_date': format_date(user.activation_sent)
'activation_sent_date': format_date(user.activation_sent),
'resources' : user.quota
}
if get_latest_terms():
has_signed_terms = user.signed_terms()
......
......@@ -32,13 +32,15 @@
# or implied, of GRNET S.A.
from optparse import make_option
from datetime import datetime
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import Group, Permission
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.db.utils import IntegrityError
from astakos.im.models import AstakosUser
from astakos.im.models import AstakosUser, AstakosGroup, Membership
from ._common import remove_user_permission, add_user_permission
class Command(BaseCommand):
......@@ -135,18 +137,24 @@ class Command(BaseCommand):
groupname = options.get('add-group')
if groupname is not None:
try:
group = Group.objects.get(name=groupname)
user.groups.add(group)
except Group.DoesNotExist, e:
group = AstakosGroup.objects.get(name=groupname)
m = Membership(person=user, group=group, date_joined=datetime.now())
m.save()
except AstakosGroup.DoesNotExist, e:
self.stdout.write("Group named %s does not exist\n" % groupname)
except IntegrityError, e:
self.stdout.write("User is already member of %s\n" % groupname)
groupname = options.get('delete-group')
if groupname is not None:
try:
group = Group.objects.get(name=groupname)
user.groups.remove(group)
except Group.DoesNotExist, e:
group = AstakosGroup.objects.get(name=groupname)
m = Membership.objects.get(person=user, group=group)
m.delete()
except AstakosGroup.DoesNotExist, e:
self.stdout.write("Group named %s does not exist\n" % groupname)
except Membership.DoesNotExist, e:
self.stdout.write("User is not a member of %s\n" % groupname)
pname = options.get('add-permission')
if pname is not None:
......
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from django.db.models import Count
class Migration(DataMigration):
def forwards(self, orm):
def _create_groupkind(name):
try:
orm.GroupKind(name=name).save()
except:
pass
t = ('default', 'course', 'project', 'laboratory', 'organization')
map(_create_groupkind, t)
default = orm.GroupKind.objects.get(name='default')
groups = {}
def _create_astakogroup(name):
try:
groups[name] = orm.AstakosGroup.objects.get(name=name)
except orm.AstakosGroup.DoesNotExist:
try:
g = orm['auth.Group'].objects.get(name=name)
groups[name] = extended = orm.AstakosGroup(group_ptr_id=g.pk)
extended.__dict__.update(g.__dict__)
extended.kind = default
extended.approval_date = datetime.datetime.now()
extended.issue_date = datetime.datetime.now()
extended.moderation_enabled = False
extended.save()
map(lambda u:orm.Membership( group=extended,
person=orm.AstakosUser.objects.get(id=u.id),
date_joined=datetime.datetime.now()
).save(),
g.user_set.all())
except orm['auth.Group'].DoesNotExist:
groups[name] = orm.AstakosGroup( name=name,
kind=default,
approval_date=datetime.datetime.now(),
issue_date=datetime.datetime.now(),
moderation_enabled=False
)
groups[name].save()
# catch integrate
t = ('default', 'shibboleth', 'helpdesk', 'faculty', 'ugrad', 'grad', 'researcher', 'associate')
map(_create_astakogroup, t)
orphans = orm.AstakosUser.objects.annotate(num_groups=Count('astakos_groups')).filter(num_groups = 0)
map ( lambda u: orm.Membership(group=groups['default'], person=u, date_joined=datetime.datetime.now()).save(), orphans )
def backwards(self, orm):
def _delete_groupkind(name):
try:
orm.GroupKind.objects.get(name=name).delete()
except orm.GroupKind.DoesNotExist:
pass
def _delete_astakosgroup(name):
try:
orm.AstakosGroup.objects.get(name=name).delete()
except orm.AstakosGroup.DoesNotExist:
pass
t = ('default', 'shibboleth', 'helpdesk', 'faculty', 'ugrad', 'grad', 'researcher', 'associate')
map(_delete_astakosgroup, t)
t = ('default', 'course', 'project', 'laboratory', 'organization')
map(_delete_groupkind, t)
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'im.additionalmail': {
'Meta': {'object_name': 'AdditionalMail'},
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
},
'im.approvalterms': {
'Meta': {'object_name': 'ApprovalTerms'},
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 8, 12, 40, 8, 181485)', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'im.astakosgroup': {
'Meta': {'object_name': 'AstakosGroup', '_ormbases': ['auth.Group']},
'approval_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 8, 12, 40, 8, 175548)'}),
'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'estimated_participants': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}),
'issue_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'kind': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.GroupKind']"}),
'moderation_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'policy': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosGroupQuota']", 'blank': 'True'})
},
'im.astakosgroupquota': {
'Meta': {'unique_together': "(('resource', 'group'),)", 'object_name': 'AstakosGroupQuota'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosGroup']", 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {}),
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"})
},
'im.astakosuser': {
'Meta': {'unique_together': "(('provider', 'third_party_identifier'),)", 'object_name': 'AstakosUser', '_ormbases': ['auth.User']},
'activation_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'astakos_groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.AstakosGroup']", 'symmetrical': 'False', 'through': "orm['im.Membership']", 'blank': 'True'}),
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'date_signed_terms': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'email_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'has_credits': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'has_signed_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'invitations': ('django.db.models.fields.IntegerField', [], {'default': '100'}),
'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'owner': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'owner'", 'null': 'True', 'to': "orm['im.AstakosGroup']"}),
'policy': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosUserQuota']", 'symmetrical': 'False'}),
'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {}),
'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'})
},
'im.astakosuserquota': {
'Meta': {'unique_together': "(('resource', 'user'),)", 'object_name': 'AstakosUserQuota'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {}),
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
},
'im.emailchange': {
'Meta': {'object_name': 'EmailChange'},
'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 8, 12, 40, 8, 183025)'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchange_user'", 'unique': 'True', 'to': "orm['im.AstakosUser']"})
},
'im.groupkind': {
'Meta': {'object_name': 'GroupKind'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
},
'im.invitation': {
'Meta': {'object_name': 'Invitation'},
'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}),
'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
},
'im.membership': {
'Meta': {'unique_together': "(('person', 'group'),)", 'object_name': 'Membership'},
'date_joined': ('django.db.models.fields.DateField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'date_requested': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2012, 8, 8, 12, 40, 8, 179349)', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosGroup']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
},
'im.resource': {
'Meta': {'object_name': 'Resource'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'meta': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.ResourceMetadata']", 'symmetrical': 'False'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
'service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Service']"})
},
'im.resourcemetadata': {
'Meta': {'object_name': 'ResourceMetadata'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'im.service': {
'Meta': {'object_name': 'Service'},
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'icon': ('django.db.models.fields.FilePathField', [], {'max_length': '100', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
'url': ('django.db.models.fields.FilePathField', [], {'max_length': '100'})
}
}
complete_apps = ['im']
# encoding: utf-8
import datetime
import sys
from south.db import db
from south.v2 import DataMigration
from django.db import models
from django.db.utils import IntegrityError
from collections import defaultdict
from django.db.models import Q
d = {
'cyclades' : { 'vm' : 2 },
'pithos+': {'diskspace' : 10 }
}
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
try:
default = orm.AstakosGroup.objects.get(name='default')
except orm.AstakosGroup.DoesNotExist:
return
def create_policies(sn, policy):
s, created = orm.Service.objects.get_or_create(name = sn)
if created:
s.save()
for rn, l in policy.iteritems():
r, created = orm.Resource.objects.get_or_create (
service = s,
name = rn
)
if created:
r.save()
q, created = orm.AstakosGroupQuota.objects.get_or_create(
group = default,
resource = r,
limit = l
)
if created:
q.save()
map(lambda i: create_policies(i[0], i[1]), d.iteritems())
def backwards(self, orm):
try:
default = orm.AstakosGroup.objects.get(name='default')
except orm.AstakosGroup.DoesNotExist:
return
def destroy_policies(sn, policy):
for rn, l in policy.iteritems():
try:
q = orm.AstakosGroupQuota.objects.get(group=default, resource__name=rn)
if q.limit == l:
q.delete()
except orm.AstakosGroupQuota.DoesNotExist:
return
map(lambda i: destroy_policies(i[0], i[1]), d.iteritems())
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),