Changeset - 7fac10241ec7
[Not reviewed]
0 3 0
Joel Addison - 4 years ago 2020-01-10 12:49:17
joel@addison.net.au
Improve attendee reports

Display attendee profile data in normal table without DataTables so
sorting is not applied, causing data to be confusing to read.
Include item quantity in attendee data report for accurate schwag packing.
3 files changed with 15 insertions and 8 deletions:
0 comments (0 inline, 0 general)
pinaxcon/registrasion/models.py
Show inline comments
...
 
@@ -82,4 +82,5 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    )
 
    company = models.CharField(
 
        verbose_name="Company",
 
        max_length=64,
 
        help_text="The name of your company, as you'd like it on your badge",
...
 
@@ -134,4 +135,5 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    )
 
    country = CountryField(
 
        verbose_name="Country",
 
        default="AU",
 
    )
...
 
@@ -160,4 +162,5 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    )
 
    gender = models.CharField(
 
        verbose_name="Gender",
 
        help_text="Gender data will only be used for demographic purposes.",
 
        max_length=64,
...
 
@@ -166,4 +169,5 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 

	
 
    children = models.CharField(
 
        verbose_name="Child Ages and Information",
 
        max_length=256,
 
        help_text="Linux.conf.au is a family friendly conference and provides "
pinaxcon/templates/registrasion/report.html
Show inline comments
...
 
@@ -25,7 +25,4 @@
 
{% if report.headings %}
 
<table class="table table-striped table-reportdata">
 
{% else %}
 
<table class="table table-striped">
 
{% endif %}
 
  <thead>
 
    <tr>
...
 
@@ -35,11 +32,12 @@
 
    </tr>
 
  </thead>
 
{% else %}
 
<table class="table table-striped">
 
{% endif %}
 
  <tbody>
 
    {% for line in report.rows %}
 
    <tr>
 
      {% for item in line %}
 
            <td>
 
                {{ item|safe }}
 
            </td>
 
      <td>{{ item|safe }}</td>
 
      {% endfor %}
 
    </tr>
vendor/registrasion/registrasion/reporting/views.py
Show inline comments
...
 
@@ -599,4 +599,6 @@ def attendee(request, form, user_id=None):
 
        profile_data.append((field.verbose_name, value))
 

	
 
    profile_data.insert(1, ("Email", attendee.user.email))
 

	
 
    cart = CartController.for_user(attendee.user)
 
    try:
...
 
@@ -607,5 +609,7 @@ def attendee(request, form, user_id=None):
 
    profile_data.append(("Current cart reserved until", reservation))
 

	
 
    reports.append(ListReport("Profile", ["", ""], profile_data))
 
    # No column headings, as this has row headings instead and sorting makes
 
    # everything confusing.
 
    reports.append(ListReport("Profile", None, profile_data))
 

	
 
    links = []
...
 
@@ -888,5 +892,5 @@ def attendee_data(request, form, user_id=None):
 
                return "Bad value found for %s" % attr
 

	
 
    headings = ["User ID", "Name", "Email", "Product", "Item Status"]
 
    headings = ["User ID", "Name", "Email", "Product", "Quantity", "Item Status"]
 
    headings.extend(field_names)
 
    data = []
...
 
@@ -898,4 +902,5 @@ def attendee_data(request, form, user_id=None):
 
            profile.attendee.user.email,
 
            item.product,
 
            item.quantity,
 
            status_display[item.cart.status],
 
        ] + [
0 comments (0 inline, 0 general)