Changeset - f1262837b436
[Not reviewed]
Merge
0 4 2
Christopher Neugebauer - 5 years ago 2017-10-05 20:16:46
chrisjrn@gmail.com
Merge branch 'master' into prod
6 files changed with 61 insertions and 5 deletions:
0 comments (0 inline, 0 general)
fixtures/sitetree.json
Show inline comments
...
 
@@ -66,25 +66,25 @@
 
        "tree": 1,
 
        "hidden": false,
 
        "alias": null,
 
        "description": "",
 
        "inmenu": true,
 
        "inbreadcrumbs": true,
 
        "insitetree": true,
 
        "access_loggedin": false,
 
        "access_guest": false,
 
        "access_restricted": false,
 
        "access_perm_type": 1,
 
        "parent": 24,
 
        "sort_order": 4,
 
        "sort_order": 32,
 
        "access_permissions": []
 
    }
 
},
 
{
 
    "model": "sitetree.treeitem",
 
    "pk": 8,
 
    "fields": {
 
        "title": "Attend",
 
        "hint": "",
 
        "url": "/attend",
 
        "urlaspattern": false,
 
        "tree": 1,
...
 
@@ -474,25 +474,25 @@
 
        "tree": 1,
 
        "hidden": false,
 
        "alias": null,
 
        "description": "",
 
        "inmenu": true,
 
        "inbreadcrumbs": true,
 
        "insitetree": true,
 
        "access_loggedin": false,
 
        "access_guest": false,
 
        "access_restricted": false,
 
        "access_perm_type": 1,
 
        "parent": 24,
 
        "sort_order": 32,
 
        "sort_order": 4,
 
        "access_permissions": []
 
    }
 
},
 
