urls.py 3.76 KB
from django.conf.urls.defaults import *

from common.util import url
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

from paginer.ajax import get_page_content

urlpatterns = patterns('',
  # Example:
  # (r'^lexeme_forge/', include('lexeme_forge.foo.urls')),
  url(r'^accounts/register/$', 'accounts.views.register', name='register'),
  url(r'^accounts/settings/$', 'accounts.views.settings', name='settings'),
  url(r'^accounts/manage-groups/$', 'accounts.views.manage_groups',
      name='manage_groups'),
  (r'^accounts/', include('registration.urls')),

  url(r'^ajax/sort_rules/$', 'dictionary.ajax_jqgrid.sort_rules',
      name='sort_rules'),
  url(r'^ajax/get-page/$', get_page_content, name='get_page_content'),

  # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
  # to INSTALLED_APPS to enable admin documentation:
  # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

  # Uncomment the next line to enable the admin:
  (r'^admin/', include(admin.site.urls)),

  url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL.lstrip('/'),
      'django.views.static.serve',
      kwargs={'document_root': settings.MEDIA_ROOT}),
)

urlpatterns += patterns('dictionary.ajax_lexeme_view',
  url(r'^ajax/lexemes/$', 'get_lexemes'),
  url(r'^ajax/inflection_tables/$', 'get_inflection_tables'),
  url(r'^ajax/history-table/$', 'history_table'),
  url(r'^ajax/odm-forms/$', 'odm_forms'),
  url(r'^ajax/lexeme_edit_form/$', 'lexeme_edit_form'),
  url(r'^ajax/update_lexeme/$', 'update_lexeme'),
  url(r'^ajax/location/$', 'get_location'),
  url(r'^ajax/find_id/$', 'find_id'),
  url(r'^ajax/save_filter/$', 'save_filter'),
  url(r'^ajax/get_filters/$', 'get_filters'),
  url(r'^ajax/delete_filter/$', 'delete_filter'),
  url(r'^ajax/table_preview/$', 'table_preview'),
  url(r'^ajax/new_lip_row/$', 'new_lip_edit_row'),
  url(r'^ajax/save_columns/$', 'save_columns'),
  url(r'^ajax/add_vocabulary/$', 'add_vocabulary'),
  url(r'^ajax/get_privileges/$', 'vocabulary_privileges'),
  url(r'^ajax/set_privilege$', 'set_vocabulary_privilege'),
  url(r'^ajax/new_cr_row/$', 'new_cross_reference_row'),
  url(r'^ajax/delete_lexeme/$', 'delete_lexeme'),
  url(r'^ajax/prompter-list/$', 'prompter_list'),
  url(r'^ajax/check-pos/$', 'check_pos'),
  url(r'^ajax/check-pattern/$', 'check_pattern'),
  url(r'^ajax/get-ics/$', 'get_ics'),
  url(r'^ajax/create-lexeme/$', 'create_lexeme'),
  url(r'^ajax/classification-forms/$', 'classification_forms'),
  url(r'^ajax/homonym-count/$', 'homonym_count'),
)

urlpatterns += patterns('dictionary.ajax_pattern_view',
  url(r'^ajax/patterns/objects/$', 'get_patterns'),
  url(r'^ajax/patterns/find_id/$', 'find_id', name='patterns_find_id'),
  url(r'^ajax/patterns/location/$', 'get_location',
      name='patterns_get_location'),
  url(r'^ajax/patterns/save_columns/$', 'save_columns',
      name='patterns_save_columns'),
  url(r'^ajax/patterns/pattern_edit_form/$', 'pattern_edit_form'),
  url(r'^ajax/patterns/new_ending_row/$', 'new_ending_row'),
  url(r'^ajax/update_pattern/$', 'update_pattern'),
)

urlpatterns += patterns('dictionary.ajax_export',
  url(r'^ajax/new_qualifier_row/$', 'magic_qualifier_row'),
)

urlpatterns += patterns('accounts.ajax',
  url(r'^ajax/set_group/$', 'set_group'),
  url(r'^ajax/save-default-owner/$', 'save_default_owner'),
)

urlpatterns += patterns('dictionary.views',
  url(r'^$', 'lexeme_view'),
  url(r'^wzory/$', 'pattern_view'),
  url(r'^zadania/$', 'tasks'),
  url(r'^raporty/$', 'reports'),
  url(r'^widok-wydawcy/$', 'manager_view'),
  url(r'^klasyfikacje/$', 'manage_classifications'),
  url(r'^kwalifikatory/$', 'manage_qualifiers'),
  url(r'^historia/$', 'history_view'),
  url(r'^eksport/$', 'export'),
  url(r'^administracja/$', 'management_menu'),
)