Commit 0ba6722b authored by Alec Wang's avatar Alec Wang

created heroes urls and views

parent e7fb47dc
File added
from django.conf.urls import url from django.conf.urls import url
from .views import * from .views import *
urlpatterns = [ urlpatterns = [
url(r'^$', url(r'^heroes/$', heroes, name="heroes"),
url(r'^hero/cloud$', hero_cloud, name="hero_cloud"),
url(r'^hero/sunflowey$', hero_sunflowey, name="hero_sunflowey"),
url(r'^hero/jester$', hero_jester, name="hero_jester"),
] ]
...@@ -31,13 +31,13 @@ ALLOWED_HOSTS = [] ...@@ -31,13 +31,13 @@ ALLOWED_HOSTS = []
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
'heroes',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'heroes'
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -13,5 +13,10 @@ Including another URLconf ...@@ -13,5 +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
urlpatterns = [
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