use app.config.itemKeys, add Ox.Filter

This commit is contained in:
rolux 2011-01-23 04:58:40 +00:00
commit 052bd72a84
3 changed files with 117 additions and 88 deletions

View file

@ -52,7 +52,7 @@
"title": "Country",
"type": ["string"],
"find": {"autocomplete": true},
"sort": {"type": "string", "width": 180},
"sort": {"type": "string", "width": 120},
"group": true
},
{
@ -60,7 +60,7 @@
"title": "Year",
"type": "year",
"find": {"autocomplete": true},
"sort": {"type": "year", "width": 180},
"sort": {"type": "year", "width": 60},
"group": true
},
{
@ -68,9 +68,16 @@
"title": "Language",
"type": ["string"],
"find": {"autocomplete": true},
"sort": {"type": "string", "width": 180},
"sort": {"type": "string", "width": 120},
"group": true
},
{
"id": "runtime",
"title": "Runtime",
"type": "integer",
"sort": {"type": "integer", "width": 60},
"format": {"type": "duration", "args": [0, "medium"]}
},
{
"id": "writer",
"title": "Writer",
@ -80,8 +87,7 @@
"group": true
},
{
"id":
"producer",
"id": "producer",
"type": ["string"],
"title": "Producer",
"find": {"autocomplete": true},
@ -111,6 +117,13 @@
"find": {"autocomplete": true},
"group": true
},
{
"id": "numberofactors",
"title": "Number of Actors",
"sort": {"type": "integer", "width": 60},
"value": {"key": "actor", "type": "length"},
"type": "integer"
},
{
"id": "character",
"title": "Character",
@ -123,19 +136,12 @@
"type": ["string"],
"find": {"autocomplete": true}
},
{
"id": "numberofactors",
"title": "Number of Actors",
"sort": {"type": "integer", "width": 60},
"value": {"key": "actor", "type": "length"},
"type": "integer"
},
{
"id": "genre",
"title": "Genre",
"type": ["string"],
"find": {"autocomplete": true},
"sort": {"type": "string", "width": 180},
"sort": {"type": "string", "width": 120},
"group": true
},
{
@ -152,13 +158,6 @@
"sort": {"type": "integer", "width": 60},
"value": {"key": "keyword", "type": "length"}
},
{
"id": "runtime",
"title": "Runtime",
"type": "integer",
"sort": {"type": "integer", "width": 60},
"format": {"type": "duration", "args": [0, "medium"]}
},
{
"id": "summary",
"title": "Summary",
@ -166,13 +165,6 @@
"group": false,
"find": {}
},
{
"id": "dialog",
"title": "Dialog",
"type": "text",
"group": false,
"find": {}
},
{
"id": "wordsinsummary",
"title": "Words in Summary",
@ -235,6 +227,13 @@
"sort": {"type": "string", "width": 90},
"type": "string"
},
{
"id": "dialog",
"title": "Dialog",
"type": "text",
"group": false,
"find": {}
},
{
"id": "aspectratio",
"title": "Aspect Ratio",
@ -351,6 +350,18 @@
"sort": {"type": "date", "width": 90},
"type": "date"
},
{
"id": "accessed",
"title": "Date Accessed",
"sort": {"type": "date", "width": 90},
"type": "date"
},
{
"id": "viewed",
"title": "Date Viewed",
"sort": {"type": "date", "width": 90},
"type": "date"
},
{
"id": "popularity",
"title": "Popularity",

View file

@ -52,18 +52,18 @@ def init(request):
'''
#data = json.loads(request.POST['data'])
response = json_response({})
if request.user.is_authenticated():
response['data']['user'] = get_user_json(request.user)
else:
response['data']['user'] = {'name': 'Guest',
'group': 'guest',
'preferences': {}}
with open(settings.SITE_CONFIG) as f:
response['data']['config'] = json.load(f)
response['data']['config']['site']['id'] = settings.SITEID
response['data']['config']['site']['name'] = settings.SITENAME
response['data']['config']['site']['sectionName'] = settings.SITENAME
response['data']['config']['site']['url'] = settings.URL
if request.user.is_authenticated():
response['data']['user'] = get_user_json(request.user)
else:
response['data']['user'] = response['data']['config']['user']
return render_to_json_response(response)
actions.register(init)