src/p4l/urls.py
author ymh <ymh.work@gmail.com>
Wed, 02 Oct 2013 05:30:06 +0200
changeset 135 c9f22e2987ea
parent 131 f1854630734f
child 145 7c6fe1dab213
permissions -rw-r--r--
Add a reminder that the application needs sesame
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
126
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
     1
# -*- coding: utf-8 -*-
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
     2
#
131
f1854630734f change copyright notice
ymh <ymh.work@gmail.com>
parents: 126
diff changeset
     3
# Copyright IRI (c) 2013
126
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
     4
#
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
     5
# contact@iri.centrepompidou.fr
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
     6
#
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
     7
# This software is governed by the CeCILL-B license under French law and
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
     8
# abiding by the rules of distribution of free software.  You can  use, 
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
     9
# modify and/ or redistribute the software under the terms of the CeCILL-B
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    10
# license as circulated by CEA, CNRS and INRIA at the following URL
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    11
# "http://www.cecill.info". 
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    12
#
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    13
# As a counterpart to the access to the source code and  rights to copy,
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    14
# modify and redistribute granted by the license, users are provided only
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    15
# with a limited warranty  and the software's author,  the holder of the
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    16
# economic rights,  and the successive licensors  have only  limited
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    17
# liability. 
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    18
#
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    19
# In this respect, the user's attention is drawn to the risks associated
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    20
# with loading,  using,  modifying and/or developing or reproducing the
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    21
# software by the user in light of its specific status of free software,
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    22
# that may mean  that it is complicated to manipulate,  and  that  also
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    23
# therefore means  that it is reserved for developers  and  experienced
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    24
# professionals having in-depth computer knowledge. Users are therefore
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    25
# encouraged to load and test the software's suitability as regards their
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    26
# requirements in conditions enabling the security of their systems and/or 
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    27
# data to be ensured and,  more generally, to use and operate it in the 
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    28
# same conditions as regards security. 
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    29
#
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    30
# The fact that you are presently reading this means that you have had
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    31
# knowledge of the CeCILL-B license and that you accept its terms.
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    32
#
a345f1a67bf1 Python licence headers
ymh <ymh.work@gmail.com>
parents: 119
diff changeset
    33
0
81e7900b06a7 First import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
from django.conf.urls import patterns, include, url
16
19fe06edb58d Add api for records
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
    35
from django.contrib import admin
24
3b1b0a9309d6 login logout
cavaliet
parents: 16
diff changeset
    36
from django.contrib.auth import urls as auth_urls
40
cc7149ca6863 good place for login_required
cavaliet
parents: 39
diff changeset
    37
from django.contrib.auth.decorators import login_required
113
c05567404888 First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents: 93
diff changeset
    38
c05567404888 First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents: 93
diff changeset
    39
from p4l.search.views import RecordSearchView
117
0a4e7d6ebe80 - Do not create object for new
ymh <ymh.work@gmail.com>
parents: 113
diff changeset
    40
from p4l.views import RecordDetailView, RecordEditView, RecordDeleteView
113
c05567404888 First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents: 93
diff changeset
    41
0
81e7900b06a7 First import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
39
33a413910b75 fisrt version for translate
ymh <ymh.work@gmail.com>
parents: 35
diff changeset
    43
js_info_dict = {
33a413910b75 fisrt version for translate
ymh <ymh.work@gmail.com>
parents: 35
diff changeset
    44
    'packages': ('p4l',),
33a413910b75 fisrt version for translate
ymh <ymh.work@gmail.com>
parents: 35
diff changeset
    45
    'domain': 'django',
33a413910b75 fisrt version for translate
ymh <ymh.work@gmail.com>
parents: 35
diff changeset
    46
}
33a413910b75 fisrt version for translate
ymh <ymh.work@gmail.com>
parents: 35
diff changeset
    47
0
81e7900b06a7 First import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
admin.autodiscover()
81e7900b06a7 First import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
81e7900b06a7 First import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
urlpatterns = patterns('',
113
c05567404888 First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents: 93
diff changeset
    51
    url(r'^$', login_required(RecordSearchView.as_view()), name='p4l_home'),
24
3b1b0a9309d6 login logout
cavaliet
parents: 16
diff changeset
    52
    url(r'^auth/', include(auth_urls)),
40
cc7149ca6863 good place for login_required
cavaliet
parents: 39
diff changeset
    53
    url(r'^record/view/(?P<slug>\w+)$', login_required(RecordDetailView.as_view()), name='p4l_record_view'),
119
ece69ca3ac24 - correct import pour indexation
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    54
    url(r'^record/edit/(?P<slug>[\w\:]+)$', login_required(RecordEditView.as_view()), name='p4l_record_edit'),
117
0a4e7d6ebe80 - Do not create object for new
ymh <ymh.work@gmail.com>
parents: 113
diff changeset
    55
    url(r'^record/new$', login_required(RecordEditView.as_view(is_create_view=True)), name='p4l_record_new'),
92
57633a3acc4f delete record
cavaliet
parents: 40
diff changeset
    56
    url(r'^record/delete/(?P<slug>\w+)$', login_required(RecordDeleteView.as_view()), name='p4l_record_delete'),
16
19fe06edb58d Add api for records
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
    57
    url(r'^api/', include('p4l.api.urls')),
0
81e7900b06a7 First import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
39
33a413910b75 fisrt version for translate
ymh <ymh.work@gmail.com>
parents: 35
diff changeset
    59
    url(r'^i18n/', include('django.conf.urls.i18n')),
33a413910b75 fisrt version for translate
ymh <ymh.work@gmail.com>
parents: 35
diff changeset
    60
    url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
0
81e7900b06a7 First import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
    url(r'^admin/', include(admin.site.urls)),
16
19fe06edb58d Add api for records
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
    62
    
1
d184767fdd52 first list view
cavaliet
parents: 0
diff changeset
    63
)