Created
November 23, 2010 04:43
-
-
Save alexcabrera/711266 to your computer and use it in GitHub Desktop.
Template from django project setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DEBUG = True | |
| TEMPLATE_DEBUG = DEBUG | |
| DATABASES = { | |
| 'default': { | |
| 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. | |
| 'NAME': '', # Or path to database file if using sqlite3. | |
| 'USER': '', # Not used with sqlite3. | |
| 'PASSWORD': '', # Not used with sqlite3. | |
| 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. | |
| 'PORT': '', # Set to empty string for default. Not used with sqlite3. | |
| } | |
| } | |
| INTERNAL_IPS = ('127.0.0.1',) | |
| # If using django-css, uncomment below | |
| # COMPRESS_FORCE_RECOMPILE = True | |
| # COMPRESS_URL = '/static/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from development_settings import * | |
| # For production, comment out the above line and uncomment below | |
| # remember to add production_settings.py to the project to avoid an ImportError | |
| # from production_settings import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import "sass/defaults" | |
| @import "sass/compass/init" | |
| @import "sass/frameworks/graphpaper" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x) | |
| ADMINS = ( | |
| ('Your Name', 'email@example.com'), | |
| ) | |
| MANAGERS = ADMINS | |
| # Local time zone for this installation. Choices can be found here: | |
| # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name | |
| # although not all choices may be available on all operating systems. | |
| # On Unix systems, a value of None will cause Django to use the same | |
| # timezone as the operating system. | |
| # If running in a Windows environment this must be set to the same as your | |
| # system time zone. | |
| TIME_ZONE = 'America/New_York' | |
| # Language code for this installation. All choices can be found here: | |
| # http://www.i18nguy.com/unicode/language-identifiers.html | |
| LANGUAGE_CODE = 'en-us' | |
| SITE_ID = 1 | |
| # If you set this to False, Django will make some optimizations so as not | |
| # to load the internationalization machinery. | |
| USE_I18N = True | |
| # If you set this to False, Django will not format dates, numbers and | |
| # calendars according to the current locale | |
| USE_L10N = True | |
| # Absolute path to the directory that holds media. | |
| # Example: "/home/media/media.lawrence.com/" | |
| MEDIA_ROOT = here('media') | |
| # URL that handles the media served from MEDIA_ROOT. Make sure to use a | |
| # trailing slash if there is a path component (optional in other cases). | |
| # Examples: "http://media.lawrence.com", "http://example.com/media/" | |
| MEDIA_URL = '/media/' | |
| # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a | |
| # trailing slash. | |
| # Examples: "http://foo.com/media/", "/media/". | |
| ADMIN_MEDIA_PREFIX = '/media/admin/' | |
| # Static Files in 1.3 | |
| STATIC_DIRS = ( | |
| here('static'), | |
| ) | |
| STATIC_URL = '/static/' | |
| STATIC_ROOT = here('static') | |
| STATIC_FINDERS = ( | |
| "django.contrib.staticfiles.finders.FileSystemFinder", | |
| "django.contrib.staticfiles.finders.AppDirectoriesFinder", | |
| ) | |
| # Make this unique, and don't share it with anybody. | |
| SECRET_KEY = '1978257f3a16d2e46b723b90ef6b65d7' | |
| # 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', | |
| ) | |
| MIDDLEWARE_CLASSES = ( | |
| 'django.middleware.common.CommonMiddleware', | |
| 'django.contrib.sessions.middleware.SessionMiddleware', | |
| 'django.middleware.csrf.CsrfViewMiddleware', | |
| 'django.contrib.auth.middleware.AuthenticationMiddleware', | |
| 'django.contrib.messages.middleware.MessageMiddleware', | |
| # 'debug_toolbar.middleware.DebugToolbarMiddleware', | |
| ) | |
| TEMPLATE_CONTEXT_PROCESSORS = ( | |
| 'django.core.context_processors.debug', | |
| 'django.core.context_processors.i18n', | |
| 'django.core.context_processors.static', | |
| 'django.contrib.auth.context_processors.auth', | |
| 'django.contrib.messages.context_processors.messages', | |
| ) | |
| ROOT_URLCONF = 'mageez.urls' | |
| TEMPLATE_DIRS = ( | |
| here('templates'), | |
| ) | |
| INSTALLED_APPS = ( | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.sessions', | |
| 'django.contrib.sites', | |
| 'django.contrib.messages', | |
| 'django.contrib.admin', | |
| 'django.contrib.admindocs', | |
| 'django.contrib.staticfiles', | |
| # 'compass', | |
| ) | |
| # Uncomment below if using django-css and sass | |
| # COMPILER_FORMATS = { | |
| # '.sass': { | |
| # 'binary_path':'sass', | |
| # 'arguments':'*.sass *.css', | |
| # }, | |
| # } | |
| try: | |
| from local_settings import * | |
| except ImportError: | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.conf import settings | |
| from django.conf.urls.defaults import * | |
| from django.contrib import admin | |
| from django.views.generic.simple import direct_to_template | |
| admin.autodiscover() | |
| urlpatterns = patterns('', | |
| url(r'^$', direct_to_template, {'template':'home.html',}, name='home'), | |
| url(r'^admin/doc/', include('django.contrib.admindocs.urls')), | |
| url(r'^admin/', include(admin.site.urls)), | |
| ) | |
| from django.contrib.staticfiles.urls import staticfiles_urlpatterns | |
| urlpatterns += staticfiles_urlpatterns() | |
| if settings.DEBUG: | |
| urlpatterns += patterns('', | |
| (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'show_indexes': True}), | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment