From: Aleksander Łukasz Date: Tue, 15 Oct 2013 08:43:22 +0000 (+0200) Subject: Refactoring - we don't actually need separate mil app X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/ed0db62b6d7a88e7a7862d8abf8976a3d58f3f17?hp=0d33408e25b006f9d87d3e963dbcc1c40bfb4903 Refactoring - we don't actually need separate mil app --- diff --git a/curriculum/templates/curriculum/competence_detail.html b/curriculum/templates/curriculum/competence_detail.html index d850f31..20125ff 100755 --- a/curriculum/templates/curriculum/competence_detail.html +++ b/curriculum/templates/curriculum/competence_detail.html @@ -1,4 +1,4 @@ -{% extends "mil/base.html" %} +{% extends "base_mil.html" %} {% block title %}{{ object }}{% endblock %} diff --git a/curriculum/templates/curriculum/competence_list.html b/curriculum/templates/curriculum/competence_list.html index 8b1de32..499e316 100755 --- a/curriculum/templates/curriculum/competence_list.html +++ b/curriculum/templates/curriculum/competence_list.html @@ -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 index 0000000..c2f375a --- /dev/null +++ b/edumed/milurls.py @@ -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')), +) + + + diff --git a/edumed/settings.d/20-basic.py b/edumed/settings.d/20-basic.py index 340a94c..9d0a384 100644 --- a/edumed/settings.d/20-basic.py +++ b/edumed/settings.d/20-basic.py @@ -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. diff --git a/edumed/settings.d/30-apps.py b/edumed/settings.d/30-apps.py index f5d04e7..1f9fdb8 100644 --- a/edumed/settings.d/30-apps.py +++ b/edumed/settings.d/30-apps.py @@ -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 index 0000000..d48be10 --- /dev/null +++ b/edumed/templates/base_mil.html @@ -0,0 +1,10 @@ +{% extends "base_super.html" %} +{% load subdomainurls %} + +{% block top_navigation %} +
  • Konsultacje
  • +
  • Kompetencje
  • +
  • Weź udział
  • +
  • Materiały edukacyjne
  • +
  • Kontakt
  • +{% endblock %} diff --git a/edumed/templates/home_mil.html b/edumed/templates/home_mil.html new file mode 100644 index 0000000..4bfb581 --- /dev/null +++ b/edumed/templates/home_mil.html @@ -0,0 +1,5 @@ +{% extends "base_mil.html" } + +{% block body %} +mil +{% endblock %} diff --git a/edumed/views.py b/edumed/views.py index bde67ef..7d4818d 100755 --- a/edumed/views.py +++ b/edumed/views.py @@ -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 index e69de29..0000000 diff --git a/mil/templates/mil/base.html b/mil/templates/mil/base.html deleted file mode 100644 index c7c9cfd..0000000 --- a/mil/templates/mil/base.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base_super.html" %} -{% load subdomainurls %} - - {% block top_navigation %} -
  • Konsultacje
  • -
  • Kompetencje
  • -
  • Weź udział
  • -
  • Materiały edukacyjne
  • -
  • Kontakt
  • -{% 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 index 7f77523..0000000 --- a/mil/urls.py +++ /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 index b72a8d9..0000000 --- a/mil/views.py +++ /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')