diff --git a/project/pages/views.py b/project/pages/views.py index da8d0f9..9ad1f5a 100644 --- a/project/pages/views.py +++ b/project/pages/views.py @@ -6,11 +6,6 @@ from django.contrib.staticfiles.templatetags.staticfiles import static class IndexView(TemplateView): template_name = 'index.html' - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - context['body_class'] = "index" - return context - class NoJavascriptView(TemplateView): template_name = 'core/no-js.html' @@ -18,12 +13,6 @@ class NoJavascriptView(TemplateView): class Custom404View(CustomHeaderBG.Template): template_name = 'core/404.html' - header_BG = static('img/ninjas.png') - - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - context['no_footer'] = True - return context def get(self, request, *args, **kwargs): context = self.get_context_data(**kwargs) @@ -32,7 +21,6 @@ class Custom404View(CustomHeaderBG.Template): class AboutWebsiteView(CustomHeaderBG.Template): template_name = 'about/website.html' - header_BG = '' class AboutIndexView(TemplateView): diff --git a/project/urls.py b/project/urls.py index cf16cdb..389e6be 100644 --- a/project/urls.py +++ b/project/urls.py @@ -1,10 +1,14 @@ from django.conf.urls import include, url +from django.views.generic import TemplateView from django.contrib import admin from project.pages.views import Custom404View + urlpatterns = [ url(r'^site-admin/', include(admin.site.urls)), + url(r'^404/', TemplateView.as_view(template_name='core/404.html')), url(r'', include('project.pages.urls', namespace='pages')) ] + handler404 = Custom404View diff --git a/templates/base.html b/templates/base.html index 25727c1..6c4a93b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -9,7 +9,7 @@ - + {% block content%}{% endblock %}