Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
Preconfiguration of the project settings and requirements to work a l…
Browse files Browse the repository at this point in the history
…ittle more smoothly out of the box. cc @aboutaaron
  • Loading branch information
palewire committed Aug 12, 2014
1 parent 33071a1 commit 0193d60
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 55 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
example/project/settings_local.py
*.pyc
*.swp
.DS_Store
Expand Down
3 changes: 1 addition & 2 deletions example/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")

sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)
74 changes: 23 additions & 51 deletions example/project/settings.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
"""
Django settings for project project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'r269$heh9at2cot+5l$*$4&xzwsfbbg0&&^prr+e&oh)_4-+ga'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'
ALLOWED_HOSTS = []


# Application definition
ROOT_URLCONF = 'project.urls'
WSGI_APPLICATION = 'project.wsgi.application'

INSTALLED_APPS = (
'django.contrib.admin',
Expand All @@ -36,6 +21,8 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'calaccess',
'campaign_finance',
)

MIDDLEWARE_CLASSES = (
Expand All @@ -47,36 +34,21 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'project.urls'

WSGI_APPLICATION = 'project.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.mysql',
'NAME': 'campaign_finance',
'USER': 'root',
'PASSWORD': 'mysql',
'HOST': 'localhost',
'PORT': '3306',
'OPTIONS': {
'local_infile': 1,
}
}
}

# Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/

STATIC_URL = '/static/'
try:
from settings_local import *
except ImportError:
pass
5 changes: 3 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Django==1.6.5
Fabric==1.7.0
Jinja==1.2
MySQL-python==1.2.4
MySQL-python==1.2.5
PyYAML==3.11
SQLAlchemy==0.8.3
South==0.8.1
Expand All @@ -21,7 +21,7 @@ hurry.filesize==0.9
ipython==2.2.0
openpyxl==1.6.2
paramiko==1.11.0
progressbar==2.3
progressbar>=2.2
psycopg2==2.4.6
pycrypto==2.6
pyflakes==0.8.1
Expand All @@ -35,3 +35,4 @@ sh==1.09
six==1.4.1
tornado==3.2
xlrd==0.9.2
django-calaccess-parser==0.4

0 comments on commit 0193d60

Please sign in to comment.