Commit ec1b4b47 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos
Browse files

Updated settings.py.dist and urls.py.dist

parent 4387d198
......@@ -29,7 +29,7 @@ class ServiceLocAdmin(admin.ModelAdmin):
class RealmInLine(admin.ModelAdmin):
inlines = [
UrlInline,
UrlInline, NameInline
]
......
......@@ -6,7 +6,7 @@ TEMPLATE_DEBUG = DEBUG
here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x)
ADMINS = (
('Admin','admin@example.com'),
('Admin', 'admin@example.com'),
)
MANAGERS = ADMINS
......@@ -42,7 +42,7 @@ LANGUAGES = (
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'en'
SITE_ID = 1
......@@ -63,7 +63,7 @@ MEDIA_ROOT = ''
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
STATIC_URL = '/path/to/static/'
STATIC_URL = '/example/static'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
......@@ -73,6 +73,13 @@ ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'x)gmuyo2h=l@tmpyh4b(-!gki%@u$-=3^@z+vf&&!ci7$*!+k9'
AUTHENTICATION_BACKENDS = (
'eduroam.djangobackends.shibauthBackend.shibauthBackend',
'django.contrib.auth.backends.ModelBackend',
)
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
......@@ -91,39 +98,69 @@ TEMPLATE_CONTEXT_PROCESSORS = (
)
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.gzip.GZipMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware'
)
ROOT_URLCONF = 'eduroam.urls'
TEMPLATE_DIRS = (
"/path/to/templaltes/"
"/example/templates"
# 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.
)
INSTALLED_APPS = (
'longerusername',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.flatpages',
'django.contrib.markup',
'django.contrib.admin',
'django.contrib.admindocs',
'edumanage',
'accounts',
'south',
'registration',
'django_extensions',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
'tinymce',
)
AUTH_PROFILE_MODULE = 'accounts.UserProfile'
LOGIN_URL = '/login/'
KML_FILE = here('all.kml')
SHIB_AUTH_ENTITLEMENT = 'urn:mace:'
SHIB_LOGOUT_URL = 'https://example.com/Logout'
SERVER_EMAIL = "eduroam Service <noreply@example.com>"
EMAIL_SUBJECT_PREFIX = "[eduroam] "
ACCOUNT_ACTIVATION_DAYS = 7
NOTIFY_ADMIN_MAILS = ["mail1@example.com", "mail2@example.com"]
TINYMCE_JS_URL = '/static/js/tinymce/tiny_mce.js'
TINYMCE_DEFAULT_CONFIG = {
'extended_valid_elements' : 'iframe[src|width|height|name|align]',
'plugins': "table,spellchecker,paste,searchreplace",
'theme': "advanced",
}
CACHE_BACKEND = 'dummy://'
from django.conf.urls.defaults import *
from django.conf import settings
from django.views.generic.simple import direct_to_template
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
(r'^setlang/?$', 'django.views.i18n.set_language'),
(r'', include('eduroam.edumanage.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
url(r'^login/?', 'eduroam.edumanage.views.user_login', name="login"),
url(r'^logout/?', 'django.contrib.auth.views.logout', {'next_page': '/'}, name="logout"),
url(r'^registration/accounts/activate/(?P<activation_key>\w+)/$', 'accounts.views.activate', name='activate_account'),
url(r'^registration/activate/complete/$',
direct_to_template,
{ 'template': 'registration/activation_complete.html' },
name='registration_activation_complete'),
(r'^tinymce/', include('tinymce.urls')),
)
urlpatterns += patterns('edumanage.views',
url(r'^$', 'index', name="index"),
url(r'^geolocate/?$', 'geolocate', name="geolocate"),
url(r'^closest/?$', 'closest', name="closest"),
url(r'^world/?$', 'world', name="world"),
url(r'^worldpoints/?$', 'worldPoints', name="worldPoints"),
url(r'^participants/?$', 'participants', name="participants"),
url(r'^general/institution.xml', "instxml", name="instxml"),
url(r'^general/realm.xml', "realmxml", name="realmxml"),
url(r'^general/realm_data.xml', "realmdataxml", name="realmdataxml"),
url(r'^manage/?$', 'manage', name="manage"),
url(r'^manage/institutions/?$', 'institutions', name="institutions"),
url(r'^manage/institution/edit/(?P<institution_pk>\d+)?$', 'add_institution_details', name="edit-institution"),
url(r'^manage/services/(?P<service_pk>\d+)?$', 'services', name="services"),
url(r'^manage/services/del/?$', 'del_service', name="del-service"),
url(r'^manage/services/edit/(?P<service_pk>\d+)?$', 'add_services', name="edit-services"),
url(r'^manage/services/points/?$', 'get_service_points', name="get-service-points"),
url(r'^manage/services/allpoints/?$', 'get_all_services', name="get-all-services"),
url(r'^manage/servers/(?P<server_pk>\d+)?$', 'servers', name="servers"),
url(r'^manage/servers/del/?$', 'del_server', name="del-server"),
url(r'^manage/servers/edit/(?P<server_pk>\d+)?$', 'add_server', name="edit-servers"),
url(r'^manage/realms/?$', 'realms', name="realms"),
url(r'^manage/realms/edit/(?P<realm_pk>\d+)?$', 'add_realm', name="edit-realms"),
url(r'^manage/realms/del/?$', 'del_realm', name="del-realm"),
url(r'^manage/contacts/?$', 'contacts', name="contacts"),
url(r'^manage/contacts/edit/(?P<contact_pk>\d+)?$', 'add_contact', name="edit-contacts"),
url(r'^manage/contacts/del/?$', 'del_contact', name="del-contact"),
url(r'^manage/adduser/?$', 'adduser', name="adduser"),
url(r'^manage/selectinst/?$', 'selectinst', name="selectinst"),
)
if settings.DEBUG:
urlpatterns += patterns('',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment