diff --git a/pandora/app/views.py b/pandora/app/views.py index c4c090a..5cd2e0b 100644 --- a/pandora/app/views.py +++ b/pandora/app/views.py @@ -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") diff --git a/pandora/templates/pandora.json b/pandora/templates/site.json similarity index 100% rename from pandora/templates/pandora.json rename to pandora/templates/site.json diff --git a/pandora/urls.py b/pandora/urls.py index 489d84d..2065b75 100644 --- a/pandora/urls.py +++ b/pandora/urls.py @@ -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'), diff --git a/static/js/pandora.js b/static/js/pandora.js index 78ca930..a412b64 100755 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -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)