{
 
    "model": "sitetree.treeitem",
 
    "pk": 33,
 
    "fields": {
 
        "title": "Petaluma",
 
        "hint": "",
 
        "url": "/about/petaluma",
 
        "urlaspattern": false,
 
        "tree": 1,
pinaxcon/templates/registrasion/invoice/details.html
Show inline comments
 
{% extends "registrasion/invoice/details_.html" %}
 

	
 
{% load nbpy_tags %}
 

	
 
{% comment %}
 
  Blocks that you can override:
 

	
 
  - heading
 
  - subheading
 
  - invoice_intro
 
  - extra_line_items
 
  - contact_info
 

	
 
{% endcomment %}
 

	
 
{% block heading %}
...
 
@@ -23,26 +26,35 @@
 
{% endblock %}
 

	
 
{% block invoice_intro %}
 
  {% if invoice.is_unpaid %}
 
    This is a registration summary for North Bay Python 2017. It is not confirmed until paid in full.
 
  {% elif invoice.is_void %}
 
    This is a void registration summary for North Bay Python 2017. It is provided for informational purposes only.
 
  {% elif invoice.is_refunded %}
 
    This is a refunded registration summary for North Bay Python 2017. It is provided for informational purposes only.
 
  {% elif invoice.is_paid %}
 
    This is a confirmed registration summary for North Bay Python 2017.
 
  {% endif %}
 
{% endblock %}
 

	
 
{% block extra_line_items_after_total %}
 
  {% donation_income invoice as donation %}
 
  {% if donation %}
 
    <tr>
 
      <td colspan="3">Includes donation eligible for tax deduction in the USA:</td>
 
      <td class="text-right">${{ donation }}</td>
 
    </tr>
 
  {% endif %}
 
{% endblock %}
 

	
 
{% block contact_info %}
 
  <p>Direct inquiries to <a href="mailto:spam@northbaypython.org">spam@northbaypython.org</a></p>
 
  <p>North Bay Python is run by North Bay and Bay Area locals, as a member project of <a href="https://sfconservancy.org">Software Freedom Conservancy</a>, a 501(c)(3) public charity registered in New York.</p>
 
  <p>North Bay Python is run by North Bay and Bay Area locals, as a member project of <a href="https://sfconservancy.org">Software Freedom Conservancy</a>, a 501(c)(3) not-for-profit public charity registered in New York. Software Freedom Conservancy's federal tax-exempt EIN is 41-2203632.</p>
 

	
 
  <strong>Mailing Address</strong>
 
  <address>
 
    Software Freedom Conservancy, Inc.<br>
 
    137 MONTAGUE ST STE 380<br>
 
    Brooklyn, NY 11201-3548<br>
 
  </address>
 
{% endblock %}
pinaxcon/templates/static_pages/news.html
Show inline comments
...
 
@@ -4,25 +4,25 @@
 

	
 
{% block head_title %}News{% endblock %}
 

	
 
{% block heading %}News{% endblock %}
 

	
 
{% block body_class %}news{% endblock %}
 

	
 
{% block content %}
 

	
 
<a name="3"></a>
 
<h2>Tickets now on sale for North Bay Python 2017</h2>
 

	
 
<p><span class="date">Tuesday, October 3, 2017</span>&mdash;We are excited to announce that <a href="https://2017.northbaypython.org/tickets">tickets are now on sale</a> for North Bay Python 2017. With just two months until the conference we have a few key dates coming up:</p>
 
<p><span class="date">Thursday, October 5, 2017</span>&mdash;We are excited to announce that <a href="https://2017.northbaypython.org/tickets">tickets are now on sale</a> for North Bay Python 2017. With just two months until the conference we have a few key dates coming up:</p>
 

	
 
<ul>
 
  <li><a href="https://2017.northbaypython.org/tickets">Tickets</a> are available at a discount until Friday, October 20.</li>
 
  <li><a href="https://2017.northbaypython.org/attend/hotels">Hotel rooms</a> are available at a discount until Wednesday, November 1.</li>
 
  <li><a href="https://2017.northbaypython.org/attend/tshirts">T-shirts</a> can be ordered until Tuesday, November 7.</li>
 
</ul>
 

	
 
<p>Can't afford a ticket? Please email <a href="mailto:spam@northbaypython.org">spam@northbaypython.org</a>. We'll enthusiastically waive ticket fees for people who ask.</p>
 

	
 
<p>Need to get approval from your manager to attend North Bay Python 2017? We've outlined the <a href="https://2017.northbaypython.org/attend/business-case">business case</a> to make it clear that North Bay Python is a wise investment.</p>
 

	
 
<p>We've prepared a basic <a href="https://2017.northbaypython.org/about/petaluma">travel guide</a> with lodging and travel information. This resource will grow to include local restaurants and other amenities.</p>
pinaxcon/templates/static_pages/program/call_for_proposals.md
Show inline comments
 
### The North Bay Python 2017 CFP is open!
 
### The North Bay Python 2017 CFP closed on September 29
 

	
 
We've got lots of good information and resources below that you should read, but in case you've already read it and want to dive in now:
 

	
 
<div class="btn-group">
 
  <a class="btn btn-lg btn-primary" href="/dashboard">Submit a Proposal</a>
 
</div>
 

	
 
If you've never presented at a conference before and think you might like to try it, we want to hear from you! The program committee is *very* much interested in encouraging and supporting new speakers, and we will be able to provide detailed feedback and work with you to develop your proposal and talk content so you can give the best talk possible.
 

	
 
In the interest of transparency, we have documented our [selection process](/program/selection-process). Portions of this page were drawn from ideas seen on [DjangoCon EU](https://djangocon.eu), [SeaGL](https://seagl.org), [Fog City Ruby](http://www.fogcityruby.com/speak/), and others. Thanks to all for their inspiration and permission to borrow!
 

	
 
## Dates<a name="dates"></a>
pinaxcon/templatetags/__init__.py
Show inline comments
 
new file 100644
pinaxcon/templatetags/nbpy_tags.py
Show inline comments
 
new file 100644
 
from registrasion.models import commerce
 
from registrasion.controllers.category import CategoryController
 
from registrasion.controllers.item import ItemController
 

	
 
from decimal import Decimal
 
from django import template
 
from django.conf import settings
 
from django.db.models import Sum
 
from urllib import urlencode  # TODO: s/urllib/six.moves.urllib/
 

	
 
register = template.Library()
 

	
 

	
 
@register.simple_tag(takes_context=True)
 
def donation_income(context, invoice):
 
    ''' Calculates the donation income for a given invoice.
 

	
 
    Returns:
 
        the donation income.
 

	
 
    '''
 

	
 
    # 15% (FSA) goes to Conservancy; 85% is real goods
 

	
 
    fsa_rate = Decimal("0.85")
 
    rbi_full_ticket = Decimal("68.00")
 
    rbi_early_bird_discount = Decimal("-21.35")
 
    rbi = []
 

	
 
    for line in invoice.lineitem_set.all():
 
        if line.product.category.name == "Ticket":
 
            if line.product.name.startswith("Unaffiliated Individual"):
 
                # Includes full price & discounts
 
                rbi.append(line.total_price * fsa_rate)
 
            else:
 
                if line.total_price > 0:
 
                    rbi.append(rbi_full_ticket)
 
                elif line.total_price < 0:
 
                    rbi.append(rbi_early_bird_discount)
 
        elif line.product.category.name == "T-Shirt":
 
            rbi.append(line.total_price * fsa_rate)
 

	
 
    donation = (invoice.value - sum(rbi))
 
    return donation.quantize(Decimal('.01'))
0 comments (0 inline, 0 general)