Skip to content
This repository
  • 2 commits
  • 10 files changed
  • 0 comments
  • 1 contributor
5  README.md
Source Rendered
... ...
@@ -0,0 +1,5 @@
  1
+# To Run
  2
+
  3
+export PYTHONPATH=$PYTHONPATH:[moose's directory]
  4
+django-admin.py runserver --settings=settings
  5
+
5  moose/urls.py
@@ -4,9 +4,10 @@
4 4
 # from django.contrib import admin
5 5
 # admin.autodiscover()
6 6
 
7  
-urlpatterns = patterns('',
  7
+urlpatterns = patterns('moose.views',
8 8
     # Examples:
9  
-    url(r'^$', 'moose.views.home', name='home'),
  9
+    url(r'^$', 'home', name='home'),
  10
+    url(r'^feedback/$', 'feedback', name='feedback'),
10 11
     # url(r'^moose/', include('moose.foo.urls')),
11 12
 
12 13
     # Uncomment the admin/doc line below to enable admin documentation:
BIN  moose/urls.pyc
Binary file not shown
7  moose/views.py
@@ -4,3 +4,10 @@
4 4
 from django.template import RequestContext, loader
5 5
 from django.conf import settings
6 6
 from django.db.models import F
  7
+
  8
+
  9
+def home(request):
  10
+    return feedback(request)
  11
+
  12
+def feedback(request):
  13
+    return render_to_response('feedback.html', {}, context_instance=RequestContext(request))
1  moose/wsgi.py
@@ -16,6 +16,7 @@
16 16
 import os
17 17
 
18 18
 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "moose.settings")
  19
+from moose.settings import *
19 20
 
20 21
 # This application object is used by any WSGI server configured to use this
21 22
 # file. This includes Django's development server, if the WSGI_APPLICATION
BIN  moose/wsgi.pyc
Binary file not shown
36  private_settings.template
... ...
@@ -0,0 +1,36 @@
  1
+import os
  2
+ROOT_PATH = os.path.dirname(__file__)
  3
+
  4
+
  5
+
  6
+DATABASES = {
  7
+    'default': {
  8
+        'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  9
+        'NAME': '',                      # Or path to database file if using sqlite3.
  10
+        'USER': '',                      # Not used with sqlite3.
  11
+        'PASSWORD': '',                  # Not used with sqlite3.
  12
+        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
  13
+        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
  14
+    }
  15
+}
  16
+
  17
+MEDIA_ROOT = ''
  18
+
  19
+STATIC_ROOT = ''
  20
+
  21
+STATICFILES_DIRS = (
  22
+    # Put strings here, like "/home/html/static" or "C:/www/django/static".
  23
+    # Always use forward slashes, even on Windows.
  24
+    # Don't forget to use absolute paths, not relative paths.
  25
+)
  26
+
  27
+TEMPLATE_DIRS = (
  28
+    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  29
+    # Always use forward slashes, even on Windows.
  30
+    # Don't forget to use absolute paths, not relative paths.
  31
+)
  32
+
  33
+
  34
+# Make this unique, and don't share it with anybody.
  35
+SECRET_KEY = '230p9g340py9g,34p0[9"#$Y<PY<$5y,43y,3$y3'
  36
+
28  settings.py
... ...
@@ -1,3 +1,10 @@
  1
+import os
  2
+ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
  3
+try:
  4
+    from private_settings import *
  5
+except:
  6
+    pass
  7
+
1 8
 # Django settings for moose project.
2 9
 
3 10
 DEBUG = True
@@ -7,9 +14,7 @@
7 14
     # ('Your Name', 'your_email@example.com'),
8 15
 )
9 16
 
10  
-MANAGERS = ADMINS
11  
-
12  
-DATABASES = {
  17
+DATABASES = DATABASES or {
13 18
     'default': {
14 19
         'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
15 20
         'NAME': '',                      # Or path to database file if using sqlite3.
@@ -20,6 +25,8 @@
20 25
     }
21 26
 }
22 27
 
  28
+MANAGERS = ADMINS
  29
+
23 30
 # Local time zone for this installation. Choices can be found here:
24 31
 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
25 32
 # although not all choices may be available on all operating systems.
@@ -45,7 +52,7 @@
45 52
 
46 53
 # Absolute filesystem path to the directory that will hold user-uploaded files.
47 54
 # Example: "/home/media/media.lawrence.com/media/"
48  
-MEDIA_ROOT = ''
  55
+MEDIA_ROOT = MEDIA_ROOT or ''
49 56
 
50 57
 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
51 58
 # trailing slash.
@@ -56,7 +63,7 @@
56 63
 # Don't put anything in this directory yourself; store your static files
57 64
 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
58 65
 # Example: "/home/media/media.lawrence.com/static/"
59  
-STATIC_ROOT = ''
  66
+STATIC_ROOT = STATIC_ROOT or ''
60 67
 
61 68
 # URL prefix for static files.
62 69
 # Example: "http://media.lawrence.com/static/"
@@ -68,7 +75,7 @@
68 75
 ADMIN_MEDIA_PREFIX = '/static/admin/'
69 76
 
70 77
 # Additional locations of static files
71  
-STATICFILES_DIRS = (
  78
+STATICFILES_DIRS = STATICFILES_DIRS or (
72 79
     # Put strings here, like "/home/html/static" or "C:/www/django/static".
73 80
     # Always use forward slashes, even on Windows.
74 81
     # Don't forget to use absolute paths, not relative paths.
@@ -83,7 +90,7 @@
83 90
 )
84 91
 
85 92
 # Make this unique, and don't share it with anybody.
86  
-SECRET_KEY = ''
  93
+SECRET_KEY = SECRET_KEY or ''
87 94
 
88 95
 # List of callables that know how to import templates from various sources.
89 96
 TEMPLATE_LOADERS = (
@@ -100,15 +107,16 @@
100 107
     'django.contrib.messages.middleware.MessageMiddleware',
101 108
 )
102 109
 
103  
-ROOT_URLCONF = 'moose.urls'
  110
+ROOT_URLCONF = 'urls'
104 111
 
105  
-TEMPLATE_DIRS = (
  112
+TEMPLATE_DIRS = TEMPLATE_DIRS or (
106 113
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
107 114
     # Always use forward slashes, even on Windows.
108 115
     # Don't forget to use absolute paths, not relative paths.
109 116
 )
110 117
 
111 118
 INSTALLED_APPS = (
  119
+    'moose',
112 120
     'django.contrib.auth',
113 121
     'django.contrib.contenttypes',
114 122
     'django.contrib.sessions',
@@ -119,6 +127,7 @@
119 127
     # 'django.contrib.admin',
120 128
     # Uncomment the next line to enable admin documentation:
121 129
     # 'django.contrib.admindocs',
  130
+
122 131
 )
123 132
 
124 133
 # A sample logging configuration. The only tangible logging
@@ -143,3 +152,4 @@
143 152
         },
144 153
     }
145 154
 }
  155
+
21  templates/feedback.html
... ...
@@ -0,0 +1,21 @@
  1
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  2
+<html> <head>
  3
+<title>Send Feedback</title>
  4
+</head>
  5
+
  6
+<body>
  7
+<h1>Send Feedback</h1>
  8
+
  9
+<form>
  10
+
  11
+<p>Dear <input/>,</p>
  12
+<p><textarea rows=5 cols=60></textarea></p>
  13
+<p><button>Send</button></p>
  14
+
  15
+</form>
  16
+
  17
+
  18
+<hr>
  19
+<address></address>
  20
+<!-- hhmts start -->Last modified: Wed Apr  4 14:03:14 EDT 2012 <!-- hhmts end -->
  21
+</body> </html>
8  urls.py
... ...
@@ -1,17 +1,17 @@
1 1
 from django.conf.urls.defaults import patterns, include, url
2 2
 
3 3
 # Uncomment the next two lines to enable the admin:
4  
-# from django.contrib import admin
5  
-# admin.autodiscover()
  4
+#from django.contrib import admin
  5
+#admin.autodiscover()
6 6
 
7 7
 urlpatterns = patterns('',
8 8
     # Examples:
9 9
     # url(r'^$', 'moose.views.home', name='home'),
10  
-    url(r'^moose/', include('moose.foo.urls')),
  10
+    url(r'^moose/', include('moose.urls')),
11 11
 
12 12
     # Uncomment the admin/doc line below to enable admin documentation:
13 13
     # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
14 14
 
15 15
     # Uncomment the next line to enable the admin:
16  
-    # url(r'^admin/', include(admin.site.urls)),
  16
+    # url(r'^admin/$', include(admin.site.urls)),
17 17
 )

No commit comments for this range

Something went wrong with that request. Please try again.