Editing tests.py

parent 8414e41b
from django.conf.urls import url from django.conf.urls import url
from .views import HomeListView, CloudDetailView, JesterDetailView, SunfloweyDetailView from .views import HomeTemplateView, CloudTemplateView, JesterTemplateView, SunfloweyTemplateView
urlpatterns = [ urlpatterns = [
url(r'^$', HomeListView.as_view(), name='home'), url(r'^$', HomeTemplateView.as_view(), name='home'),
url(r'^hero/cloud/$', CloudDetailView.as_view(), name='detail_cloud'), url(r'^hero/cloud/$', CloudTemplateView.as_view(), name='detail_cloud'),
url(r'^hero/jester/$', JesterDetailView.as_view(), name='detail_jester'), url(r'^hero/jester/$', JesterTemplateView.as_view(), name='detail_jester'),
url(r'^hero/sunflowey/$', SunfloweyDetailView.as_view(), name='detail_sunflowey'), url(r'^hero/sunflowey/$', SunfloweyTemplateView.as_view(), name='detail_sunflowey'),
] ]
from django.shortcuts import render from django.shortcuts import render
from django.http import HttpResponse from django.http import HttpResponse
from django.views.generic.base import TemplateView from django.views.generic.base import TemplateView
from django.views.generic.list import ListView #from django.views.generic.list import ListView
#from django.views.generic.detail import DetailView
# Create your views here. # Create your views here.
class HomeListView(TemplateView): class HomeTemplateView(TemplateView):
template_name = 'home.html' template_name = 'home.html'
class CloudDetailView(TemplateView): class CloudTemplateView(TemplateView):
template_name = 'detail_cloud.html' template_name = 'detail_cloud.html'
class JesterDetailView(TemplateView): class JesterTemplateView(TemplateView):
template_name = 'detail_jester.html' template_name = 'detail_jester.html'
class SunfloweyDetailView(TemplateView): class SunfloweyTemplateView(TemplateView):
template_name = 'detail_sunflowey.html' template_name = 'detail_sunflowey.html'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment