fix a couple of issues

This commit is contained in:
James Turk 2015-04-12 13:40:03 -04:00
parent f0a8f6b75c
commit 9ec636fbef
3 changed files with 20 additions and 3 deletions

View File

@ -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'),
),
]

View File

@ -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'])

View File

@ -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