Adding users email

This commit is contained in:
Víðir Valberg Guðmundsson 2016-08-27 10:29:26 +02:00
parent 370e9b6d32
commit d0c7484370
2 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-08-27 07:52
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('program', '0008_auto_20160808_1747'),
]
operations = [
migrations.AlterField(
model_name='event',
name='days',
field=models.ManyToManyField(blank=True, to='camps.Day'),
),
]

View file

@ -84,9 +84,22 @@ class OrderAdmin(admin.ModelAdmin):
mark_order_as_refunded.description = 'Mark order(s) as refunded'
def get_user_email(obj):
return obj.order.user.email
@admin.register(models.Ticket)
class TicketModelAdmin(admin.ModelAdmin):
list_display = ['order', 'product', 'name', 'email', 'get_token', 'checked_in']
list_display = [
'order',
'product',
'name',
'email',
get_user_email,
'get_token',
'checked_in'
]
actions = ['mark_as_arrived']