From c422ba6008eb6e85d49d8802f887ade7324d28a6 Mon Sep 17 00:00:00 2001 From: nathaniel smith Date: Fri, 10 Nov 2017 15:33:09 -0800 Subject: [PATCH] improve quality of life on help ticket admin --- ttadmin/help/admin.py | 1 + .../migrations/0003_auto_20171110_2323.py | 20 +++++++++++++++++++ ttadmin/help/models.py | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ttadmin/help/migrations/0003_auto_20171110_2323.py diff --git a/ttadmin/help/admin.py b/ttadmin/help/admin.py index 9b05efd..61cd79b 100644 --- a/ttadmin/help/admin.py +++ b/ttadmin/help/admin.py @@ -4,3 +4,4 @@ from .models import Ticket @admin.register(Ticket) class TicketAdmin(admin.ModelAdmin): list_display = ('issue_status', 'issue_type', 'name', 'email') + fields = ('name', 'email', 'issue_status', 'issue_type', 'issue_text') diff --git a/ttadmin/help/migrations/0003_auto_20171110_2323.py b/ttadmin/help/migrations/0003_auto_20171110_2323.py new file mode 100644 index 0000000..7a5af5e --- /dev/null +++ b/ttadmin/help/migrations/0003_auto_20171110_2323.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.2 on 2017-11-10 23:23 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('help', '0002_ticket_issue_status'), + ] + + operations = [ + migrations.AlterField( + model_name='ticket', + name='name', + field=models.CharField(max_length=100), + ), + ] diff --git a/ttadmin/help/models.py b/ttadmin/help/models.py index 2d92ae5..06962e8 100644 --- a/ttadmin/help/models.py +++ b/ttadmin/help/models.py @@ -18,7 +18,7 @@ ISSUE_STATUS_CHOICES = ( class Ticket(Model): - name = TextField(blank=False, null=False) + name = CharField(blank=False, null=False, max_length=100) email = EmailField(blank=False, null=False) issue_type = CharField(choices=ISSUE_TYPE_CHOICES, blank=False,