Fix migrations and create a developer script that sets necessary minimal env

This commit is contained in:
Benjamin Bach 2016-06-20 14:45:38 +02:00
parent c68718f8c0
commit 8d329eb716
4 changed files with 39 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.dev
.idea/
__pycache__/
db.sqlite3

View file

@ -10,8 +10,7 @@ Features do not include:
## Quickstart
Create a virtual environment and activate it:
Create a Python 2.7 virtual environment and activate it:
$ virtualenv venv
$ source venv/bin/activate

36
dev.sh Executable file
View file

@ -0,0 +1,36 @@
#!/bin/bash
# Directory of this script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEV_DIR="$DIR/.dev"
if [ ! -d "$DEV_DIR"]
then
mkdir -p "$DEV_DIR"
fi
export MEDIA_ROOT="$DEV_DIR/media/"
export EPAY_MERCHANT_NUMBER="123"
export EPAY_MD5_SECRET="123"
export COINIFY_API_KEY="123"
export COINIFY_API_SECRET="123"
export COINIFY_IPN_SECRET="123"
export PDF_LETTERHEAD_FILENAME="bornhax.pdf"
export BANKACCOUNT_IBAN="femfladeflødeboller"
export BANKACCOUNT_SWIFTBIC="goldmansachs"
export BANKACCOUNT_REG="1234"
export BANKACCOUNT_ACCOUNT="56789"
export TICKET_CATEGORY_ID="1"
export SECRET_KEY="muchsecret"
export ALLOWED_HOSTS="127.0.0.1"
export DATABASE_URL="sqlite:///$DEV_DIR/dev.db"
export EMAIL_HOST="localhost"
export EMAIL_PORT="22"
export EMAIL_HOST_USER="$USER"
export EMAIL_HOST_PASSWORD=""
export EMAIL_USE_TLS=""
export DEFAULT_FROM_EMAIL="bornhax@localhost"
export ARCHIVE_EMAIL=""
python manage.py $@

View file

@ -16,7 +16,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='coinifycallback',
name='headers',
field=django.contrib.postgres.fields.jsonb.JSONField(default=''),
field=django.contrib.postgres.fields.jsonb.JSONField(default=None),
preserve_default=False,
),
migrations.AddField(