Skip to content

Commit ea7b9c5

Browse files
committed
Wired homepage URL
1 parent 57cff59 commit ea7b9c5

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.gondor
22
pythonkc.kpf
3+
*.pyc

pythonkc_site/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Django settings for pythonkc_site project.
22

3+
import os
4+
35
DEBUG = True
46
TEMPLATE_DEBUG = DEBUG
57

@@ -103,6 +105,7 @@
103105
ROOT_URLCONF = 'pythonkc_site.urls'
104106

105107
TEMPLATE_DIRS = (
108+
os.path.join(os.path.abspath(os.path.dirname(__file__)), 'templates'),
106109
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
107110
# Always use forward slashes, even on Windows.
108111
# Don't forget to use absolute paths, not relative paths.

pythonkc_site/urls.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
from django.conf.urls.defaults import patterns, include, url
1+
from django.conf.urls.defaults import include
2+
from django.conf.urls.defaults import patterns
3+
from django.conf.urls.defaults import url
4+
from django.views.generic.simple import direct_to_template
25

36
# Uncomment the next two lines to enable the admin:
47
# from django.contrib import admin
58
# admin.autodiscover()
69

710
urlpatterns = patterns('',
11+
url(r'^/?$', direct_to_template, {'template': 'index.html'}),
812
# Examples:
913
# url(r'^$', 'pythonkc_site.views.home', name='home'),
1014
# url(r'^pythonkc_site/', include('pythonkc_site.foo.urls')),

0 commit comments

Comments
 (0)