1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/project/pages/views.py

33 lines
802 B
Python
Raw Normal View History

2015-11-25 21:11:52 +00:00
from project.common.views import CustomTemplate
2015-10-19 13:04:49 +01:00
2015-11-25 21:11:52 +00:00
class IndexView(CustomTemplate):
2015-10-19 13:04:49 +01:00
template_name = 'index.html'
2015-11-25 21:11:52 +00:00
html_title = "Homepage"
body_class = "index"
2015-10-19 13:04:49 +01:00
2015-11-09 21:47:16 +00:00
2015-11-25 21:11:52 +00:00
class NoJavascriptView(CustomTemplate):
2015-10-19 13:04:49 +01:00
template_name = 'core/no-js.html'
2015-11-25 08:42:58 +00:00
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['no_js_redirect'] = True
return context
2015-10-19 13:04:49 +01:00
2015-11-25 21:11:52 +00:00
class Custom404View(CustomTemplate):
2015-10-19 13:04:49 +01:00
template_name = 'core/404.html'
def get(self, request, *args, **kwargs):
context = self.get_context_data(**kwargs)
return self.render_to_response(context, status=404)
2015-11-25 21:11:52 +00:00
class AboutWebsiteView(CustomTemplate):
2015-10-19 13:04:49 +01:00
template_name = 'about/website.html'
2015-11-25 21:11:52 +00:00
class AboutIndexView(CustomTemplate):
2015-11-23 18:50:14 +00:00
template_name = 'about/index.html'