added basic structure for urls and views

This commit is contained in:
Sanj 2011-08-28 03:44:32 +05:30
parent 5b43299967
commit f2dbce73ad
4 changed files with 29 additions and 2 deletions

View File

@ -1 +1,20 @@
# Create your views here. # Create your views here.
from django.shortcuts import render_to_response
from ox.django.shortcuts import render_to_json_response
from django.template import RequestContext
def search(request):
d = RequestContext(request, {})
return render_to_response("search.html", d)
def search_json(request):
d = {}
return render_to_json_response(d)
def search_related(request):
d = RequestContext(request, {})
return render_to_response("search_related.html")
def search_related_json(request):
d = {}
return render_to_json_response(d)

View File

@ -4,7 +4,7 @@ from os.path import join
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
DATA_DIR = '/home/sanj/c/gazetteer/data' # DATA_DIR = '/home/sanj/c/gazetteer/data'
ADMINS = ( ADMINS = (
# ('Your Name', 'your_email@domain.com'), # ('Your Name', 'your_email@domain.com'),
) )

View File

@ -0,0 +1,5 @@
$(function() {
var map = new OpenLayers.Map('map', {});
});

View File

@ -7,7 +7,10 @@ admin.autodiscover()
urlpatterns = patterns('', urlpatterns = patterns('',
# Example: # Example:
# (r'^gazetteer/', include('gazetteer.foo.urls')), # (r'^gazetteer/', include('gazetteer.foo.urls')),
('^search$', 'places.views.search'),
('^search_json$', 'places.views.search_json'),
('^search_related$', 'places.views.search_related'),
('^search_related_json$', 'places.views.search_related.json'),
# Uncomment the admin/doc line below to enable admin documentation: # Uncomment the admin/doc line below to enable admin documentation:
(r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^admin/doc/', include('django.contrib.admindocs.urls')),