From 878da1f2d8291550a2cc2d96ecd7ccdd568a28f8 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Mon, 5 Sep 2016 19:45:44 +1000 Subject: [PATCH] Use textfield for some things rather than char field --- .../migrations/0005_auto_20160905_0945.py | 35 +++++++++++++++++++ registrasion/models/inventory.py | 10 +++--- 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 registrasion/migrations/0005_auto_20160905_0945.py diff --git a/registrasion/migrations/0005_auto_20160905_0945.py b/registrasion/migrations/0005_auto_20160905_0945.py new file mode 100644 index 00000000..e5909394 --- /dev/null +++ b/registrasion/migrations/0005_auto_20160905_0945.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.2 on 2016-09-05 09:45 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('registrasion', '0004_groupmemberdiscount_groupmemberflag'), + ] + + operations = [ + migrations.AlterField( + model_name='category', + name='description', + field=models.TextField(verbose_name='Description'), + ), + migrations.AlterField( + model_name='category', + name='name', + field=models.CharField(max_length=255, verbose_name='Name'), + ), + migrations.AlterField( + model_name='product', + name='description', + field=models.TextField(blank=True, null=True, verbose_name='Description'), + ), + migrations.AlterField( + model_name='product', + name='name', + field=models.CharField(max_length=255, verbose_name='Name'), + ), + ] diff --git a/registrasion/models/inventory.py b/registrasion/models/inventory.py index bb1b0e19..575566e2 100644 --- a/registrasion/models/inventory.py +++ b/registrasion/models/inventory.py @@ -71,11 +71,10 @@ class Category(models.Model): ] name = models.CharField( - max_length=65, + max_length=255, verbose_name=_("Name"), ) - description = models.CharField( - max_length=255, + description = models.TextField( verbose_name=_("Description"), ) limit_per_user = models.PositiveIntegerField( @@ -143,11 +142,10 @@ class Product(models.Model): return "%s - %s" % (self.category.name, self.name) name = models.CharField( - max_length=65, + max_length=255, verbose_name=_("Name"), ) - description = models.CharField( - max_length=255, + description = models.TextField( verbose_name=_("Description"), null=True, blank=True,