Starting with mil app
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 14 Oct 2013 15:06:05 +0000 (17:06 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 14 Oct 2013 15:06:05 +0000 (17:06 +0200)
edumed/settings.d/20-basic.py
edumed/settings.d/40-middleware.py
mil/__init__.py [new file with mode: 0644]
mil/urls.py [new file with mode: 0644]
mil/views.py [new file with mode: 0644]
requirements.txt

index 3c900c8..340a94c 100644 (file)
@@ -23,6 +23,11 @@ TEMPLATE_LOADERS = (
 
 ROOT_URLCONF = 'edumed.urls'
 
+SUBDOMAIN_URLCONFS = {
+    None: 'edumed.urls',
+    'katalog': 'mil.urls',
+}
+
 # Python dotted path to the WSGI application used by Django's runserver.
 WSGI_APPLICATION = 'edumed.wsgi.application'
 
index b9c614d..998b707 100644 (file)
@@ -3,6 +3,7 @@ MIDDLEWARE_CLASSES = tuple(x for x in (
     'django.contrib.sessions.middleware.SessionMiddleware'
             if "django.contrib.sessions" in INSTALLED_APPS else None,
     #'django.middleware.locale.LocaleMiddleware',
+    'subdomains.middleware.SubdomainURLRoutingMiddleware',
     'fnpdjango.middleware.URLLocaleMiddleware',
 
     'django.middleware.common.CommonMiddleware',
diff --git a/mil/__init__.py b/mil/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/mil/urls.py b/mil/urls.py
new file mode 100644 (file)
index 0000000..4f765de
--- /dev/null
@@ -0,0 +1,7 @@
+from django.conf.urls import patterns, include, url
+from .views import root
+
+
+urlpatterns = patterns('',
+    url(r'^$', root, name="root"),
+)
diff --git a/mil/views.py b/mil/views.py
new file mode 100644 (file)
index 0000000..5d7fcbf
--- /dev/null
@@ -0,0 +1,5 @@
+from django.http import HttpResponse
+
+
+def root(request):
+    return HttpResponse('mil')
\ No newline at end of file
index 49b1e28..1a8d1d6 100644 (file)
@@ -35,3 +35,4 @@ django-libravatar
 sorl-thumbnail>=11,<12
 pyyaml
 
+django-subdomains>=2.0.4,<2.1