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

from django.conf import settings
from django.conf.urls import patterns, include
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')),
    (r'^accounts/', include('django.contrib.auth.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}),
    (r'^admin/', include(admin.site.urls)),  # potrzebne do zmiany hasła
)

urlpatterns += patterns(
    'dictionary.ajax_lexeme_view',
    url(r'^ajax/inflection-tables/$', '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/check-classifications/$', 'check_classifications'),
    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'),
    url(r'^ajax/create-derivatives/$', 'create_derivatives'),
    url(r'^ajax/clone-lexeme/$', 'clone_lexeme')
)

urlpatterns += patterns(
    'dictionary.ajax_lexeme_slickgrid',
    url(r'^ajax/lexemes/$', 'get_lexemes'),
    url(r'^ajax/search-index/$', 'search_index'),
    url(r'^ajax/row-index/$', 'row_index'),
    url(r'^ajax/search-by-form/$', 'search_by_form'),
)

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/search-index/$', 'search_index',
        name='patterns_search_index'),
    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'),
    url(r'^ajax/create-pattern/$', 'create_pattern'),
    url(r'^ajax/pattern-preview/$', 'pattern_preview'),
)

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(
    'dictionary.ajax_table_view',
    url(r'^ajax/table-edit-form/$', 'table_edit_form'),
    url(r'^ajax/new-table-form/$', 'new_template_row'),
    url(r'^ajax/template-preview-form/$', 'template_preview_form'),
    url(r'^ajax/load-template-preview/$', 'template_preview'),
    url(r'^ajax/save-template/$', 'save_template'),
)

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'^$', 'main'),
    url(r'^leksemy/$', 'lexeme_view'),
    url(r'^lista-leksemow/$', 'export_list'),
    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'^tabelki/$', 'table_view'),
    url(r'^historia/$', 'history_view'),
    url(r'^eksport/$', 'export'),
    url(r'^administracja/$', 'management_menu'),
    url(r'^WSJP/(.+)/$', 'wsjp_table'),
    url(r'^slownik/$', 'reader_view')
)

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'),
)