Expand admin ui for checkins to be useful for admins

... also (and this really should be another commit, I am a horrible
person) change name of exception text fields
This commit is contained in:
James Polley 2018-01-21 11:43:41 +11:00
parent 98465934ff
commit 971cb5d12d
4 changed files with 33 additions and 8 deletions

View file

@ -19,8 +19,8 @@ admin.site.register( BoardingPass,
admin.site.register( admin.site.register(
CheckIn, CheckIn,
list_display=['user','seen','checked_in','checkin_code'], list_display=['user','seen','checked_in','checkin_code','checked_in_bool','badge_printed','schwag_given','needs_review'],
search_fields=['user','checkin_code'], search_fields=['user__username','checkin_code'],
filter_fields=['seen','checked_in'], list_filter=['seen','checked_in',"checked_in_bool","badge_printed","schwag_given"],
readonly_fields=['user','seen','checked_in','checkin_code'] readonly_fields=['user','seen','checked_in','checkin_code']
) )

View file

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-01-21 00:40
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('regidesk', '0003_auto_20180121_1023'),
]
operations = [
migrations.RenameField(
model_name='checkin',
old_name='exception_set',
new_name='needs_review',
),
migrations.RenameField(
model_name='checkin',
old_name='exception_text',
new_name='review_text',
),
]

View file

@ -74,8 +74,8 @@ class CheckIn(models.Model):
badge_printed = models.BooleanField(default=False) badge_printed = models.BooleanField(default=False)
schwag_given = models.BooleanField(default=False) schwag_given = models.BooleanField(default=False)
checked_in_bool = models.BooleanField(default=False) checked_in_bool = models.BooleanField(default=False)
exception_set = models.BooleanField(default=False) needs_review = models.BooleanField(default=False)
exception_text = models.TextField(blank=True) review_text = models.TextField(blank=True)
class Meta: class Meta:
permissions = ( permissions = (
@ -108,8 +108,8 @@ class CheckIn(models.Model):
self.save() self.save()
def set_exception(self, text): def set_exception(self, text):
self.exception_set = True self.needs_review = True
self.exception_text = text self.review_text = text
self.save() self.save()
@property @property

View file

@ -92,7 +92,7 @@
<div class="panel-heading">Log Exception</div> <div class="panel-heading">Log Exception</div>
<div class="panel-body"> <div class="panel-body">
<form method="post"> <form method="post">
<textarea class="form-control" rows="3" name="exception">{{ check_in.exception_text }}</textarea> <textarea class="form-control" rows="3" name="exception">{{ check_in.review_text }}</textarea>
<p class="help-block">Reminder: Please tell attendee to email boarding@lca2018.org with the details as well</p> <p class="help-block">Reminder: Please tell attendee to email boarding@lca2018.org with the details as well</p>
<input class="btn btn-warning pull-right" type="submit" value="Submit"> <input class="btn btn-warning pull-right" type="submit" value="Submit">
</form> </form>