0.0.4
AuthApp add
This commit is contained in:
@@ -31,6 +31,8 @@ ALLOWED_HOSTS = []
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'modeltranslation',
|
||||
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
@@ -42,7 +44,10 @@ INSTALLED_APPS = [
|
||||
'ckeditor',
|
||||
'ckeditor_uploader',
|
||||
|
||||
|
||||
|
||||
'GeneralApp',
|
||||
'AuthApp',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@@ -137,6 +142,31 @@ STATICFILES_DIRS = [
|
||||
BASE_DIR / "static",
|
||||
]
|
||||
|
||||
|
||||
import os
|
||||
LOCALE_PATHS = (
|
||||
os.path.join(BASE_DIR,'locale'),
|
||||
)
|
||||
|
||||
|
||||
gettext = lambda s: s
|
||||
LANGUAGES = (
|
||||
(u'ru', gettext(u'Russian')),
|
||||
(u'en', gettext(u'English')),
|
||||
)
|
||||
MODELTRANSLATION_LANGUAGES = ('ru', 'en')
|
||||
MODELTRANSLATION_ENABLE_FALLBACKS = True
|
||||
MODELTRANSLATION_FALLBACK_LANGUAGES = {
|
||||
'default': ('ru','en'),
|
||||
}
|
||||
|
||||
# Add custom languages not provided by Django
|
||||
import django.conf.locale
|
||||
LANG_INFO = dict(django.conf.locale.LANG_INFO.items()) #+ EXTRA_LANG_INFO.items())
|
||||
django.conf.locale.LANG_INFO = LANG_INFO
|
||||
|
||||
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
|
||||
|
||||
|
||||
11
TWB/urls.py
11
TWB/urls.py
@@ -8,6 +8,15 @@ urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('ckeditor/', include('ckeditor_uploader.urls')),
|
||||
|
||||
path('', include('GeneralApp.urls')),
|
||||
# path('', include('GeneralApp.urls')),
|
||||
]
|
||||
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
urlpatterns += i18n_patterns(
|
||||
path('admin/', admin.site.urls),
|
||||
|
||||
path('', include('GeneralApp.urls')),
|
||||
|
||||
)
|
||||
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
Reference in New Issue
Block a user