diff --git a/lifting/migrations/0001_initial.py b/lifting/migrations/0001_initial.py index c73349c..f7611cf 100644 --- a/lifting/migrations/0001_initial.py +++ b/lifting/migrations/0001_initial.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals from django.db import models, migrations +import django.contrib.postgres.fields class Migration(migrations.Migration): @@ -13,16 +14,16 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Exercise', fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('name', models.CharField(max_length=200)), + ('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)), + ('names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=200), size=None)), ], ), migrations.CreateModel( name='Set', fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)), ('date', models.DateField()), - ('weight_kg', models.DecimalField(max_digits=7, decimal_places=3)), + ('weight_kg', models.DecimalField(decimal_places=3, max_digits=7)), ('reps', models.PositiveIntegerField()), ('source', models.CharField(max_length=100)), ('exercise', models.ForeignKey(to='lifting.Exercise', related_name='sets')), diff --git a/requirements.txt b/requirements.txt index 6e7f913..162e170 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pytest ---pre Django +Django==1.8.0 +psycopg2 diff --git a/web/settings.py b/web/settings.py index 31b904e..47cbf1a 100644 --- a/web/settings.py +++ b/web/settings.py @@ -64,8 +64,12 @@ WSGI_APPLICATION = 'web.wsgi.application' DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'bia', + 'USER': 'bia', + 'PASSWORD': 'test', + 'HOST': '10.135.1.101', + 'PORT': '5432', } }