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

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

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

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

  url(r'^ajax/history-table/$', 'dictionary.ajax_history.history_table'),
  url(r'^ajax/prompter-list/$', 'dictionary.ajax_prompter.prompter_list'),

  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/inflection_tables/$', 'get_inflection_tables'),
  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/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_permissions'),
  url(r'^ajax/set_privilege$', 'set_vocabulary_permission'),
  url(r'^ajax/new_cr_row/$', 'new_cross_reference_row'),
  url(r'^ajax/delete_lexeme/$', 'delete_lexeme'),
  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/extra-attributes/$', 'extra_attributes'),
  url(r'^ajax/check-attributes/$', 'check_attributes'),
  url(r'^ajax/homonym-count/$', 'homonym_count'),
  url(r'^ajax/cr-homonyms/$', 'cr_homonyms'),
  url(r'^ajax/new-action-row/$', 'new_action_row'),
  url(r'^ajax/dynamic-fields/$', 'dynamic_action_fields'),
  url(r'^ajax/execute-actions$', 'execute_group_actions'),
)

urlpatterns += patterns('dictionary.ajax_lexeme_jqgrid',
  url(r'^ajax/lexemes/$', 'get_lexemes'),
  url(r'^ajax/location/$', 'get_location'),
  url(r'^ajax/find_id/$', 'find_id'),
)

urlpatterns += patterns('dictionary.ajax_filters',
  url(r'^ajax/save_filter/$', 'save_filter'),
  url(r'^ajax/get_filters/$', 'get_filters'),
  url(r'^ajax/delete_filter/$', 'delete_filter'),
)

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'),
  url(r'^ajax/save_export_data/$', 'save_export_data'),
  url(r'^ajax/get_export_data/$', 'get_export_data'),
  url(r'^ajax/delete_export_data/$', 'delete_export_data'),
)

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'),
  url(r'^WSJP/(.+)/$', 'wsjp_table'),
)

urlpatterns += patterns('paginer.ajax',
  url(r'^ajax/get-page/$', 'get_page_content'),
  url(r'^ajax/new-filter-row/$', 'new_filter_row'),
  url(r'^ajax/dynamic-field/$', 'field_form'),
)