forked from 0x2620/pandora
update oxjs params and setUrl, some more user functions
This commit is contained in:
parent
4d4d500e4c
commit
0c8906ffbd
5 changed files with 14 additions and 13 deletions
|
@ -28,7 +28,6 @@ urlpatterns = patterns("oxdb.backend.views",
|
||||||
(r'^archive/(?P<archive>.+)/remove', 'remove_file'),
|
(r'^archive/(?P<archive>.+)/remove', 'remove_file'),
|
||||||
(r'^file/parse', 'file_parse'),
|
(r'^file/parse', 'file_parse'),
|
||||||
(r'^subtitle/get', 'subtitles'),
|
(r'^subtitle/get', 'subtitles'),
|
||||||
(r'^preferences', 'preferences'),
|
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# (r'^oxdata/', include('oxdata.foo.urls')),
|
# (r'^oxdata/', include('oxdata.foo.urls')),
|
||||||
|
@ -40,3 +39,8 @@ urlpatterns = patterns("oxdb.backend.views",
|
||||||
# Uncomment the next line to enable the admin:
|
# Uncomment the next line to enable the admin:
|
||||||
# (r'^admin/(.*)', admin.site.root),
|
# (r'^admin/(.*)', admin.site.root),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#add user urls. login, logout, preferences etc
|
||||||
|
import user_management.urls
|
||||||
|
urlpatterns += user_management.urls.urlpatterns
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import re
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from urllib2 import unquote
|
from urllib2 import unquote
|
||||||
|
|
||||||
from django.db import models
|
|
||||||
from django.db.models import Q, Avg, Count
|
from django.db.models import Q, Avg, Count
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
|
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
|
||||||
|
@ -14,10 +13,10 @@ from django.core.paginator import Paginator
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.utils import simplejson as json
|
from django.utils import simplejson as json
|
||||||
from oxdb.utils.shortcuts import render_to_json_response
|
from oxdb.utils.shortcuts import render_to_json_response
|
||||||
|
from oxdb.utils.decorators import login_required_json
|
||||||
|
|
||||||
import models
|
import models
|
||||||
import utils
|
import utils
|
||||||
from decorators import login_required_json
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
field.length -> movie.sort.all()[0].field
|
field.length -> movie.sort.all()[0].field
|
||||||
|
@ -359,13 +358,4 @@ def file_parse(request):
|
||||||
response = utils.parsePath(request.POST['path'])
|
response = utils.parsePath(request.POST['path'])
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
|
|
||||||
'''
|
|
||||||
POST preferences/get?key=
|
|
||||||
POST preferences/set?key=&value
|
|
||||||
'''
|
|
||||||
@login_required_json
|
|
||||||
def preferences(request):
|
|
||||||
oshash = request.POST['oshash']
|
|
||||||
return ''
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ DATABASE_PASSWORD = '' # Not used with sqlite3.
|
||||||
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
|
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
|
||||||
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
|
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
|
||||||
|
|
||||||
|
#CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
|
||||||
|
|
||||||
# Local time zone for this installation. Choices can be found here:
|
# Local time zone for this installation. Choices can be found here:
|
||||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||||
# although not all choices may be available on all operating systems.
|
# although not all choices may be available on all operating systems.
|
||||||
|
|
|
@ -727,7 +727,7 @@ $(function() {
|
||||||
sort: user.prefs.sortGroups,
|
sort: user.prefs.sortGroups,
|
||||||
order: user.prefs.orderGroups,
|
order: user.prefs.orderGroups,
|
||||||
url: "/json/find",
|
url: "/json/find",
|
||||||
params: ["g=country"]
|
params: {g:"country"}
|
||||||
}).attr({
|
}).attr({
|
||||||
id: "groups"
|
id: "groups"
|
||||||
});
|
});
|
||||||
|
@ -1062,6 +1062,11 @@ $(function() {
|
||||||
}).attr({
|
}).attr({
|
||||||
id: "find"
|
id: "find"
|
||||||
}).appendTo($topMenu.$element).trigger("blur");
|
}).appendTo($topMenu.$element).trigger("blur");
|
||||||
|
$find.change(function(that) {
|
||||||
|
var q = $(this).val();
|
||||||
|
$main.setUrl("/json/find", {q:q});
|
||||||
|
$mainBrowser.setUrl("/json/find", {g:"country", q:q});
|
||||||
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$find = $("<input/>")
|
$find = $("<input/>")
|
||||||
|
|
Loading…
Reference in a new issue