-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
171 additions
and
587 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,4 +59,5 @@ __history/ | |
|
||
#settings file | ||
parker/settings.py | ||
parker/tmp.txt | ||
static/admin |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ mysqlclient | |
selenium | ||
sqlparse | ||
uWSGI | ||
coverage | ||
django-nose |
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
""" | ||
Django settings for parker project. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/1.7/topics/settings/ | ||
For the full list of settings and their values, see | ||
https://docs.djangoproject.com/en/1.7/ref/settings/ | ||
""" | ||
|
||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) | ||
import os | ||
|
||
BASE_DIR = "/carparker" | ||
|
||
# Quick-start development settings - unsuitable for production | ||
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ | ||
|
||
# SECURITY WARNING: keep the secret key used in production secret! | ||
SECRET_KEY = '+56vp3(=hfhqu-l5c$jn!308lv*)#^5#q)i7i37l8_o!t$jxmf' | ||
|
||
# SECURITY WARNING: don't run with debug turned on in production! | ||
DEBUG = False | ||
TEMPLATE_DEBUG = False | ||
|
||
ALLOWED_HOSTS = ["ubuntu-linux.shared", "localhost"] | ||
|
||
# Application definition | ||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.admin', | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.messages', | ||
'django.contrib.staticfiles', | ||
'debug_toolbar', | ||
'parker', | ||
'rest_framework', | ||
'static_precompiler', | ||
'django_nose' | ||
) | ||
|
||
# Use nose to run all tests | ||
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' | ||
|
||
# Tell nose to measure coverage on the 'foo' and 'bar' apps | ||
NOSE_ARGS = [ | ||
'--with-coverage', | ||
'--cover-package=parker', | ||
] | ||
|
||
|
||
""" | ||
MIDDLEWARE = ( | ||
'debug_toolbar.middleware.DebugToolbarMiddleware', | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.common.CommonMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
'django.contrib.auth.middleware.AuthenticationMiddleware', | ||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', | ||
'django.contrib.messages.middleware.MessageMiddleware', | ||
'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
) | ||
""" | ||
|
||
# Speed up password encryption | ||
PASSWORD_HASHERS = ( | ||
'django.contrib.auth.hashers.MD5PasswordHasher', | ||
) | ||
|
||
INTERNAL_IPS = ( | ||
'127.0.0.1', | ||
'172.18.0.1', # Max macOS | ||
'172.19.0.1', # Max Ubuntu | ||
) | ||
|
||
ROOT_URLCONF = 'parker.urls' | ||
|
||
WSGI_APPLICATION = 'parker.wsgi.application' | ||
|
||
# Database | ||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. | ||
} | ||
} | ||
|
||
# Internationalization | ||
# https://docs.djangoproject.com/en/1.7/topics/i18n/ | ||
|
||
LANGUAGE_CODE = 'en-us' | ||
|
||
TIME_ZONE = 'Australia/Sydney' | ||
|
||
USE_I18N = True | ||
|
||
USE_L10N = True | ||
|
||
USE_TZ = True | ||
|
||
# Static files (CSS, JavaScript, Images) | ||
# https://docs.djangoproject.com/en/1.7/howto/static-files/ | ||
|
||
STATIC_ROOT = os.path.join(BASE_DIR, "static/") | ||
STATIC_URL = '/extras/' | ||
|
||
STATICFILES_FINDERS = ( | ||
'django.contrib.staticfiles.finders.FileSystemFinder', | ||
'django.contrib.staticfiles.finders.AppDirectoriesFinder', | ||
'static_precompiler.finders.StaticPrecompilerFinder', | ||
) | ||
|
||
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'DIRS': [os.path.join(BASE_DIR, 'templates')], | ||
'APP_DIRS': True, | ||
'OPTIONS': { | ||
'debug': DEBUG, | ||
'context_processors': [ | ||
'django.template.context_processors.debug', | ||
'django.template.context_processors.request', | ||
'django.contrib.auth.context_processors.auth', | ||
'django.contrib.messages.context_processors.messages', | ||
], | ||
}, | ||
}, | ||
] | ||
|
||
REST_FRAMEWORK = { | ||
# Use Django's standard `django.contrib.auth` permissions, | ||
# or allow read-only access for unauthenticated users. | ||
'DEFAULT_PERMISSION_CLASSES': [ | ||
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' | ||
] | ||
} | ||
|
||
STATIC_PRECOMPILER_OUTPUT_DIR = "compiled" | ||
STATIC_PRECOMPILER_COMPILERS = ( | ||
('static_precompiler.compilers.SCSS', { | ||
"executable": "/usr/local/bin/sass", | ||
"sourcemap_enabled": True, | ||
"compass_enabled": True, | ||
"load_paths": ["/path"] | ||
}), | ||
) | ||
|
||
HTML_CACHE_DIRECTORY = os.path.join(BASE_DIR, "scripts/carparks_rates_html") | ||
HTML_FILE_PREFIX_LENGTH = 10 # carparkID_ | ||
HTML_FILE_SUFFIX_LENGTH = 5 # .html |
Empty file.
This file contains 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