summaryrefslogtreecommitdiff
path: root/chimere/urls.py
blob: 8a252f6d6e7f6526a3d56846e8dad9948932e7f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2012  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>

# 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 <http://www.gnu.org/licenses/>.

# 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<area_name>\w+)?$', 'index', {'simple':True},
        name="simple_index")
)

urlpatterns += patterns('chimere.views',
    url(r'^charte/?$', 'charte', name="charte"),
    url(r'^(?P<area_name>\w+)?/?contact/?$', 'contactus', name="contact"),
    url(r'^(?P<area_name>\w+)?/?submited/(?P<action>\w+)/?$', 'submited',
        name="submit"),
    url(r'^(?P<area_name>\w+)?/?edit/$', 'edit',
        name="edit"),
    url(r'^(?P<area_name>\w+)?/?edit/(?P<marker_id>\w+)/$', 'edit',
        name="edit-marker"),
    url(r'^(?P<area_name>\w+)?/?edit_route/$', 'editRoute',
        name="edit_route"),
    url(r'^(?P<area_name>\w+)?/?getDetail/(?P<marker_id>\d+)/?$', 'getDetail',
        name="get_detail"),
    url(r'^(?P<area_name>\w+)?/?getDescriptionDetail/?(?P<category_id>\d+)/?$',
                        'getDescriptionDetail', name="get_description_detail"),
    url(r'^(?:(?P<area_name>\w+)?/)?getGeoObjects/'\
        r'(?P<category_ids>\w+)(/(?P<status>\w+))?$', 'getGeoObjects',
                        name="getgeoobjects"),
    url(r'^(?P<area_name>\w+)?/?getAvailableCategories/$',
                        'get_available_categories', name="get_categories"),
    url(r'^(?P<area_name>\w+)?/?ty/(?P<tiny_urn>\w+)$',
                        'redirectFromTinyURN', name="tiny"),
    url(r'^(?P<area_name>\w+)?/?upload_file/((?P<category_id>\w+)/)?$',
                        'uploadFile', name='upload_file'),
    url(r'^(?P<area_name>\w+)?/?process_route_file/(?P<file_id>\d+)/$',
                        'processRouteFile', name='process_route_file'),
)

# At the end, because it catches large
urlpatterns += patterns('chimere.views',
    url(r'^(?P<area_name>\w+)?', 'index', name="index"),
)