From b233e3ea900162273366cda3c17a0eb6741da140 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 27 Jul 2014 19:46:43 +0200 Subject: [PATCH] [TASK] Restructure views, add more urls. --- citavi_mapper/urls.py | 6 ++-- frontend/static/images/logo.png | Bin 8681 -> 1539 bytes frontend/templates/base.html | 42 ---------------------------- frontend/templates/index.html | 7 +++++ frontend/templates/layout/base.html | 40 ++++++++++++++++++++++++++ frontend/templates/login.html | 6 ++++ frontend/templates/register.html | 6 ++++ frontend/views.py | 25 +++++++++++++---- 8 files changed, 82 insertions(+), 50 deletions(-) delete mode 100644 frontend/templates/base.html create mode 100644 frontend/templates/index.html create mode 100644 frontend/templates/layout/base.html create mode 100644 frontend/templates/login.html create mode 100644 frontend/templates/register.html diff --git a/citavi_mapper/urls.py b/citavi_mapper/urls.py index 22bad4a..7367d47 100644 --- a/citavi_mapper/urls.py +++ b/citavi_mapper/urls.py @@ -5,12 +5,14 @@ from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() -from frontend.views import MainSite +from frontend.views import IndexView, RegisterView, LoginView urlpatterns = patterns('', # Examples: # url(r'^$', 'citavi_mapper.views.home', name='home'), # url(r'^blog/', include('blog.urls')), - url(r'^$', MainSite.as_view(), name='frontend-index'), + url(r'^$', IndexView.as_view(), name='frontend-index'), + url(r'^register/', RegisterView.as_view(), name='frontend-register'), + url(r'^login/', LoginView.as_view(), name='frontend-login'), url(r'^admin/', include(admin.site.urls)), ) \ No newline at end of file diff --git a/frontend/static/images/logo.png b/frontend/static/images/logo.png index b3e43dc379fada85a4a14c05fb2c95c4e9d1e036..5fcc0bf5de23f37306486a5eb3d95e6ddfd54027 100644 GIT binary patch literal 1539 zcmV+e2K@PnP)@=7JR7zD;0c}AQm!dvZNJu=O3J`td0fCTsLjuGTPe||rZ-q*{R$N{{RDEfY zC=jY7O&|$vZCbCl@nv^sXZFmw@G$GO*V#J6-ip68+STlt`F`g+-}j$0E1YwV|D*i> zb)a+5yxn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Wo>sJ>L9zW{$a*i9Iga7<-Zu!BuA3GfikcMIUERR!6|O*-pe|Y7S6F zic@cR>0U+;20$~zXm-Wv@KrY!35J{0vS^8;V1YcUP^y%{d~!s3^}>IdLvyc$;;>0a z-fz^&x{30x@>jA-4j}cC*9v%DKaP$j8~0%jX>2NRWVhsax+(KU%Pg)CRr?M zA~>^!-z2d=uoHusU&Z~?6is+*>8!d!_l|h)&&)V<8Afnj=0y;p!~B;4xQtWoT>I?T zLBYT2A&ZA$CwgHJGls3N0~XG9|72nXQwZ7k|9hjzPOlOnp5$jm2j6)pBWrN1Mz;JGR@g0qRM}9W@(a*VZ*n!UAnN#O&)hzj!sI8 z+$JA&>R7gAsBBET3(9}m`X!>k0nKnW{2g7+UX@>Ne~E#xl(kCz8~YRaC;dsoCW)V@ zlec7bsSLT20EwIc$pb1`X~b4@B~;TT_3ekl>f|#jf4)?iSd4P2toCX=J;0I^!P1zC z@mOd`O7bW*=hx-eaL!9iax5vO?$-Z!F6+=#5Yqf9cac;t89>}B!i7g6jyI*79C=cIvBcfFg(b=S;^<6Y*dhi1d~8xgA5iUwFvS%bF{ z*((xLX)kaWO;|!Y;`w-LgG_mAJM)T)ZU&p@?+$s&I!l>~TgiJ_os|Hqddt?`Y+&Vg z2SxaVCn1u^qr=tfa*k+~nqeuNGm}d4{Q#nszmBl>RIFYkhVQS5!dMZ1(vO*~59$?^ zTJ$n{lf3%V%7GH%9KG#WybYFM)$ed&)!oz@#iBQsAD2xTELNY>h-VrQ zVB^1+`uUlSu7YqeN32=LGB;j@8RG2Y(0u7U^mwK9Ez0#`7T(RXCSpR2s#`vf0=I;H zU1lE(R+~-$q#FLzdUe4tN;;Z3P-pf_kJz5CP-o>R<*19p8aCOf*-$|@D5%rf@gn4Z zH;4VRFdJ)Uk`-ZH5Go02_zFEP&HCcW7D}z^!g}K<{9 diff --git a/frontend/templates/base.html b/frontend/templates/base.html deleted file mode 100644 index 4709f62..0000000 --- a/frontend/templates/base.html +++ /dev/null @@ -1,42 +0,0 @@ -{% load staticfiles compressed %} - - - - - - - - {% block title %}Citavi Mapper :: {{title}}{% endblock %} - - - {% compressed_css 'bootstrap' %} - {% compressed_js 'bootstrap' %} - - - - -
- {% block content %}{% endblock %} -
- - - \ No newline at end of file diff --git a/frontend/templates/index.html b/frontend/templates/index.html new file mode 100644 index 0000000..556feaf --- /dev/null +++ b/frontend/templates/index.html @@ -0,0 +1,7 @@ +{% extends "layout/base.html" %} +{% block content %} +

+ Welcome to Citavi Mapper!
+ Feel free to discover. +

+{% endblock %} \ No newline at end of file diff --git a/frontend/templates/layout/base.html b/frontend/templates/layout/base.html new file mode 100644 index 0000000..66a573b --- /dev/null +++ b/frontend/templates/layout/base.html @@ -0,0 +1,40 @@ +{% load staticfiles compressed %} + + + + + + + + {% block title %}{{page_name}} :: {{page_title}}{% endblock %} + + {% compressed_css 'bootstrap' %} + {% compressed_js 'bootstrap' %} + + + + + +
+ {% block content %}{% endblock %} +
+ + + \ No newline at end of file diff --git a/frontend/templates/login.html b/frontend/templates/login.html new file mode 100644 index 0000000..7e293b9 --- /dev/null +++ b/frontend/templates/login.html @@ -0,0 +1,6 @@ +{% extends "layout/base.html" %} +{% block content %} +

+ LOGIN FORM HERE +

+{% endblock %} \ No newline at end of file diff --git a/frontend/templates/register.html b/frontend/templates/register.html new file mode 100644 index 0000000..bb1b002 --- /dev/null +++ b/frontend/templates/register.html @@ -0,0 +1,6 @@ +{% extends "layout/base.html" %} +{% block content %} +

+ REGISTER FORM HERE +

+{% endblock %} \ No newline at end of file diff --git a/frontend/views.py b/frontend/views.py index 55b9c83..67bc9a4 100644 --- a/frontend/views.py +++ b/frontend/views.py @@ -2,16 +2,29 @@ from django.views.generic import TemplateView -class MainSite(TemplateView): +class BaseSiteView(TemplateView): template_name = "base.html" + page_name = "Citavi Mapper" + page_title = "BASE" def get(self, request, **kwargs): self._request = request - return super(MainSite, self).get(request, **kwargs) + return super(BaseSiteView, self).get(request, **kwargs) def get_context_data(self, **kwargs): - context = super(MainSite, self).get_context_data(**kwargs) - context['title'] = 'Titeltest' - context['content'] = 'Foobar!' - context['headline'] = 'Yo!' + context = super(BaseSiteView, self).get_context_data(**kwargs) + context['page_name'] = self.page_name + context['page_title'] = self.page_title return context + +class IndexView(BaseSiteView): + template_name = "index.html" + page_title = "Index" + +class RegisterView(BaseSiteView): + template_name = "register.html" + page_title = "Register" + +class LoginView(BaseSiteView): + template_name = "login.html" + page_title = "Login"