merge
This commit is contained in:
commit
b3ebc848fb
4 changed files with 466 additions and 329 deletions
|
|
@ -72,7 +72,7 @@
|
|||
{"id": "news", "title": "News"},
|
||||
{"id": "tour", "title": "Take a Tour"},
|
||||
{"id": "faq", "title": "Frequently Asked Questions"},
|
||||
{"id": "tos", "title": "Terms of Service"}
|
||||
{"id": "terms", "title": "Terms of Service"}
|
||||
],
|
||||
"sortKeys": [
|
||||
{"id": "title", "title": "Title", "width": 180, "removable": false, "type": "title"},
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
{"id": "pixels"}
|
||||
],
|
||||
"user": {
|
||||
"group": "guest",
|
||||
"level": "guest",
|
||||
"lists": {
|
||||
"history": [
|
||||
{"id": "all_movies", "title": "All Movies", "query": {}}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ if settings.DEBUG:
|
|||
urlpatterns += patterns('',
|
||||
(r'^.*?embed$', 'app.views.embed'),
|
||||
(r'^[A-Z0-9].*$', 'app.views.index'),
|
||||
(r'^[a-z0-9].+$', 'app.views.index'),
|
||||
(r'^$', 'app.views.index'),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,10 @@ def get_user_json(user):
|
|||
result = {}
|
||||
for key in ('username', ):
|
||||
result[key] = getattr(user, key)
|
||||
result['admin'] = user.is_staff
|
||||
if user.is_staff:
|
||||
result['level'] = 'admin'
|
||||
else:
|
||||
result['level'] = 'user'
|
||||
result['groups'] = [g.name for g in user.groups.all()]
|
||||
result['preferences'] = profile.get_preferences()
|
||||
result['ui'] = profile.get_ui()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue