Commit 2039c510 authored by Lance Michael O. Co's avatar Lance Michael O. Co 😢

second test urls

parent 2638ba33
<!-- heroes/templates/home.html -->
<html>
<title>To-Do heroes</title>
</html>
\ No newline at end of file
# This file is to be created inside the lists app folder
# lists/urls.py
# heroes/urls.py
from django.conf.urls import url
from .views import home_page
from .views import HomeView, HeroesView, CloudView, SunfloweyView, JesterView
urlpatterns = [
url(r'^$', home_page, name='home_page'),
url(r'^/$', HomeView, name='home'),
url(r'^/heroes/$', HeroesView, name='heroes'),
url(r'/hero/cloud/^$', CloudView, name='cloud'),
url(r'/hero/sunflowey/^$', SunfloweyView, name='sunflowey'),
url(r'/hero/jester/^$', JesterView, name='jester'),
]
\ No newline at end of file
# heroes/views.py
from django.views.generic.base import TemplateView
from django.views.generic.edit import CreateView
from django.shortcuts import render
class HomeView(TemplateView):
template_name = "home.html"
def home_page(request):
return render(request, 'home.html')
def detail_cloud(request):
return render(request, 'cloud.html')
class HeroesView(TemplateView):
template_name = "heroes.html"
def detail_sunflowey(request):
return render(request, 'sunflowey.html')
def detail_jester(request):
return render(request, 'jester.html')
class CloudView(TemplateView):
template_name = "cloud.html"
class SunfloweyView(TemplateView):
template_name = "sunflowey.html"
class JesterView(TemplateView):
template_name = "jester.html"
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