src/ldtplatform/urls.py
author ymh <ymh.work@gmail.com>
Wed, 28 Nov 2012 10:05:53 +0100
changeset 0 87104b7cb3d6
child 1 5778de052a1b
permissions -rw-r--r--
first version of file organization
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
from django.conf.urls.defaults import patterns, include, url
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
from django.contrib import admin
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
from ldt.auth.views import login as pf_login
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
from ldt.text import VERSION_STR
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
#from django.conf import settings
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
# Uncomment the next two lines to enable the admin:
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
admin.autodiscover()
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
js_info_dict = {  
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
    'packages': ('django.contrib.admin',), 
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
}
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
urlpatterns = patterns('',
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    # Example:
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
    # 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
    19
    # to INSTALLED_APPS to enable admin documentation:
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
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 next line to enable the admin:
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
    (r'^admin/', include(admin.site.urls)),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    (r'^i18n/', include('django.conf.urls.i18n')),
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
    (r'^ldt/', include('ldt.ldt_utils.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    (r'^user/', include('ldt.user.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    (r'^api/', include('ldt.api.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
    (r'^api/' + VERSION_STR + '/text/', include('ldt.text.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
    (r'^auth_accounts/', include('registration.backends.simple.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
    #(r'^accounts/', include('socialauth.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
    (r'^accounts/', include('social_auth.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
    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
    36
    (r'^oauth/', include('oauth_provider.urls')),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
    
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
    #(r'^$', 'socialauth.views.signin_complete'),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
    #(r'^$', 'social_auth.views.complete'),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
    
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    (r'^/?$', 'django.views.generic.simple.redirect_to', {'url': 'ldt'}),
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
    #(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
    43
    
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), 
87104b7cb3d6 first version of file organization
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
)