aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/setup.sh74
-rwxr-xr-xscripts/teardown.sh4
2 files changed, 78 insertions, 0 deletions
diff --git a/scripts/setup.sh b/scripts/setup.sh
new file mode 100755
index 0000000..fbc6896
--- /dev/null
+++ b/scripts/setup.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+SETTINGS='settings.py'
+cat > $SETTINGS <<EOF
+DEBUG = True
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': 'test.db',
+ },
+}
+
+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',
+)
+
+TEMPLATE_CONTEXT_PROCESSORS = (
+ 'django.contrib.auth.context_processors.auth',
+ 'django.core.context_processors.debug',
+ 'django.core.context_processors.i18n',
+ 'django.core.context_processors.media',
+ 'django.core.context_processors.static',
+ 'django.core.context_processors.request',
+ 'django.core.context_processors.tz',
+ 'django.contrib.messages.context_processors.messages'
+)
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.staticfiles',
+ 'django.contrib.sites',
+ 'south',
+ 'brevisurl',
+)
+
+SITE_ID = 1
+
+STATIC_URL = '/static/'
+
+SECRET_KEY = 'secret_key'
+ROOT_URLCONF = 'brevisurl.urls'
+
+LOGGING = {
+ 'version': 1,
+ 'disable_existing_loggers': False,
+ 'handlers': {
+ 'null': {
+ 'level': 'DEBUG',
+ 'class': 'logging.NullHandler'
+ },
+ 'console': {
+ 'level': 'DEBUG',
+ 'class': 'logging.StreamHandler'
+ },
+ },
+ 'loggers': {
+ '': {
+ 'handlers': ['null'],
+ 'level': 'DEBUG'
+ }
+ }
+}
+
+EOF
+
+export PYTHONPATH=.
+export DJANGO_SETTINGS_MODULE=settings \ No newline at end of file
diff --git a/scripts/teardown.sh b/scripts/teardown.sh
new file mode 100755
index 0000000..1110322
--- /dev/null
+++ b/scripts/teardown.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+rm -f $SETTINGS*
+rm -f test.db \ No newline at end of file