Changes 'notes' fields to be textfield - not charfield

This commit is contained in:
Oliver 2018-04-18 01:16:30 +10:00
parent cd903112cc
commit d8d3509b5e
10 changed files with 161 additions and 4 deletions

View File

@ -16,17 +16,21 @@ class Company(models.Model):
abstract = True
name = models.CharField(max_length=100, unique=True)
description = models.CharField(max_length=500)
website = models.URLField(blank=True)
address = models.CharField(max_length=200,
blank=True)
phone = models.CharField(max_length=50,
blank=True)
email = models.EmailField(blank=True)
contact = models.CharField(max_length=100,
blank=True)
notes = models.CharField(max_length=500,
blank=True)
notes = models.TextField(blank=True)
def __str__(self):
return self.name

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 15:14
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('build', '0010_auto_20180418_0028'),
]
operations = [
migrations.AlterField(
model_name='build',
name='status',
field=models.PositiveIntegerField(choices=[(40, 'Complete'), (10, 'Pending'), (20, 'Holding'), (30, 'Cancelled')], default=10, validators=[django.core.validators.MinValueValidator(0)]),
),
]

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 15:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('build', '0011_auto_20180417_1514'),
]
operations = [
migrations.AlterField(
model_name='build',
name='notes',
field=models.TextField(blank=True),
),
]

View File

@ -60,7 +60,7 @@ class Build(models.Model):
help_text='Number of parts to build')
# Notes can be attached to each build output
notes = models.CharField(max_length=500, blank=True)
notes = models.TextField(blank=True)
@property
def is_active(self):

View File

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 15:14
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('customer', '0002_auto_20180418_0028'),
]
operations = [
migrations.AlterField(
model_name='customerorderline',
name='customer_order',
field=models.ForeignKey(help_text=b'Order this line belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='lines', to='customer.CustomerOrder'),
),
migrations.AlterField(
model_name='customerorderline',
name='part',
field=models.ForeignKey(blank=True, help_text=b'Part', on_delete=django.db.models.deletion.CASCADE, to='part.Part'),
),
]

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 15:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('customer', '0003_auto_20180417_1514'),
]
operations = [
migrations.AlterField(
model_name='customer',
name='notes',
field=models.TextField(blank=True),
),
]

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 15:14
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stock', '0014_auto_20180418_0028'),
]
operations = [
migrations.AlterField(
model_name='stockitem',
name='status',
field=models.PositiveIntegerField(choices=[(10, 'OK'), (60, 'Destroyed'), (50, 'Attention needed'), (55, 'Damaged')], default=10, validators=[django.core.validators.MinValueValidator(0)]),
),
]

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 15:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stock', '0015_auto_20180417_1514'),
]
operations = [
migrations.AlterField(
model_name='stockitem',
name='notes',
field=models.TextField(blank=True),
),
]

View File

@ -131,7 +131,7 @@ class StockItem(models.Model):
choices=ITEM_STATUS_CODES.items(),
validators=[MinValueValidator(0)])
notes = models.CharField(max_length=100, blank=True)
notes = models.TextField(blank=True)
# If stock item is incoming, an (optional) ETA field
# expected_arrival = models.DateField(null=True, blank=True)

View File

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-17 15:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('supplier', '0008_delete_customer'),
]
operations = [
migrations.AlterField(
model_name='manufacturer',
name='notes',
field=models.TextField(blank=True),
),
migrations.AlterField(
model_name='supplier',
name='notes',
field=models.TextField(blank=True),
),
]