36 lines
1.3 KiB
Python
36 lines
1.3 KiB
Python
from django.conf.urls.defaults import *
|
|
import settings
|
|
from os.path import join
|
|
# Uncomment the next two lines to enable the admin:
|
|
from django.contrib import admin
|
|
admin.autodiscover()
|
|
|
|
urlpatterns = patterns('',
|
|
# Example:
|
|
# (r'^manifests/', include('manifests.foo.urls')),
|
|
|
|
# Uncomment the admin/doc line below to enable admin documentation:
|
|
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
|
|
|
# Uncomment the next line to enable the admin:
|
|
|
|
# for human translators
|
|
(r'^trans/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/(?P<page_no>\d*)/', 'ships.views.translate'),
|
|
# (r'^dotrans/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/', 'ships.views.dotranslate'),
|
|
|
|
# for automated google translation
|
|
(r'^googletranslate/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/', 'ships.views.googletranslate'),
|
|
(r'^dotranslate/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/', 'ships.views.dotranslate'),
|
|
(r'^stringtranslate/$', 'ships.views.stringtranslate'),
|
|
(r'^admin/', include(admin.site.urls)),
|
|
)
|
|
|
|
if settings.LOCAL_DEVELOPMENT:
|
|
#
|
|
urlpatterns += patterns('',
|
|
#
|
|
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': join(settings.PROJECT_PATH, "static")}),
|
|
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': join(settings.PROJECT_PATH, "media")}),
|
|
#
|
|
)
|
|
|