src/ldtplatform/urls.py
author cavaliet
Thu, 17 Oct 2013 12:33:17 +0200
changeset 128 6ffc59b2f7a0
parent 110 7da60a0dd2bb
child 239 6888d282b4cc
permissions -rw-r--r--
update requirements and version number to 2.11.2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
5778de052a1b - update virtualenv
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
     1
from django.conf import settings
102
e2968797bdae upgrade to django 1.5
ymh <ymh.work@gmail.com>
parents: 101
diff changeset
     2
from django.conf.urls import patterns, include, url
1
5778de052a1b - update virtualenv
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
     3
from django.conf.urls.static import static
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
from django.contrib import admin
1
5778de052a1b - update virtualenv
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
     5
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
101
f8d837d7ffbc intermediary commit migration django 1.5
ymh <ymh.work@gmail.com>
parents: 21
diff changeset
     6
from django.views.generic import RedirectView
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
from ldt.auth.views import login as pf_login
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
from ldt.text import VERSION_STR
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
#from django.conf import settings
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
# Uncomment the next two lines to enable the admin:
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
admin.autodiscover()
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
110
7da60a0dd2bb update requirements (ldt, hashcut and metadatacomposer) and version number to 2.10
cavaliet
parents: 102
diff changeset
    15
js_info_dict = {
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    'packages': ('django.contrib.admin',), 
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
}
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
urlpatterns = patterns('',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    # Example:
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
    # to INSTALLED_APPS to enable admin documentation:
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
    # Uncomment the next line to enable the admin:
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    (r'^admin/', include(admin.site.urls)),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    (r'^i18n/', include('django.conf.urls.i18n')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    (r'^ldt/', include('ldt.ldt_utils.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
    (r'^user/', include('ldt.user.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
    (r'^api/', include('ldt.api.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
    (r'^api/' + VERSION_STR + '/text/', include('ldt.text.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
    (r'^auth_accounts/', include('registration.backends.simple.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
    #(r'^accounts/', include('socialauth.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
    (r'^accounts/', include('social_auth.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
    url(r'^accounts/login/$',pf_login,{'template_name': 'registration/login.html'},name='auth_login'),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
    (r'^oauth/', include('oauth_provider.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
    #(r'^$', 'socialauth.views.signin_complete'),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
    #(r'^$', 'social_auth.views.complete'),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
    
101
f8d837d7ffbc intermediary commit migration django 1.5
ymh <ymh.work@gmail.com>
parents: 21
diff changeset
    45
    (r'^/?$', RedirectView.as_view(url='ldt')),
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
    #(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
    
16
cc7e7ba6efd3 update settings for hashcut
cavaliet
parents: 1
diff changeset
    48
    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
21
50a6ba97a22d hashcut added to installed apps and urls.
cavaliet
parents: 19
diff changeset
    49
    (r'^hashcut/', include('hashcut.urls')),
110
7da60a0dd2bb update requirements (ldt, hashcut and metadatacomposer) and version number to 2.10
cavaliet
parents: 102
diff changeset
    50
    (r'^composer/', include('metadatacomposer.urls')),
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
)
1
5778de052a1b - update virtualenv
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    52
5778de052a1b - update virtualenv
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    53
urlpatterns += staticfiles_urlpatterns()
5778de052a1b - update virtualenv
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    54
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)