Commit 1be59a33 authored by Alec Wang's avatar Alec Wang

fixed homepage to redirect to heroes directory

parent 3e74c1f4
...@@ -4,7 +4,7 @@ from django.conf.urls import include, url ...@@ -4,7 +4,7 @@ from django.conf.urls import include, url
from .views import * from .views import *
urlpatterns = [ urlpatterns = [
url(r'^$', heroes, name="home_page"), url(r'^$', home_page, name="home_page"),
url(r'^heroes/$', heroes, name="heroes"), url(r'^heroes/$', heroes, name="heroes"),
url(r'^hero/cloud$', hero_cloud, name="hero_cloud"), url(r'^hero/cloud$', hero_cloud, name="hero_cloud"),
url(r'^hero/sunflowey$', hero_sunflowey, name="hero_sunflowey"), url(r'^hero/sunflowey$', hero_sunflowey, name="hero_sunflowey"),
......
from django.shortcuts import render from django.shortcuts import render, redirect
from django.http import HttpResponse from django.http import HttpResponse
def home_page(request): def home_page(request):
return HttpResponse('<html><title>The Will of the Wisps Wiki</title></html>') return redirect('heroes')
def heroes(request): def heroes(request):
......
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