Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated views.py

  • Loading branch information...
commit 649b48e4749362f4d7795a3132a7cc9d455f478c 1 parent 55c86cf
@hypertexthero authored
Showing with 10 additions and 9 deletions.
  1. +10 −9 views.py
View
19 views.py
@@ -1,10 +1,11 @@
-# http://stackoverflow.com/questions/3402708/django-urls-straight-to-html-template/3402840#3402840
-from django.views.generic.simple import direct_to_template
-from django.http import Http404
+# Views file is not used since I am using the direct_to_template generic view in urls.py to create the mysite homepage. Keeping this here for future reference as an alternative way of doing the same thing with a view: http://stackoverflow.com/questions/3402708/django-urls-straight-to-html-template/3402840#3402840
-def home(request, home):
- # Use some exception handling, just to be safe
- try:
- return direct_to_template(request, '/' % (request, base.html))
- except TemplateDoesNotExist:
- raise Http404
+# from django.views.generic.simple import direct_to_template
+# from django.http import Http404
+#
+# def home(request, home):
+# # Use some exception handling, just to be safe
+# try:
+# return direct_to_template(request, '/' % (request, base.html))
+# except TemplateDoesNotExist:
+# raise Http404
Please sign in to comment.
Something went wrong with that request. Please try again.