urls.py 837 Bytes
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.urls import include, path

from django.views.i18n import JavaScriptCatalog

from common.views import dash, error_400, error_404

# prepend non default-language to the urls
urlpatterns = i18n_patterns(
    path('entries/', include('entries.urls')),
    path('phrase_expansions/', include('phrase_expansions.urls')),
    path('dictionary_statistics/', include('dictionary_statistics.urls')),
    path('download/', include('download.urls')),
    path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
    path('admin/', admin.site.urls, name='admin'),
    path('', dash, name='dash'),
    # uncomment to leave default (Polish) urls unchanged
    #prefix_default_language=False,
)

#handler400 = error_400
#handler404 = error_404