Adding users email
This commit is contained in:
parent
370e9b6d32
commit
d0c7484370
20
program/migrations/0009_auto_20160827_0752.py
Normal file
20
program/migrations/0009_auto_20160827_0752.py
Normal 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'),
|
||||
),
|
||||
]
|
|
@ -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']
|
||||
|
||||
|
|
Loading…
Reference in a new issue