forked from 0x2620/pandora
use site.json
This commit is contained in:
parent
aeaa875608
commit
75f6e3b2dc
4 changed files with 4 additions and 15 deletions
|
@ -31,20 +31,10 @@ def api_getPage(request):
|
|||
response = json_response({'name': page.name, 'body': page.body})
|
||||
return render_to_json_response(response)
|
||||
|
||||
return render_to_response('site.js', context, mimetype="application/javascript")
|
||||
|
||||
def site_js(request):
|
||||
pages = models.Page.objects.all()
|
||||
siteSettings = {}
|
||||
for s in models.SiteSettings.objects.all():
|
||||
siteSettings[s.key] = s.value
|
||||
context = RequestContext(request, {'settings':settings, 'pages': pages, 'siteSettings': siteSettings})
|
||||
return render_to_response('site.js', context, mimetype="application/javascript")
|
||||
|
||||
def pandora_json(request):
|
||||
def site_json(request):
|
||||
siteSettings = {}
|
||||
for s in models.SiteSettings.objects.all():
|
||||
siteSettings[s.key] = s.value
|
||||
context = RequestContext(request, {'settings':settings, 'siteSettings': siteSettings})
|
||||
return render_to_response('pandora.json', context, mimetype="application/javascript")
|
||||
return render_to_response('site.json', context, mimetype="application/javascript")
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@ def serve_static_file(path, location, content_type):
|
|||
urlpatterns = patterns('',
|
||||
(r'^ajax_filtered_fields/', include('ajax_filtered_fields.urls')),
|
||||
(r'^api/upload/$', 'archive.views.firefogg_upload'),
|
||||
(r'^site.js$', 'app.views.site_js'),
|
||||
(r'^pandora.json$', 'app.views.pandora_json'),
|
||||
(r'^site.json$', 'app.views.site_json'),
|
||||
(r'^$', 'app.views.intro'),
|
||||
(r'^ra$', 'app.views.index'),
|
||||
(r'^timeline$', 'app.views.timeline'),
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
var app = new Ox.App({
|
||||
apiURL: '/api/',
|
||||
config: '/pandora.json',
|
||||
config: '/site.json',
|
||||
init: 'hello',
|
||||
}).launch(function(data) {
|
||||
Ox.print('data', data)
|
||||
|
|
Loading…
Reference in a new issue