diff --git a/lifting/migrations/0003_auto_20150412_1739.py b/lifting/migrations/0003_auto_20150412_1739.py new file mode 100644 index 0000000..6fcf4c8 --- /dev/null +++ b/lifting/migrations/0003_auto_20150412_1739.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('lifting', '0002_liftingoptions_default_bar'), + ] + + operations = [ + migrations.AlterField( + model_name='liftingoptions', + name='default_bar', + field=models.ForeignKey(default=1, to='inventory.Bar'), + ), + ] diff --git a/lifting/models.py b/lifting/models.py index c39d878..099a506 100644 --- a/lifting/models.py +++ b/lifting/models.py @@ -18,7 +18,7 @@ class LiftingOptions(models.Model): user = models.OneToOneField(User, related_name='lifting_options') lifting_units = models.CharField(max_length=1, choices=UNITS, default='i') - default_bar = models.ForeignKey(Bar) + default_bar = models.ForeignKey(Bar, default=1) plate_pairs = ArrayField(models.DecimalField(max_digits=7, decimal_places=3), default=['45','45','25','10','5','5','2.5','1.25']) diff --git a/lifting/views.py b/lifting/views.py index b216f05..c49a040 100644 --- a/lifting/views.py +++ b/lifting/views.py @@ -6,14 +6,12 @@ import tempfile from collections import defaultdict, Counter from django.shortcuts import render -from django import forms from django.contrib.auth.decorators import login_required from django.views.generic import dates from django.db.models import Count, Max from inventory.models import Lift, Bar from .models import Set -from .forms import LiftingOptionsForm @login_required