Commit 8d5a0d0e authored by jiroto26's avatar jiroto26

edited url.py, made a template folder, and edited views.py

parent 5288ebb4
Pipeline #949 canceled with stages
<html></html>
\ No newline at end of file
from django.conf.urls import url
from django.contrib import admin
from .views import HeroesView, HeroCloud, HeroSunflowey, HeroJester
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^heroes$', HeroesView.as_view(), name='heroes'),
url(r'^hero/cloud$', HeroCloud.as_view(), name='hero/cloud'),
url(r'^hero/sunflowey$', HeroSunflowey.as_view(), name='hero/sunflowey'),
url(r'^hero/jester$',HeroJester.as_view(), name='hero/jester'),
]
\ No newline at end of file
from django.shortcuts import render from django.shortcuts import render
class HeroesView(TemplateView):
template_name = "page.html"
class HeroCloud(TemplateView):
template_name = "detail_cloud.html"
class HeroSunflowey(TemplateView):
template_name = "detail_sunflowey.html"
class HeroJester(TemplateView):
template_name = "detail_jester.html"
# Create your views here. # Create your views here.
...@@ -18,4 +18,5 @@ from django.contrib import admin ...@@ -18,4 +18,5 @@ from django.contrib import admin
urlpatterns = [ urlpatterns = [
url(r'^admin/', admin.site.urls), url(r'^admin/', admin.site.urls),
url(r'', include('heroes.urls')),
] ]
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