From c2ef76b69bbecb67b4d510e4d809de55d836e373 Mon Sep 17 00:00:00 2001 From: SDE Date: Tue, 9 Jul 2024 16:51:05 +0300 Subject: [PATCH] 1.5.0 rosetta translate --- TWB/settings.py | 2 ++ TWB/urls.py | 7 ++++++- requirements.pip | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/TWB/settings.py b/TWB/settings.py index d769a02..6f23a78 100644 --- a/TWB/settings.py +++ b/TWB/settings.py @@ -120,6 +120,8 @@ INSTALLED_APPS = [ 'allauth.socialaccount', 'allauth.socialaccount.providers.google', + 'rosetta', + 'GeneralApp', 'AuthApp', 'RoutesApp', diff --git a/TWB/urls.py b/TWB/urls.py index de99189..ded1ef8 100644 --- a/TWB/urls.py +++ b/TWB/urls.py @@ -1,6 +1,6 @@ from django.contrib import admin -from django.urls import path, include +from django.urls import path, include, re_path from django.conf.urls.static import static from django.conf import settings from GeneralApp.views import Page404 @@ -61,4 +61,9 @@ urlpatterns += i18n_patterns( ) +if 'rosetta' in settings.INSTALLED_APPS: + urlpatterns += [ + re_path(r'^rosetta/', include('rosetta.urls')) + ] + urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/requirements.pip b/requirements.pip index 7aaf1da..3900a21 100644 --- a/requirements.pip +++ b/requirements.pip @@ -15,4 +15,5 @@ django-allauth==0.60.0 pytz==2024.1 requests-pkcs12==1.24 #django-tz-detect==0.4.0 +django-rosetta==0.10.0