Created
December 4, 2012 15:48
-
-
Save pije76/4205358 to your computer and use it in GitHub Desktop.
class2go
This file contains hidden or 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
TIME_ZONE = 'Asia/Riyadh' | |
LANGUAGE_CODE = 'ar' | |
ugettext = lambda s: s | |
LANGUAGES = ( | |
('ar', ugettext('Arabic')), | |
('en', ugettext('English')), | |
) | |
USE_I18N = True | |
MIDDLEWARE_CLASSES = ( | |
'localeurl.middleware.LocaleURLMiddleware', | |
'django.contrib.sessions.middleware.SessionMiddleware', | |
'django.middleware.locale.LocaleMiddleware', | |
'django.middleware.common.CommonMiddleware', | |
... | |
) | |
TEMPLATE_CONTEXT_PROCESSORS = ( | |
'django.contrib.auth.context_processors.auth', | |
'django.core.context_processors.request', | |
'django.core.context_processors.static', | |
'django.contrib.messages.context_processors.messages', | |
'django.core.context_processors.i18n', | |
) | |
INSTALLED_APPS = ( | |
... | |
'localeurl', | |
) | |
#LOCALE_INDEPENDENT_PATHS = ( | |
# re.compile('^/$'), | |
# re.compile('^/courses/'), | |
#) | |
LOCALE_INDEPENDENT_MEDIA_URL = True | |
LOCALE_INDEPENDENT_STATIC_URL = True | |
PREFIX_DEFAULT_LOCALE = True | |
LOCALEURL_USE_ACCEPT_LANGUAGE = True | |
LOCALE_REDIRECT_PERMANENT = True |
This file contains hidden or 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
from django.conf.urls.defaults import patterns, include, url | |
from django.views.generic.simple import redirect_to | |
from django.conf import settings | |
# Uncomment the next two lines to enable the admin: | |
from django.contrib import admin | |
admin.autodiscover() | |
urlpatterns = patterns('', | |
... | |
(r'^localeurl/', include('localeurl.urls')), | |
... | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment