Added heroes app to settings, created views, urls-willowisp, urls-heroes.

parent f9d7be35
Pipeline #828 canceled with stages
from django.conf.urls import urls
from .views import HomeListView, CloudDetailView, JesterDetailView, SunfloweDetailView
urlpatterns = [
url(r'^$', HomeListView.as_view(), name='home'),
url(r'^cloud/$', CloudDetailView.as_view(), name='detail_cloud'),
url(r'^jester/$', JesterDetailView.as_view(), name='detail_jester'),
url(r'^sunflowey/$', SunfloweyDetailView.as_view(), name='detail_sunflowey'),
]
from django.shortcuts import render from django.shortcuts import render
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
# Create your views here. # Create your views here.
class HomeView(TemplateView):
template_name = "home.html"
class CloudDetailView(DetailView):
template_name = "detail_cloud.html"
class JesterDetailView(DetailView):
template_name = "detail_jester.html"
class SunfloweyDetailView(DetailView):
template_name = "detail_sunflowey.html"
\ No newline at end of file
...@@ -37,6 +37,7 @@ INSTALLED_APPS = [ ...@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'heroes'
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -13,9 +13,10 @@ Including another URLconf ...@@ -13,9 +13,10 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include 1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
""" """
from django.conf.urls import url from django.conf.urls import include, url
from django.contrib import admin 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