aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Crute <mcrute@gmail.com>2012-12-04 14:45:11 -0500
committerMike Crute <mcrute@gmail.com>2012-12-04 14:49:37 -0500
commitce6a0c79692c47d5ca96db6f7ef5d71ae5306528 (patch)
treea083cc01770f9ac36a48d0a168d0194b5b0e3a5e
downloaddjango-precompiler-ce6a0c79692c47d5ca96db6f7ef5d71ae5306528.tar.bz2
django-precompiler-ce6a0c79692c47d5ca96db6f7ef5d71ae5306528.tar.xz
django-precompiler-ce6a0c79692c47d5ca96db6f7ef5d71ae5306528.zip
Generate initial Django project
-rw-r--r--.gitignore1
-rw-r--r--codemash/__init__.py0
-rw-r--r--codemash/settings.py152
-rw-r--r--codemash/urls.py17
-rw-r--r--codemash/wsgi.py32
-rwxr-xr-xmanage.py10
-rw-r--r--pages/__init__.py0
-rw-r--r--pages/models.py3
-rw-r--r--pages/tests.py16
-rw-r--r--pages/views.py1
10 files changed, 232 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c18dd8d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
__pycache__/
diff --git a/codemash/__init__.py b/codemash/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/codemash/__init__.py
diff --git a/codemash/settings.py b/codemash/settings.py
new file mode 100644
index 0000000..0e609fd
--- /dev/null
+++ b/codemash/settings.py
@@ -0,0 +1,152 @@
1# Django settings for codemash project.
2
3DEBUG = True
4TEMPLATE_DEBUG = DEBUG
5
6ADMINS = (
7 # ('Your Name', 'your_email@example.com'),
8)
9
10MANAGERS = ADMINS
11
12DATABASES = {
13 'default': {
14 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
15 'NAME': '', # Or path to database file if using sqlite3.
16 # The following settings are not used with sqlite3:
17 'USER': '',
18 'PASSWORD': '',
19 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
20 'PORT': '', # Set to empty string for default.
21 }
22}
23
24# Local time zone for this installation. Choices can be found here:
25# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
26# although not all choices may be available on all operating systems.
27# In a Windows environment this must be set to your system time zone.
28TIME_ZONE = 'America/Chicago'
29
30# Language code for this installation. All choices can be found here:
31# http://www.i18nguy.com/unicode/language-identifiers.html
32LANGUAGE_CODE = 'en-us'
33
34SITE_ID = 1
35
36# If you set this to False, Django will make some optimizations so as not
37# to load the internationalization machinery.
38USE_I18N = True
39
40# If you set this to False, Django will not format dates, numbers and
41# calendars according to the current locale.
42USE_L10N = True
43
44# If you set this to False, Django will not use timezone-aware datetimes.
45USE_TZ = True
46
47# Absolute filesystem path to the directory that will hold user-uploaded files.
48# Example: "/var/www/example.com/media/"
49MEDIA_ROOT = ''
50
51# URL that handles the media served from MEDIA_ROOT. Make sure to use a
52# trailing slash.
53# Examples: "http://example.com/media/", "http://media.example.com/"
54MEDIA_URL = ''
55
56# Absolute path to the directory static files should be collected to.
57# Don't put anything in this directory yourself; store your static files
58# in apps' "static/" subdirectories and in STATICFILES_DIRS.
59# Example: "/var/www/example.com/static/"
60STATIC_ROOT = ''
61
62# URL prefix for static files.
63# Example: "http://example.com/static/", "http://static.example.com/"
64STATIC_URL = '/static/'
65
66# Additional locations of static files
67STATICFILES_DIRS = (
68 # Put strings here, like "/home/html/static" or "C:/www/django/static".
69 # Always use forward slashes, even on Windows.
70 # Don't forget to use absolute paths, not relative paths.
71)
72
73# List of finder classes that know how to find static files in
74# various locations.
75STATICFILES_FINDERS = (
76 'django.contrib.staticfiles.finders.FileSystemFinder',
77 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
78# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
79)
80
81# Make this unique, and don't share it with anybody.
82SECRET_KEY = 'ik(f($^o48!&ndz8l0*!^$2*+@+$)urv4h44q8(k+bn=l3t1cy'
83
84# List of callables that know how to import templates from various sources.
85TEMPLATE_LOADERS = (
86 'django.template.loaders.filesystem.Loader',
87 'django.template.loaders.app_directories.Loader',
88# 'django.template.loaders.eggs.Loader',
89)
90
91MIDDLEWARE_CLASSES = (
92 'django.middleware.common.CommonMiddleware',
93 'django.contrib.sessions.middleware.SessionMiddleware',
94 'django.middleware.csrf.CsrfViewMiddleware',
95 'django.contrib.auth.middleware.AuthenticationMiddleware',
96 'django.contrib.messages.middleware.MessageMiddleware',
97 # Uncomment the next line for simple clickjacking protection:
98 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
99)
100
101ROOT_URLCONF = 'codemash.urls'
102
103# Python dotted path to the WSGI application used by Django's runserver.
104WSGI_APPLICATION = 'codemash.wsgi.application'
105
106TEMPLATE_DIRS = (
107 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
108 # Always use forward slashes, even on Windows.
109 # Don't forget to use absolute paths, not relative paths.
110)
111
112INSTALLED_APPS = (
113 'django.contrib.auth',
114 'django.contrib.contenttypes',
115 'django.contrib.sessions',
116 'django.contrib.sites',
117 'django.contrib.messages',
118 'django.contrib.staticfiles',
119 # Uncomment the next line to enable the admin:
120 # 'django.contrib.admin',
121 # Uncomment the next line to enable admin documentation:
122 # 'django.contrib.admindocs',
123)
124
125# A sample logging configuration. The only tangible logging
126# performed by this configuration is to send an email to
127# the site admins on every HTTP 500 error when DEBUG=False.
128# See http://docs.djangoproject.com/en/dev/topics/logging for
129# more details on how to customize your logging configuration.
130LOGGING = {
131 'version': 1,
132 'disable_existing_loggers': False,
133 'filters': {
134 'require_debug_false': {
135 '()': 'django.utils.log.RequireDebugFalse'
136 }
137 },
138 'handlers': {
139 'mail_admins': {
140 'level': 'ERROR',
141 'filters': ['require_debug_false'],
142 'class': 'django.utils.log.AdminEmailHandler'
143 }
144 },
145 'loggers': {
146 'django.request': {
147 'handlers': ['mail_admins'],
148 'level': 'ERROR',
149 'propagate': True,
150 },
151 }
152}
diff --git a/codemash/urls.py b/codemash/urls.py
new file mode 100644
index 0000000..153db34
--- /dev/null
+++ b/codemash/urls.py
@@ -0,0 +1,17 @@
1from django.conf.urls import patterns, include, url
2
3# Uncomment the next two lines to enable the admin:
4# from django.contrib import admin
5# admin.autodiscover()
6
7urlpatterns = patterns('',
8 # Examples:
9 # url(r'^$', 'pages.views.home', name='home'),
10 # url(r'^codemash/', include('codemash.foo.urls')),
11
12 # Uncomment the admin/doc line below to enable admin documentation:
13 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
14
15 # Uncomment the next line to enable the admin:
16 # url(r'^admin/', include(admin.site.urls)),
17)
diff --git a/codemash/wsgi.py b/codemash/wsgi.py
new file mode 100644
index 0000000..2ede251
--- /dev/null
+++ b/codemash/wsgi.py
@@ -0,0 +1,32 @@
1"""
2WSGI config for codemash project.
3
4This module contains the WSGI application used by Django's development server
5and any production WSGI deployments. It should expose a module-level variable
6named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
7this application via the ``WSGI_APPLICATION`` setting.
8
9Usually you will have the standard Django WSGI application here, but it also
10might make sense to replace the whole Django WSGI application with a custom one
11that later delegates to the Django one. For example, you could introduce WSGI
12middleware here, or combine a Django application with an application of another
13framework.
14
15"""
16import os
17
18# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
19# if running multiple sites in the same mod_wsgi process. To fix this, use
20# mod_wsgi daemon mode with each site in its own daemon process, or use
21# os.environ["DJANGO_SETTINGS_MODULE"] = "codemash.settings"
22os.environ.setdefault("DJANGO_SETTINGS_MODULE", "codemash.settings")
23
24# This application object is used by any WSGI server configured to use this
25# file. This includes Django's development server, if the WSGI_APPLICATION
26# setting points here.
27from django.core.wsgi import get_wsgi_application
28application = get_wsgi_application()
29
30# Apply WSGI middleware here.
31# from helloworld.wsgi import HelloWorldApplication
32# application = HelloWorldApplication(application)
diff --git a/manage.py b/manage.py
new file mode 100755
index 0000000..1393d93
--- /dev/null
+++ b/manage.py
@@ -0,0 +1,10 @@
1#!/usr/bin/env python
2import os
3import sys
4
5if __name__ == "__main__":
6 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "codemash.settings")
7
8 from django.core.management import execute_from_command_line
9
10 execute_from_command_line(sys.argv)
diff --git a/pages/__init__.py b/pages/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pages/__init__.py
diff --git a/pages/models.py b/pages/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/pages/models.py
@@ -0,0 +1,3 @@
1from django.db import models
2
3# Create your models here.
diff --git a/pages/tests.py b/pages/tests.py
new file mode 100644
index 0000000..501deb7
--- /dev/null
+++ b/pages/tests.py
@@ -0,0 +1,16 @@
1"""
2This file demonstrates writing tests using the unittest module. These will pass
3when you run "manage.py test".
4
5Replace this with more appropriate tests for your application.
6"""
7
8from django.test import TestCase
9
10
11class SimpleTest(TestCase):
12 def test_basic_addition(self):
13 """
14 Tests that 1 + 1 always equals 2.
15 """
16 self.assertEqual(1 + 1, 2)
diff --git a/pages/views.py b/pages/views.py
new file mode 100644
index 0000000..60f00ef
--- /dev/null
+++ b/pages/views.py
@@ -0,0 +1 @@
# Create your views here.