-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
103 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ generate_rst.py | |
build/ | ||
.coverage | ||
.cache | ||
*.sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', x) | ||
|
||
DEBUG = True | ||
TEMPLATE_DEBUG = DEBUG | ||
|
||
ADMINS = ( | ||
# ('Your Name', '[email protected]'), | ||
|
@@ -99,13 +98,6 @@ | |
# Make this unique, and don't share it with anybody. | ||
SECRET_KEY = 'x%u66q%jc7$&cy3%w2knw84tqc8i@e^9ag_f19w6ace@5a8jj0' | ||
|
||
# List of callables that know how to import templates from various sources. | ||
TEMPLATE_LOADERS = ( | ||
'django.template.loaders.filesystem.Loader', | ||
'django.template.loaders.app_directories.Loader', | ||
# 'django.template.loaders.eggs.Loader', | ||
) | ||
|
||
MIDDLEWARE_CLASSES = ( | ||
'django.middleware.common.CommonMiddleware', | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
|
@@ -117,29 +109,34 @@ | |
# 'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
) | ||
|
||
TEMPLATE_CONTEXT_PROCESSORS = ( | ||
"django.contrib.auth.context_processors.auth", | ||
"django.core.context_processors.debug", | ||
"django.core.context_processors.media", | ||
"django.core.context_processors.static", | ||
"django.core.context_processors.tz", | ||
"django.contrib.messages.context_processors.messages", | ||
"django.core.context_processors.request", | ||
'django.core.context_processors.i18n', | ||
'example.context_processors.solid_i18n', | ||
) | ||
|
||
ROOT_URLCONF = 'example.urls' | ||
|
||
# Python dotted path to the WSGI application used by Django's runserver. | ||
WSGI_APPLICATION = 'example.wsgi.application' | ||
|
||
TEMPLATE_DIRS = ( | ||
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". | ||
# Always use forward slashes, even on Windows. | ||
# Don't forget to use absolute paths, not relative paths. | ||
location('templates'), | ||
) | ||
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'APP_DIRS': True, | ||
'DIRS': [ | ||
location('templates'), | ||
], | ||
'OPTIONS': { | ||
'context_processors': [ | ||
'django.contrib.auth.context_processors.auth', | ||
'django.template.context_processors.debug', | ||
'django.template.context_processors.i18n', | ||
'django.template.context_processors.media', | ||
'django.template.context_processors.static', | ||
'django.template.context_processors.tz', | ||
'django.contrib.messages.context_processors.messages', | ||
'django.template.context_processors.request', | ||
'django.template.context_processors.i18n', | ||
'example.context_processors.solid_i18n', | ||
], | ||
}, | ||
}, | ||
] | ||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.auth', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
from django.conf.urls import patterns, url, include | ||
from solid_i18n.urls import solid_i18n_patterns | ||
from django.conf.urls import url, include | ||
from django.views.generic import TemplateView | ||
|
||
urlpatterns = solid_i18n_patterns('', | ||
from solid_i18n.urls import solid_i18n_patterns | ||
|
||
urlpatterns = solid_i18n_patterns( | ||
url(r'^$', TemplateView.as_view(template_name="home.html"), name='home'), | ||
url(r'^about/$', TemplateView.as_view(template_name="about.html"), | ||
name='about'), | ||
) | ||
|
||
# without i18n | ||
urlpatterns += patterns('', | ||
urlpatterns += [ | ||
url(r'^onelang/', TemplateView.as_view(template_name="onelang.html"), | ||
name='onelang'), | ||
url(r'^i18n/', include('django.conf.urls.i18n')), | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
from django.conf.urls import patterns, url, include | ||
from django.conf.urls import url, include | ||
from django.views.generic import TemplateView | ||
|
||
urlpatterns = patterns('', | ||
urlpatterns = [ | ||
url(r'^$', TemplateView.as_view(template_name="home.html"), name='home'), | ||
url(r'^about/$', TemplateView.as_view(template_name="about.html"), | ||
name='about'), | ||
) | ||
] | ||
|
||
urlpatterns += patterns('', | ||
urlpatterns += [ | ||
url(r'^onelang/', TemplateView.as_view(template_name="onelang.html"), | ||
name='onelang'), | ||
(r'^i18n/', include('django.conf.urls.i18n')), | ||
) | ||
url(r'^i18n/', include('django.conf.urls.i18n')), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
django>=1.8,<1.10 | ||
django>=1.8,<1.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters