Refactoring - we don't actually need separate mil app
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 15 Oct 2013 08:43:22 +0000 (10:43 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 22 Oct 2013 07:49:47 +0000 (09:49 +0200)
12 files changed:
curriculum/templates/curriculum/competence_detail.html
curriculum/templates/curriculum/competence_list.html
edumed/milurls.py [new file with mode: 0644]
edumed/settings.d/20-basic.py
edumed/settings.d/30-apps.py
edumed/templates/base_mil.html [new file with mode: 0644]
edumed/templates/home_mil.html [new file with mode: 0644]
edumed/views.py
mil/__init__.py [deleted file]
mil/templates/mil/base.html [deleted file]
mil/urls.py [deleted file]
mil/views.py [deleted file]

index d850f31..20125ff 100755 (executable)
@@ -1,4 +1,4 @@
-{% extends "mil/base.html" %}
+{% extends "base_mil.html" %}
 
 {% block title %}{{ object }}{% endblock %}
 
index 8b1de32..499e316 100755 (executable)
@@ -1,4 +1,4 @@
-{% extends "mil/base.html" %}
+{% extends "base_mil.html" %}
 {% load chunks %}
 
 {% block title %}Katalog kompetencji medialnych i informacyjnych{% endblock %}
diff --git a/edumed/milurls.py b/edumed/milurls.py
new file mode 100644 (file)
index 0000000..c2f375a
--- /dev/null
@@ -0,0 +1,11 @@
+from django.conf.urls import patterns, include, url
+from .views import MILHomeView
+
+
+urlpatterns = patterns('',
+    url(r'^$', MILHomeView.as_view(), name="mil_home"),
+    url(r'^kompetencje/', include('curriculum.urls')),
+)
+
+
+
index 340a94c..9d0a384 100644 (file)
@@ -25,7 +25,7 @@ ROOT_URLCONF = 'edumed.urls'
 
 SUBDOMAIN_URLCONFS = {
     None: 'edumed.urls',
-    'katalog': 'mil.urls',
+    'katalog': 'edumed.milurls',
 }
 
 # Python dotted path to the WSGI application used by Django's runserver.
index f5d04e7..1f9fdb8 100644 (file)
@@ -2,7 +2,6 @@ INSTALLED_APPS = (
     'edumed',
     'curriculum',
     'catalogue',
-    'mil',
 
     'fnpdjango',
     'south',
diff --git a/edumed/templates/base_mil.html b/edumed/templates/base_mil.html
new file mode 100644 (file)
index 0000000..d48be10
--- /dev/null
@@ -0,0 +1,10 @@
+{% extends "base_super.html" %}
+{% load subdomainurls %}
+
+{% block top_navigation %}
+    <li><a class="menu-wspolpraca" href="{% url "mil_home" %}">Konsultacje</a></li>
+        <li><a class="menu-kompetencje" href="{% url "curriculum" %}">Kompetencje</a></li>
+        <li><a class="menu-wspolpraca" href="">Weź udział</a></li>
+        <li><a class="menu-lekcje" href="{% url 'home' subdomain=None %}">Materiały edukacyjne</a></li>
+        <li><a class="menu-kontakt" href="">Kontakt</a></li>
+{% endblock %}
diff --git a/edumed/templates/home_mil.html b/edumed/templates/home_mil.html
new file mode 100644 (file)
index 0000000..4bfb581
--- /dev/null
@@ -0,0 +1,5 @@
+{% extends "base_mil.html" }
+
+{% block body %}
+mil
+{% endblock %}
index bde67ef..7d4818d 100755 (executable)
@@ -14,5 +14,10 @@ class HomeView(TemplateView):
         context['package_student_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE_STUDENT)
         return context
 
+
+class MILHomeView(TemplateView):
+    template_name = 'base_mil.html'
+
+
 class AvatarlessProfileEditView(ProfileEditView):
     form_class = AvatarlessEditProfileForm
diff --git a/mil/__init__.py b/mil/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/mil/templates/mil/base.html b/mil/templates/mil/base.html
deleted file mode 100644 (file)
index c7c9cfd..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends "base_super.html" %}
-{% load subdomainurls %}
-
-    {% block top_navigation %}
-    <li><a class="menu-wspolpraca" href="">Konsultacje</a></li>
-        <li><a class="menu-kompetencje" href="{% url "curriculum" %}">Kompetencje</a></li>
-        <li><a class="menu-wspolpraca" href="">Weź udział</a></li>
-        <li><a class="menu-lekcje" href="{% url 'home' subdomain=None %}">Materiały edukacyjne</a></li>
-        <li><a class="menu-kontakt" href="">Kontakt</a></li>
-{% endblock %}
-
-{% block body %}
-mil
-{% endblock %}
\ No newline at end of file
diff --git a/mil/urls.py b/mil/urls.py
deleted file mode 100644 (file)
index 7f77523..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-from django.conf.urls import patterns, include, url
-from .views import root
-
-
-urlpatterns = patterns('',
-    url(r'^$', root, name="root"),
-    url(r'^kompetencje/', include('curriculum.urls')),
-)
diff --git a/mil/views.py b/mil/views.py
deleted file mode 100644 (file)
index b72a8d9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from django.http import HttpResponse
-from django.shortcuts import render
-
-
-def root(request):
-    return render(request, 'mil/base.html')