
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
from GeneralApp.views import Page404
from AuthApp.views import login_View
from django.views.generic.base import RedirectView

handler404 = Page404

urlpatterns = [
    # path('admin/', admin.site.urls),
    path('ckeditor/', include('ckeditor_uploader.urls')),
    path('i18n/', include('django.conf.urls.i18n')),

    # path('tz_detect/', include('tz_detect.urls')),

    path('accounts/signup/', login_View, name='signup'),
    path('accounts/login/cancelled/', login_View),

    path('accounts/', include('allauth.urls')),
    path('accounts/', include('allauth.socialaccount.urls')),

    path('messages/', include('ChatServiceApp.urls')),

    path('user_account/', include('AuthApp.js_urls')),



    path('routes/', include('RoutesApp.js_urls')),

    path('subscribes/', include('SubscribesApp.js_urls')),

    path('messages/', include('ChatServiceApp.js_urls')),

    path('reference_data/', include('ReferenceDataApp.js_urls')),

    path('', include('ArticlesApp.js_urls')),

    path('test_404', Page404, name='page_404'),

    path('', include('PushMessages.urls')),

    path('', include('SitemapApp.urls')),
]

from django.conf.urls.i18n import i18n_patterns
urlpatterns += i18n_patterns(
    path('admin/', admin.site.urls),

    path('', include('GeneralApp.urls')),
    path('profile/', include('AuthApp.urls')),


    path('routes/', include('RoutesApp.urls')),

    path('', include('ArticlesApp.urls_translate')),

    path('favicon.svg',RedirectView.as_view(url='/static/favicon.ico')),

)

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)