This is emberassing; forgot verbose_name

New migrations require total wipe of database.
Expect a couple of migration complete reboots during initial dev.
This commit is contained in:
Christoffer Viken 2015-08-16 21:44:15 +02:00
parent e66db0b857
commit aed126f8f0
7 changed files with 131 additions and 282 deletions

View File

@ -6,45 +6,61 @@ from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('waffles', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('waffles', '0002_auto_20150816_1357'),
]
operations = [
migrations.CreateModel(
name='Calculation',
fields=[
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
('date', models.DateTimeField()),
('id', models.AutoField(auto_created=True, verbose_name='ID', primary_key=True, serialize=False)),
('amount', models.IntegerField(verbose_name='Amount owed')),
('date', models.DateTimeField(verbose_name='Date integrated')),
],
options={
'verbose_name': 'Calculation',
'verbose_name_plural': 'Calculations',
},
),
migrations.CreateModel(
name='Debt',
fields=[
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
('amount', models.BigIntegerField()),
('debtee', models.ForeignKey(related_name='debtee', to=settings.AUTH_USER_MODEL)),
('debtor', models.ForeignKey(related_name='debtor', to=settings.AUTH_USER_MODEL)),
('id', models.AutoField(auto_created=True, verbose_name='ID', primary_key=True, serialize=False)),
('amount', models.BigIntegerField(verbose_name='Amount owed')),
(
'debtee', models.ForeignKey(verbose_name='Debtee', related_name='debtee', to=settings.AUTH_USER_MODEL)),
(
'debtor', models.ForeignKey(verbose_name='Debtor', related_name='debtor', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'Total debt',
'verbose_name_plural': 'Total debts',
},
),
migrations.CreateModel(
name='Settlement',
fields=[
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
('dato', models.DateField()),
('amount', models.IntegerField()),
('debt', models.ForeignKey(to='mercantile.Debt')),
('id', models.AutoField(auto_created=True, verbose_name='ID', primary_key=True, serialize=False)),
('date', models.DateField(verbose_name='Date made')),
('amount', models.IntegerField(verbose_name='Amount owed')),
('debt', models.ForeignKey(verbose_name='Connected debt', to='mercantile.Debt')),
],
options={
'verbose_name': 'Cash settlement',
'verbose_name_plural': 'Cash settlements',
},
),
migrations.AddField(
model_name='calculation',
name='debt',
field=models.ForeignKey(to='mercantile.Debt'),
field=models.ForeignKey(verbose_name='Connected debt', to='mercantile.Debt'),
),
migrations.AddField(
model_name='calculation',
name='event',
field=models.ForeignKey(to='waffles.Event'),
field=models.ForeignKey(to_field='Connected event', to='waffles.Event'),
),
]

View File

@ -24,7 +24,7 @@ msgstr "Brukerprofil"
#: models.py:14
msgid "User profiles"
msgstr "Bruerprofiler"
msgstr "Brukerprofiler"
#: models.py:24
msgid "Community name"

View File

@ -2,13 +2,14 @@
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
import django.utils.timezone
import django.contrib.auth.models
import django.utils.timezone
import django.core.validators
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('auth', '0006_require_contenttypes_0002'),
]
@ -17,37 +18,40 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='UserProfile',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('password', models.CharField(verbose_name='password', max_length=128)),
('last_login', models.DateTimeField(null=True, verbose_name='last login', blank=True)),
('is_superuser', models.BooleanField(verbose_name='superuser status', default=False,
help_text='Designates that this user has all permissions without explicitly assigning them.')),
('username', models.CharField(verbose_name='username', unique=True, validators=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, verbose_name='last login', null=True)),
('is_superuser', models.BooleanField(default=False,
help_text='Designates that this user has all permissions without explicitly assigning them.',
verbose_name='superuser status')),
('username', models.CharField(max_length=30, verbose_name='username', validators=[
django.core.validators.RegexValidator('^[\\w.@+-]+$',
'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.',
'invalid')], max_length=30,
'invalid')], unique=True,
help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.',
error_messages={'unique': 'A user with that username already exists.'})),
('first_name', models.CharField(verbose_name='first name', blank=True, max_length=30)),
('last_name', models.CharField(verbose_name='last name', blank=True, max_length=30)),
('email', models.EmailField(verbose_name='email address', blank=True, max_length=254)),
('is_staff', models.BooleanField(verbose_name='staff status', default=False,
help_text='Designates whether the user can log into this admin site.')),
('is_active', models.BooleanField(verbose_name='active', default=True,
help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.')),
('date_joined', models.DateTimeField(verbose_name='date joined', default=django.utils.timezone.now)),
('groups', models.ManyToManyField(verbose_name='groups', to='auth.Group',
('first_name', models.CharField(max_length=30, blank=True, verbose_name='first name')),
('last_name', models.CharField(max_length=30, blank=True, verbose_name='last name')),
('email', models.EmailField(max_length=254, blank=True, verbose_name='email address')),
('is_staff', models.BooleanField(default=False,
help_text='Designates whether the user can log into this admin site.',
verbose_name='staff status')),
('is_active', models.BooleanField(default=True,
help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('groups',
models.ManyToManyField(related_query_name='user', verbose_name='groups', related_name='user_set',
help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.',
related_query_name='user', blank=True, related_name='user_set')),
('user_permissions', models.ManyToManyField(verbose_name='user permissions', to='auth.Permission',
help_text='Specific permissions for this user.',
related_query_name='user', blank=True,
related_name='user_set')),
blank=True, to='auth.Group')),
('user_permissions', models.ManyToManyField(related_query_name='user', verbose_name='user permissions',
related_name='user_set',
help_text='Specific permissions for this user.', blank=True,
to='auth.Permission')),
],
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'abstract': False,
'verbose_name_plural': 'User profiles',
'verbose_name': 'User profile',
},
managers=[
('objects', django.contrib.auth.models.UserManager()),
@ -56,17 +60,76 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Community',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=64)),
('members', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('name', models.CharField(max_length=64, verbose_name='Community name')),
('members', models.ManyToManyField(verbose_name='Community members', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name_plural': 'Communities',
'verbose_name': 'Community',
},
),
migrations.CreateModel(
name='Event',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=64)),
('description', models.TextField()),
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('name', models.CharField(max_length=64, verbose_name='Event name')),
('description', models.TextField(verbose_name='Description/text')),
('open', models.BooleanField(verbose_name='Open for new participants')),
('status', models.BooleanField(verbose_name='Finalized')),
('timeFrom', models.DateTimeField(verbose_name='Start time')),
('timeTo', models.DateTimeField(verbose_name='End time')),
('participants', models.ManyToManyField(verbose_name='Participants', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name_plural': 'Events',
'verbose_name': 'Event',
},
),
migrations.CreateModel(
name='Listing',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('timeFrom', models.DateTimeField(verbose_name='Start time')),
('timeTo', models.DateTimeField(verbose_name='End time')),
('description', models.TextField(verbose_name='Description/text')),
('community', models.ForeignKey(verbose_name='Community', to='waffles.Community')),
('user', models.ForeignKey(verbose_name='Requesting user', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name_plural': 'Listing',
'verbose_name': 'Listing',
},
),
migrations.CreateModel(
name='ShoppingList',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('name', models.CharField(max_length=64, verbose_name='Name')),
('price', models.IntegerField(verbose_name='Price')),
('payers', models.ManyToManyField(verbose_name='Payers', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name_plural': 'Shopping lists',
'verbose_name': 'Shopping list',
},
),
migrations.CreateModel(
name='SubEvent',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('name', models.CharField(max_length=64, verbose_name='Name')),
('event', models.ForeignKey(verbose_name='Parent event', to='waffles.Event')),
('participants', models.ManyToManyField(verbose_name='Participants', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name_plural': 'Sub Events',
'verbose_name': 'Sub Event',
},
),
migrations.AddField(
model_name='shoppinglist',
name='subevent',
field=models.ForeignKey(verbose_name='Connected sub-event', to='waffles.SubEvent'),
),
]

View File

@ -1,82 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from django.db import models, migrations
from django.utils.timezone import utc
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('waffles', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Listing',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('timeFrom', models.DateTimeField()),
('timeTo', models.DateTimeField()),
('description', models.TextField()),
('community', models.ForeignKey(to='waffles.Community')),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='ShoppingList',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=64)),
('price', models.IntegerField()),
('payers', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Subevent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=64)),
],
),
migrations.AddField(
model_name='event',
name='participants',
field=models.ManyToManyField(to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='event',
name='status',
field=models.BooleanField(default=datetime.datetime(2015, 8, 16, 13, 56, 47, 395852, tzinfo=utc)),
preserve_default=False,
),
migrations.AddField(
model_name='event',
name='timeFrom',
field=models.DateTimeField(default=datetime.datetime(2015, 8, 16, 13, 56, 56, 586943, tzinfo=utc)),
preserve_default=False,
),
migrations.AddField(
model_name='event',
name='timeTo',
field=models.DateTimeField(default=datetime.datetime(2015, 8, 16, 13, 57, 0, 178924, tzinfo=utc)),
preserve_default=False,
),
migrations.AddField(
model_name='subevent',
name='event',
field=models.ForeignKey(to='waffles.Event'),
),
migrations.AddField(
model_name='subevent',
name='participants',
field=models.ManyToManyField(to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='shoppinglist',
name='subevent',
field=models.ForeignKey(to='waffles.Subevent'),
),
]

View File

@ -1,148 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from django.db import models, migrations
from django.utils.timezone import utc
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('waffles', '0002_auto_20150816_1357'),
]
operations = [
migrations.AlterModelOptions(
name='community',
options={'verbose_name': 'Community', 'verbose_name_plural': 'Communities'},
),
migrations.AlterModelOptions(
name='event',
options={'verbose_name': 'Event', 'verbose_name_plural': 'Events'},
),
migrations.AlterModelOptions(
name='listing',
options={'verbose_name': 'Listing', 'verbose_name_plural': 'Listing'},
),
migrations.AlterModelOptions(
name='shoppinglist',
options={'verbose_name': 'Shopping list', 'verbose_name_plural': 'Shopping lists'},
),
migrations.AlterModelOptions(
name='subevent',
options={'verbose_name': 'Sub Event', 'verbose_name_plural': 'Sub Events'},
),
migrations.AlterModelOptions(
name='userprofile',
options={'verbose_name': 'User profile', 'verbose_name_plural': 'User profiles'},
),
migrations.AddField(
model_name='event',
name='open',
field=models.BooleanField(default=datetime.datetime(2015, 8, 16, 19, 9, 38, 507600, tzinfo=utc),
verbose_name='Open for new participants'),
preserve_default=False,
),
migrations.AlterField(
model_name='community',
name='members',
field=models.ManyToManyField(to=settings.AUTH_USER_MODEL, db_constraint='Community members'),
),
migrations.AlterField(
model_name='community',
name='name',
field=models.CharField(verbose_name='Community name', max_length=64),
),
migrations.AlterField(
model_name='event',
name='description',
field=models.TextField(verbose_name='Description/text'),
),
migrations.AlterField(
model_name='event',
name='name',
field=models.CharField(verbose_name='Event name', max_length=64),
),
migrations.AlterField(
model_name='event',
name='participants',
field=models.ManyToManyField(verbose_name='Participants', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='event',
name='status',
field=models.BooleanField(verbose_name='Finalized'),
),
migrations.AlterField(
model_name='event',
name='timeFrom',
field=models.DateTimeField(verbose_name='Start time'),
),
migrations.AlterField(
model_name='event',
name='timeTo',
field=models.DateTimeField(verbose_name='End time'),
),
migrations.AlterField(
model_name='listing',
name='community',
field=models.ForeignKey(to='waffles.Community', verbose_name='Community'),
),
migrations.AlterField(
model_name='listing',
name='description',
field=models.TextField(verbose_name='Description/text'),
),
migrations.AlterField(
model_name='listing',
name='timeFrom',
field=models.DateTimeField(verbose_name='Start time'),
),
migrations.AlterField(
model_name='listing',
name='timeTo',
field=models.DateTimeField(verbose_name='End time'),
),
migrations.AlterField(
model_name='listing',
name='user',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='Requesting user'),
),
migrations.AlterField(
model_name='shoppinglist',
name='name',
field=models.CharField(verbose_name='Name', max_length=64),
),
migrations.AlterField(
model_name='shoppinglist',
name='payers',
field=models.ManyToManyField(to=settings.AUTH_USER_MODEL, db_constraint='Payers'),
),
migrations.AlterField(
model_name='shoppinglist',
name='price',
field=models.IntegerField(verbose_name='Price'),
),
migrations.AlterField(
model_name='shoppinglist',
name='subevent',
field=models.ForeignKey(to='waffles.SubEvent', to_field='Connected sub-event'),
),
migrations.AlterField(
model_name='subevent',
name='event',
field=models.ForeignKey(to='waffles.Event', to_field='Parent event'),
),
migrations.AlterField(
model_name='subevent',
name='name',
field=models.CharField(verbose_name='Name', max_length=64),
),
migrations.AlterField(
model_name='subevent',
name='participants',
field=models.ManyToManyField(to=settings.AUTH_USER_MODEL, db_constraint='Participants'),
),
]

View File

@ -22,7 +22,7 @@ class Community(models.Model):
grow more complex over time.
"""
name = models.CharField(max_length=64, verbose_name=_("Community name"))
members = models.ManyToManyField(UserProfile, _("Community members"))
members = models.ManyToManyField(UserProfile, verbose_name=_("Community members"))
class Meta:
verbose_name = _('Community')
@ -72,8 +72,8 @@ class SubEvent(models.Model):
Used when not everyone is participating in the entire event.
"""
name = models.CharField(max_length=64, verbose_name=_("Name"))
participants = models.ManyToManyField(UserProfile, _("Participants"))
event = models.ForeignKey(Event, _("Parent event"))
participants = models.ManyToManyField(UserProfile, verbose_name=_("Participants"))
event = models.ForeignKey(Event, verbose_name=_("Parent event"))
class Meta:
verbose_name = _('Sub Event')
@ -88,8 +88,8 @@ class ShoppingList(models.Model):
"""
name = models.CharField(max_length=64, verbose_name=_("Name"))
price = models.IntegerField(verbose_name=_("Price"))
payers = models.ManyToManyField(UserProfile, _("Payers"))
subevent = models.ForeignKey(SubEvent, _("Connected sub-event"))
payers = models.ManyToManyField(UserProfile, verbose_name=_("Payers"))
subevent = models.ForeignKey(SubEvent, verbose_name=_("Connected sub-event"))
class Meta:
verbose_name = _('Shopping list')