Skip to content

Commit

Permalink
Basic project config.
Browse files Browse the repository at this point in the history
  • Loading branch information
rz committed Aug 5, 2010
1 parent b2bd286 commit 681fc46
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
Empty file added apps/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 6 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 = (
Expand All @@ -91,4 +95,6 @@
'django.contrib.messages',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',

'django_extensions',
)
9 changes: 9 additions & 0 deletions templates/homepage.html
Original file line number Diff line number Diff line change
@@ -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>
2 changes: 1 addition & 1 deletion urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
Expand Down

0 comments on commit 681fc46

Please sign in to comment.