#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2008-2012 Étienne Loks # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # See the file COPYING for details. from django.conf import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() from chimere.models import Area def i18n_javascript(request): return admin.site.i18n_javascript(request) urlpatterns = patterns('chimere.views', url(r'^simple(/?P\w+)?$', 'index', {'simple':True}, name="simple_index") ) urlpatterns += patterns('chimere.views', url(r'^charte/?$', 'charte', name="charte"), url(r'^(?P\w+)?/?contact/?$', 'contactus', name="contact"), url(r'^(?P\w+)?/?edit/$', 'edit', name="edit"), url(r'^(?P\w+)?/?edit/(?P\w+)/(?P\w+)?$', 'edit', name="edit-item"), url(r'^(?P\w+)?/?edit-route/$', 'editRoute', name="editroute"), url(r'^(?P\w+)?/?edit-route/(?P\w+)/(?P\w+)?$', 'editRoute', name="editroute-item"), url(r'^(?P\w+)?/?getDetail/(?P\d+)/?$', 'getDetail', name="get_detail"), url(r'^(?P\w+)?/?getDescriptionDetail/?(?P\d+)/?$', 'getDescriptionDetail', name="get_description_detail"), url(r'^(?:(?P\w+)?/)?getGeoObjects/'\ r'(?P\w+)(/(?P\w+))?$', 'getGeoObjects', name="getgeoobjects"), url(r'^(?P\w+)?/?getAvailableCategories/$', 'get_available_categories', name="get_categories"), url(r'^(?P\w+)?/?ty/(?P\w+)$', 'redirectFromTinyURN', name="tiny"), url(r'^(?P\w+)?/?upload_file/((?P\w+)/)?$', 'uploadFile', name='upload_file'), url(r'^(?P\w+)?/?process_route_file/(?P\d+)/$', 'processRouteFile', name='process_route_file'), ) # At the end, because it catches large urlpatterns += patterns('chimere.views', url(r'^(?P\w+)?', 'index', name="index"), )