Merge pull request #370 from alexbarcelo/admin-fixes

Making Queue slug unique and improving certain admin-related behaviour
This commit is contained in:
Ross Poulton 2015-12-22 09:30:29 +11:00
commit 62b635df81
3 changed files with 27 additions and 0 deletions

View File

@ -7,6 +7,7 @@ from helpdesk.models import CustomField
class QueueAdmin(admin.ModelAdmin):
list_display = ('title', 'slug', 'email_address', 'locale')
prepopulated_fields = {"slug": ("title",)}
class TicketAdmin(admin.ModelAdmin):
list_display = ('title', 'status', 'assigned_to', 'queue', 'hidden_submitter_email',)

View File

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('helpdesk', '0010_remove_queuemembership'),
]
operations = [
migrations.AlterField(
model_name='queue',
name='permission_name',
field=models.CharField(editable=False, max_length=50, blank=True, help_text='Name used in the django.contrib.auth permission system', null=True, verbose_name='Django auth permission name'),
),
migrations.AlterField(
model_name='queue',
name='slug',
field=models.SlugField(help_text="This slug is used when building ticket ID's. Once set, try not to change it or e-mailing may get messy.", unique=True, verbose_name='Slug'),
),
]

View File

@ -45,6 +45,7 @@ class Queue(models.Model):
slug = models.SlugField(
_('Slug'),
max_length=50,
unique=True,
help_text=_('This slug is used when building ticket ID\'s. Once set, '
'try not to change it or e-mailing may get messy.'),
)
@ -179,6 +180,7 @@ class Queue(models.Model):
max_length=50,
blank=True,
null=True,
editable=False,
help_text=_('Name used in the django.contrib.auth permission system'),
)