Changeset - 12e4d0a3cb24
[Not reviewed]
0 6 0
Christopher Neugebauer - 8 years ago 2016-04-01 11:14:39
chrisjrn@gmail.com
flake8
6 files changed with 24 insertions and 15 deletions:
0 comments (0 inline, 0 general)
registrasion/models.py
Show inline comments
...
 
@@ -5,5 +5,4 @@ import itertools
 

	
 
from django.core.exceptions import ValidationError
 
from django.core.exceptions import ObjectDoesNotExist
 
from django.contrib.auth.models import User
 
from django.db import models
registrasion/templatetags/registrasion_tags.py
Show inline comments
...
 
@@ -51,4 +51,5 @@ def items_purchased(context):
 
    return out
 

	
 

	
 
@register.filter
 
def multiply(value, arg):
registrasion/tests/test_discount.py
Show inline comments
...
 
@@ -383,5 +383,9 @@ class DiscountTestCase(RegistrationCartTestCase):
 
        cart = CartController.for_user(self.USER_1)
 
        cart.add_to_cart(self.PROD_1, 1)  # Enable the discount
 
        discounts = discount.available_discounts(self.USER_1, [], [self.PROD_2])
 
        discounts = discount.available_discounts(
 
            self.USER_1,
 
            [],
 
            [self.PROD_2],
 
        )
 
        self.assertEqual(1, len(discounts))
 

	
...
 
@@ -394,5 +398,9 @@ class DiscountTestCase(RegistrationCartTestCase):
 
        cart.cart.save()
 

	
 
        discounts = discount.available_discounts(self.USER_1, [], [self.PROD_2])
 
        discounts = discount.available_discounts(
 
            self.USER_1,
 
            [],
 
            [self.PROD_2],
 
        )
 
        self.assertEqual(0, len(discounts))
 

	
...
 
@@ -400,4 +408,8 @@ class DiscountTestCase(RegistrationCartTestCase):
 
        cart.cart.save()
 

	
 
        discounts = discount.available_discounts(self.USER_1, [], [self.PROD_2])
 
        discounts = discount.available_discounts(
 
            self.USER_1,
 
            [],
 
            [self.PROD_2],
 
        )
 
        self.assertEqual(1, len(discounts))
registrasion/tests/test_refund.py
Show inline comments
 
import datetime
 
import pytz
 

	
 
from decimal import Decimal
 
from django.core.exceptions import ValidationError
 

	
 
from registrasion import models as rego
 
from registrasion.controllers.cart import CartController
 
from registrasion.controllers.invoice import InvoiceController
registrasion/views.py
Show inline comments
 
import symposion.speakers
 
import sys
 

	
...
 
@@ -35,4 +34,5 @@ GuidedRegistrationSection.__new__.__defaults__ = (
 
)
 

	
 

	
 
def get_form(name):
 
    dot = name.rindex(".")
...
 
@@ -41,4 +41,5 @@ def get_form(name):
 
    return getattr(sys.modules[mod_name], form_name)
 

	
 

	
 
@login_required
 
def guided_registration(request, page_id=0):
...
 
@@ -51,5 +52,4 @@ def guided_registration(request, page_id=0):
 
    '''
 

	
 
    dashboard = redirect("dashboard")
 
    next_step = redirect("guided_registration")
 

	
...
 
@@ -72,5 +72,6 @@ def guided_registration(request, page_id=0):
 

	
 
    if not profile:
 
        # TODO: if voucherform is invalid, make sure that profileform does not save
 
        # TODO: if voucherform is invalid, make sure
 
        # that profileform does not save
 
        voucher_form, voucher_handled = handle_voucher(request, "voucher")
 
        profile_form, profile_handled = handle_profile(request, "profile")
...
 
@@ -138,5 +139,4 @@ def guided_registration(request, page_id=0):
 
                    attendee.highest_complete_category = category.id
 

	
 

	
 
    if sections and request.method == "POST":
 
        for section in sections:
...
 
@@ -166,4 +166,5 @@ def edit_profile(request):
 
    return render(request, "registrasion/profile_form.html", data)
 

	
 

	
 
def handle_profile(request, prefix):
 
    ''' Returns a profile form instance, and a boolean which is true if the
...
 
@@ -186,5 +187,4 @@ def handle_profile(request, prefix):
 
        speaker_name = None
 

	
 

	
 
    name_field = ProfileForm.Meta.model.name_field()
 
    initial = {}
...
 
@@ -207,4 +207,5 @@ def handle_profile(request, prefix):
 
    return form, handled
 

	
 

	
 
@login_required
 
def product_category(request, category_id):
setup.py
Show inline comments
...
 
@@ -21,5 +21,6 @@ setup(
 
    author_email="_@chrisjrn.com",
 
    version=registrasion.__version__,
 
    description="A registration app for the Symposion conference management system.",
 
    description="A registration app for the Symposion conference management "
 
                "system.",
 
    url="http://github.com/chrisjrn/registrasion/",
 
    packages=find_packages(),
0 comments (0 inline, 0 general)