everyone can have a license; groups admin
This commit is contained in:
parent
f4fab78812
commit
10a1239df7
5 changed files with 52 additions and 25 deletions
|
|
@ -59,7 +59,8 @@
|
|||
//{"id": "year", "title": "Years", "type": "integer"},
|
||||
{"id": "features", "title": "Features", "type": "string"},
|
||||
{"id": "director", "title": "Directors", "type": "string"},
|
||||
{"id": "cinematographer", "title": "Cinematographers", "type": "string"}
|
||||
{"id": "cinematographer", "title": "Cinematographers", "type": "string"},
|
||||
{"id": "license", "title": "License", "type": "string"}
|
||||
],
|
||||
/*
|
||||
An itemKey must have the following properties:
|
||||
|
|
@ -386,6 +387,14 @@
|
|||
"type": "integer",
|
||||
"columnWidth": 60
|
||||
},
|
||||
{
|
||||
"id": "license",
|
||||
"title": "License",
|
||||
"type": ["string"],
|
||||
"columnWidth": 120,
|
||||
"autocomplete": true,
|
||||
"filter": true
|
||||
},
|
||||
{
|
||||
"id": "rightslevel",
|
||||
"title": "Rights Level",
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ class SessionData(models.Model):
|
|||
|
||||
objects = managers.SessionDataManager()
|
||||
|
||||
groupssort = models.CharField(default=None,blank=True,null=True, max_length=255)
|
||||
|
||||
def __unicode__(self):
|
||||
return u"%s" % self.session_key
|
||||
|
||||
|
|
@ -92,8 +94,10 @@ class SessionData(models.Model):
|
|||
self.username = self.user.username
|
||||
self.level = self.user.get_profile().level
|
||||
self.firstseen = self.user.date_joined
|
||||
self.groupssort = ''.join([g.name for g in self.user.groups.all()])
|
||||
else:
|
||||
self.level = 0
|
||||
self.groupssort = None
|
||||
self.parse_data()
|
||||
super(SessionData, self).save(*args, **kwargs)
|
||||
|
||||
|
|
|
|||
|
|
@ -427,6 +427,7 @@ def order_query(qs, sort):
|
|||
'browser': 'browser',
|
||||
'email': 'user__email',
|
||||
'firstseen': 'firstseen',
|
||||
'groups': 'groupssort',
|
||||
'ip': 'ip',
|
||||
'lastseen': 'lastseen',
|
||||
'level': 'level',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue