Changeset - c56c7498700b
[Not reviewed]
1 4 1
Christopher Neugebauer - 5 years ago 2016-04-26 09:11:06
chrisjrn@gmail.com
Prepares registrasion-demo to match the 0.1 release of registrasion.
6 files changed with 28 insertions and 67 deletions:
0 comments (0 inline, 0 general)
README.md
Show inline comments
 
deleted file
README.rst
Show inline comments
 
new file 100644
 
registrasion-demo
 
=================
 

	
 
PinaxCon
 
---------
 
`PinaxCon` is a working demo of Symposion and the Symposion Starter Project. It usually lives at https://github.com/pinax/PinaxCon
 

	
 
This is a fork of PinaxCon to demonstrate Registrasion, a registration package that works well with Symposion. You can find Registrasion at https://github.com/chrisjrn/registrasion
 

	
 
Registrasion has relaively complete docs at http://registrasion.readthedocs.org
 

	
 

	
 
What is the point of this?
 
--------------------------
 
This project provides some starter templates for much of the functionality of Registrasion, as well as demos of how to make payments and enter user profiles.
 

	
 
If you care to, you can also use this project as a starting point for your own Registrasion-based site.
fixtures/registrasion.json
Show inline comments
...
 
@@ -359,25 +359,25 @@
 
{
 
  "model": "registrasion.includedproductdiscount",
 
  "pk": 4,
 
  "fields": {
 
    "enabling_products": [
 
      1,
 
      2,
 
      3
 
    ]
 
  }
 
},
 
{
 
  "model": "registrasion.enablingconditionbase",
 
  "model": "registrasion.flagbase",
 
  "pk": 1,
 
  "fields": {
 
    "description": "Extra accommodation depends on Accommodation",
 
    "condition": 2,
 
    "products": [],
 
    "categories": [
 
      5
 
    ]
 
  }
 
},
 
{
 
  "model": "registrasion.categoryflag",
pinaxcon/registrasion/models.py
Show inline comments
...
 
@@ -2,25 +2,25 @@ from django.db import models
 
from registrasion import models as rego
 

	
 
class AttendeeProfile(rego.AttendeeProfileBase):
 

	
 
    @classmethod
 
    def name_field(cls):
 
        ''' This is used to pre-fill the attendee's name from the
 
        speaker profile. If it's None, that functionality is disabled. '''
 
        return "name"
 

	
 
    def invoice_recipient(self):
 
        if self.company:
 
            base = "%(name_per_invoice)s c/- %(company)s"
 
            base = "\n%(company)s\nAttention: %(name_per_invoice)s"
 
        else:
 
            base = "%(name_per_invoice)s"
 
        return base % self.__dict__
 

	
 
    def save(self):
 
        if not self.name_per_invoice:
 
            self.name_per_invoice = self.name
 
        super(AttendeeProfile, self).save()
 

	
 
    # Things that appear on badge
 
    name = models.CharField(
 
        verbose_name="Your name (for your conference nametag)",
pinaxcon/templates/registrasion/invoice.html
Show inline comments
...
 
@@ -17,42 +17,43 @@
 

	
 
  <div>
 
    <a class="btn btn-default" href="{% url "demopay" invoice.id invoice.user.attendee.access_code %}">Pay this invoice</a>
 
    {% if user.is_staff %}
 
      <a class="btn btn-default" href="{% url "manual_payment" invoice.id %}">Apply manual payment</a>
 
    {% endif %}
 
  </div>
 
{% elif invoice.is_paid %}
 
  {% if user.is_staff %}
 
  <div>
 
    {% if user.is_staff %}
 
    <a class="btn btn-default" href="{% url "manual_payment" invoice.id %}">Apply manual payment/refund</a>
 
    <a class="btn btn-default" href="{% url "refund" invoice.id %}">Refund by issuing credit note</a>
 
    {% endif %}
 
  </div>
 
  {% endif %}
 
{% endif %}
 

	
 
<hr />
 

	
 
<h2>Invoice</h2>
 

	
 
{% with invoice_user=invoice.cart.user %}
 
  <ul>
 
    <li><strong>Invoice number:</strong> {{ invoice.id }}
 
    <li><strong>Invoice status:</strong> {{ invoice.get_status_display }}</li>
 
    <li><strong>Issue date:</strong> {{ invoice.issue_time|date:"DATE_FORMAT" }}
 
    {% if not invoice.is_void %}
 
      <li><strong>Due:</strong> {{ invoice.due_time|date:"DATETIME_FORMAT"}}</li>
 
    {% endif %}
 
    <li><strong>Attention:</strong> {{ invoice_user.attendee.attendeeprofilebase.invoice_recipient }}</li>
 
    <li><strong>Recipient:</strong> {{ invoice_user.attendee.attendeeprofilebase.invoice_recipient|linebreaksbr}}</li>
 
  </ul>
 
{% endwith %}
 

	
 
<p>This invoice has been issued as a result of an application to attend (conference name).</p>
 

	
 

	
 
<table class="table table-striped">
 
  <tr>
 
    <th>Description</th>
 
    <th class="text-right">Quantity</th>
 
    <th class="text-right">Price/Unit</th>
 
    <th class="text-right">Total</th>
requirements.txt
Show inline comments
 
Django==1.9.2
 
pinax-theme-bootstrap==7.3.0
 
django-user-accounts==1.3.1
 
metron==1.3.7
 
pinax-eventlog==1.1.1
 
dj-static==0.0.6
 
dj-database-url==0.4.0
 
pinax-pages==0.4.2
 
pinax-boxes==2.1.2
 

	
 
# run off of master for now
 
git+https://github.com/pinax/symposion.git
 
git+https://github.com/chrisjrn/registrasion.git@demo_site_integration
 
# For testing
 
django-nose==1.4.3
 
coverage==4.0.3
 

	
 
# Registrasion
 
registrasion==0.1.0
 
https://github.com/pinax/symposion/tarball/ad81810#egg=symposion
0 comments (0 inline, 0 general)