hello world view

This commit is contained in:
Stephen McQuay 2013-04-23 17:47:15 -07:00
parent 6887b541ca
commit d082426011
3 changed files with 17 additions and 14 deletions

View File

@ -11,13 +11,8 @@ MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER': '',
'PASSWORD': '',
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '', # Set to empty string for default.
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/tmp/mmg.sqlite',
}
}
@ -72,6 +67,7 @@ STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'/Users/smcquay/src/mmg/static'
)
# List of finder classes that know how to find static files in
@ -79,17 +75,17 @@ STATICFILES_DIRS = (
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
# django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = '^%a!u#@ah!bqd#$k0pdcueapf0_35zbqp)flvd5sm-1=0k)=!v'
SECRET_KEY = '!i+jabjnt5nkb(twj$fvuu-%&$z&)j6bm$a2sfszyy-s1oc5&7'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
@ -108,7 +104,8 @@ ROOT_URLCONF = 'mmg.urls'
WSGI_APPLICATION = 'mmg.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# 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.
)

View File

@ -1,12 +1,13 @@
from django.conf.urls import patterns, include, url
from django.conf.urls import patterns, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
urlpatterns = patterns(
'',
# Examples:
# url(r'^$', 'mmg.views.home', name='home'),
url(r'^$', 'mmg.views.home', name='home'),
# url(r'^mmg/', include('mmg.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:

5
mmg/views.py Normal file
View File

@ -0,0 +1,5 @@
from django.http import HttpResponse
def home(request):
return HttpResponse('world')