Skip to content
Browse files

Basic project config.

  • Loading branch information...
1 parent b2bd286 commit 681fc46aef5717477c8c9f40371004ee322390e7 @rz rz committed Aug 5, 2010
Showing with 21 additions and 1 deletion.
  1. 0 apps/__init__.py
  2. +5 −0 manage.py
  3. +6 −0 settings.py
  4. +9 −0 templates/homepage.html
  5. +1 −1 urls.py
View
0 apps/__init__.py
No changes.
View
5 manage.py
@@ -1,5 +1,10 @@
#!/usr/bin/env python
from django.core.management import execute_manager
+
+# put apps dir in python path
+import sys, os
+sys.path.append(os.path.join(os.path.dirname(__file__), 'apps'))
+
try:
import settings # Assumed to be in the same directory.
except ImportError:
View
6 settings.py
@@ -1,4 +1,7 @@
# Django settings for hnofficehours project.
+import os.path
+
+PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -81,6 +84,7 @@
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
+ os.path.join(PROJECT_ROOT, 'templates')
)
INSTALLED_APPS = (
@@ -91,4 +95,6 @@
'django.contrib.messages',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
+
+ 'django_extensions',
)
View
9 templates/homepage.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+</head>
+<body>
+ <h1>HN Office Hours</h1>
+</body>
+</html>
View
2 urls.py
@@ -7,7 +7,7 @@
urlpatterns = patterns('',
# Example:
# (r'^hnofficehours/', include('hnofficehours.foo.urls')),
-
+ (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

0 comments on commit 681fc46

Please sign in to comment.
Something went wrong with that request. Please try again.