add issue status
parent
50d34f28e8
commit
9a071bd435
|
@ -3,4 +3,4 @@ from .models import Ticket
|
|||
|
||||
@admin.register(Ticket)
|
||||
class TicketAdmin(admin.ModelAdmin):
|
||||
pass
|
||||
list_display = ('issue_status', 'issue_type', 'name', 'email')
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.2 on 2016-12-19 23:36
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('help', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ticket',
|
||||
name='issue_status',
|
||||
field=models.CharField(choices=[('triage', 'to triage'), ('acked', 'acknowledged'), ('waiting', 'waiting to hear from submitter'), ('completed', 'nothing more to do')], default='triage', max_length=50),
|
||||
),
|
||||
]
|
|
@ -9,6 +9,13 @@ ISSUE_TYPE_CHOICES = (
|
|||
('other', 'something else'),
|
||||
)
|
||||
|
||||
ISSUE_STATUS_CHOICES = (
|
||||
('triage', 'to triage'),
|
||||
('acked', 'acknowledged'),
|
||||
('waiting', 'waiting to hear from submitter'),
|
||||
('completed', 'nothing more to do'),
|
||||
)
|
||||
|
||||
|
||||
class Ticket(Model):
|
||||
name = TextField(blank=False, null=False)
|
||||
|
@ -18,6 +25,11 @@ class Ticket(Model):
|
|||
null=False,
|
||||
max_length=50)
|
||||
issue_text = TextField(blank=False, null=False)
|
||||
issue_status = CharField(choices=ISSUE_STATUS_CHOICES,
|
||||
blank=False,
|
||||
null=False,
|
||||
max_length=50,
|
||||
default=ISSUE_STATUS_CHOICES[0][0])
|
||||
|
||||
def __str__(self):
|
||||
return '{} from {}'.format(self.issue_type, self.name)
|
||||
|
|
Loading…
Reference in New Issue