diff --git a/pandora/oxuser/models.py b/pandora/oxuser/models.py index c76af92e..a7f5a5cf 100644 --- a/pandora/oxuser/models.py +++ b/pandora/oxuser/models.py @@ -37,8 +37,30 @@ def getUserJSON(user): elif user.has_perm('0x.vip'): #FIXME: permissions json['group'] = 'vip' json['preferences'] = getPreferences(user) + json['ui'] = getUI(user) return json +def getUI(user): + return { + "columns": ["id", "title", "director", "country", "year", "language", "genre"], + "findQuery": {"conditions": [{"key": "", "value": "", "operator": ""}], "operator": ""}, + "groupsQuery": {"conditions": [], "operator": "|"}, + "groupsSize": 128, + "itemView": "info", + "listQuery": {"conditions": [], "operator": ""}, + "listsSize": 192, + "listView": "list", + "sections": ["history", "lists", "public", "featured"], + "showGroups": True, + "showInfo": True, + "showLists": True, + "showMovies": True, + "sort": [ + {"key": "director", "operator": ""} + ], + "theme": "classic" + } + def getPreferences(user): prefs = {} for p in Preference.objects.filter(user=user):