Skip to content

Commit

Permalink
changed attr and madee migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
DahlitzFlorian committed Apr 24, 2017
1 parent 4b265df commit 765fbb6
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
39 changes: 39 additions & 0 deletions vocab/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-24 21:21
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='Learnset',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('learnset_name', models.CharField(max_length=200)),
('creation_date', models.DateTimeField(verbose_name='date created')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Vocabulary',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('word', models.CharField(max_length=200)),
('translation', models.CharField(max_length=200)),
('forms', models.CharField(default='', max_length=200)),
('forms_enabled', models.BooleanField(default=False)),
('learnset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vocab.Learnset')),
],
),
]
20 changes: 20 additions & 0 deletions vocab/migrations/0002_auto_20170424_2330.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-24 21:30
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('vocab', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='vocabulary',
name='forms',
field=models.CharField(blank=True, default='', max_length=200),
),
]
2 changes: 1 addition & 1 deletion vocab/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Vocabulary(models.Model):
# attributes
word = models.CharField(max_length=200)
translation = models.CharField(max_length=200)
forms = models.CharField(max_length=200, default="")
forms = models.CharField(max_length=200, default="", blank=True)
forms_enabled = models.BooleanField(default=False)

# object's representation
Expand Down

0 comments on commit 765fbb6

Please sign in to comment.