urls.py 1.17 KB
#-*- coding:utf-8 -*-

from django.conf.urls import patterns, include

from common.util import url
from webapp.views import EditTableJson, ExpressionsJson

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    (r'^accounts/', include('registration.urls')),
)

urlpatterns += patterns('webapp.views',
    url(r'^$', 'preview_page'),
    url(r'^edit/$', 'edit_page'),
    url(r'^datatable/data/$', ExpressionsJson.as_view(), name='expressions'),
    url(r'^edittable/data/$', EditTableJson.as_view(), name='edit_table'),
    url(r'^ajax/expression_info/$', 'expression_info'),
    url(r'^ajax/expression_info_by_meaning/$', 'expression_info_by_meaning'),
    url(r'^ajax/meaning_info_by_expression/$', 'meaning_info_by_expression'),
    url(r'^ajax/meaning_info_by_meaning/$', 'meaning_info_by_meaning'),
    url(r'^ajax/edit_meaning_form/$', 'edit_meaning_form'),
    url(r'^ajax/meaning_form_submit/$', 'meaning_form_submit'),
)

urlpatterns += patterns('restapi.views',
    url(r'^get_expressions/$', 'get_expressions'),
    url(r'^get_synonyms/$', 'get_synonyms'),
    url(r'^get_catchwords/$', 'get_catchwords'),
)