Merge migrations with upstream

Find urlencode, wherever it may hide

Further work to using latest upstream registrasion
This commit is contained in:
James Polley 2017-09-29 23:42:38 +10:00
parent 162b5edc20
commit 105e6988e5
4 changed files with 22 additions and 3 deletions

View file

@ -322,7 +322,7 @@ PROPOSAL_FORMS = {
ATTENDEE_PROFILE_MODEL = "pinaxcon.registrasion.models.AttendeeProfile"
ATTENDEE_PROFILE_FORM = "pinaxcon.registrasion.forms.ProfileForm"
INVOICE_CURRENCY = "AUD"
TICKET_PRODUCT_CATEGORY = 1
ATTENDEE_PROFILE_FORM = "pinaxcon.registrasion.forms.ProfileForm"
# CSRF custom error screen

View file

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-29 13:31
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('registrasion', '0006_auto_20170702_2233'),
('registrasion', '0006_auto_20170526_1624'),
]
operations = [
]

View file

@ -5,7 +5,10 @@ from registrasion.controllers.item import ItemController
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/
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
register = template.Library()

View file

@ -12,7 +12,7 @@ def generate_access_code():
length = 6
# all upper-case letters + digits 1-9 (no 0 vs O confusion)
chars = string.uppercase + string.digits[1:]
chars = string.ascii_uppercase + string.digits[1:]
# 6 chars => 35 ** 6 = 1838265625 (should be enough for anyone)
return get_random_string(length=length, allowed_chars=chars)