Changeset - 39b556b7ac4f
[Not reviewed]
pinaxcon/csrf_view.py
Show inline comments
 
from django.conf import settings
 
from django.http import HttpResponseForbidden
 
from django.shortcuts import redirect
 
from django.template import Context, RequestContext, loader
 
from django.utils.translation import ugettext as _
 
from django.utils.version import get_docs_version
 

	
 

	
 
def csrf_failure(request, reason=""):
 

	
pinaxcon/disable_cscache.py
Show inline comments
 
from django.utils.cache import add_never_cache_headers
 

	
 

	
 
class DisableClientSideCachingMiddleware(object):
 
    def process_response(self, request, response):
 
        add_never_cache_headers(response)
 
        return response
 

	
pinaxcon/monkey_patch.py
Show inline comments
 
from django.conf import settings
 
from django.core.mail import EmailMultiAlternatives
 
from django.core.mail import EmailMultiAlternatives  # noqa: F401
 
from functools import wraps
 

	
...
 
@@ -20,5 +20,5 @@ def do_monkey_patch():
 
    # Remove this function from existence
 
    global do_monkey_patch
 
    do_monkey_patch = lambda: None
 
    do_monkey_patch = lambda: None  # noqa: E731
 

	
 

	
...
 
@@ -35,5 +35,5 @@ def patch_speaker_profile_form():
 

	
 

	
 
def patch_mail_to_send_bcc():
 
def patch_mail_to_send_bcc():  # noqa: C901
 
    ''' Patches django.core.mail's message classes to send a BCC e-mail to
 
    the default BCC e-mail address. '''
...
 
@@ -81,5 +81,4 @@ def patch_mail_to_send_bcc():
 
        return tuple(a[:pos] + (bcc,) + a[pos + 1:])
 

	
 

	
 
    def patch_bcc_keyword(f, k):
 
        ''' Adds our BCC list to the BCC list in the keyword arguments, and
...
 
@@ -140,4 +139,5 @@ def fix_sitetree_check_access_500s():
 
    SiteTree.check_access = check_access
 

	
 

	
 
def never_cache_login_page():
 
    from django.views.decorators.cache import never_cache
...
 
@@ -146,5 +146,5 @@ def never_cache_login_page():
 

	
 

	
 
def patch_stripe_payment_form():
 
def patch_stripe_payment_form():  # noqa: C901
 

	
 
    import inspect  # Oh no.
pinaxcon/proposals/admin.py
Show inline comments
...
 
@@ -19,5 +19,4 @@ from symposion.proposals import models as symposion_models
 
@admin.register(models.LawProposal)
 
@admin.register(models.OpenHardwareProposal)
 

	
 
class CategoryAdmin(admin.ModelAdmin):
 

	
pinaxcon/proposals/forms.py
Show inline comments
...
 
@@ -9,4 +9,5 @@ from .models import GamesProposal, TestingProposal, LawProposal, OpenHardwarePro
 
from .models import KnowledgeProposal
 

	
 

	
 
class ProposalForm(forms.ModelForm):
 

	
...
 
@@ -38,7 +39,7 @@ class TalkProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
...
 
@@ -62,7 +63,7 @@ class TutorialProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
...
 
@@ -80,9 +81,10 @@ class MiniconfProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class SysAdminProposalForm(ProposalForm):
 

	
...
 
@@ -92,5 +94,5 @@ class SysAdminProposalForm(ProposalForm):
 
            "title",
 
            "talk_format",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -103,9 +105,10 @@ class SysAdminProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class WriteTheDocsProposalForm(ProposalForm):
 

	
...
 
@@ -115,5 +118,5 @@ class WriteTheDocsProposalForm(ProposalForm):
 
            "title",
 
            "talk_format",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -126,9 +129,10 @@ class WriteTheDocsProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class RadioProposalForm(ProposalForm):
 

	
...
 
@@ -137,5 +141,5 @@ class RadioProposalForm(ProposalForm):
 
        fields = [
 
            "title",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -148,9 +152,10 @@ class RadioProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class KernelProposalForm(ProposalForm):
 

	
...
 
@@ -159,5 +164,5 @@ class KernelProposalForm(ProposalForm):
 
        fields = [
 
            "title",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -170,9 +175,10 @@ class KernelProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class WootconfProposalForm(ProposalForm):
 

	
...
 
@@ -181,5 +187,5 @@ class WootconfProposalForm(ProposalForm):
 
        fields = [
 
            "title",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -192,9 +198,10 @@ class WootconfProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class SecurityProposalForm(ProposalForm):
 

	
...
 
@@ -203,5 +210,5 @@ class SecurityProposalForm(ProposalForm):
 
        fields = [
 
            "title",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -214,9 +221,10 @@ class SecurityProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class GamesProposalForm(ProposalForm):
 

	
...
 
@@ -226,5 +234,5 @@ class GamesProposalForm(ProposalForm):
 
            "title",
 
            "talk_format",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -237,9 +245,10 @@ class GamesProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class TestingProposalForm(ProposalForm):
 

	
...
 
@@ -248,5 +257,5 @@ class TestingProposalForm(ProposalForm):
 
        fields = [
 
            "title",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -259,9 +268,10 @@ class TestingProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class KnowledgeProposalForm(ProposalForm):
 

	
...
 
@@ -270,5 +280,5 @@ class KnowledgeProposalForm(ProposalForm):
 
        fields = [
 
            "title",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -281,9 +291,10 @@ class KnowledgeProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class LawProposalForm(ProposalForm):
 

	
...
 
@@ -292,5 +303,5 @@ class LawProposalForm(ProposalForm):
 
        fields = [
 
            "title",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -303,9 +314,10 @@ class LawProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
 

	
 

	
 
class OpenHardwareProposalForm(ProposalForm):
 

	
...
 
@@ -315,5 +327,5 @@ class OpenHardwareProposalForm(ProposalForm):
 
            "title",
 
            "talk_format",
 
            "target_audience",  
 
            "target_audience",
 
            "abstract",
 
            "private_abstract",
...
 
@@ -326,6 +338,6 @@ class OpenHardwareProposalForm(ProposalForm):
 

	
 
        widgets = {
 
            "abstract" : widgets.AceMarkdownEditor(),
 
            "private_abstract" : widgets.AceMarkdownEditor(),
 
            "technical_requirements" : widgets.AceMarkdownEditor(),
 
            "abstract": widgets.AceMarkdownEditor(),
 
            "private_abstract": widgets.AceMarkdownEditor(),
 
            "technical_requirements": widgets.AceMarkdownEditor(),
 
        }
pinaxcon/proposals/models.py
Show inline comments
...
 
@@ -46,4 +46,5 @@ class TalkProposal(Proposal):
 
        verbose_name = "talk proposal"
 

	
 

	
 
class TutorialProposal(Proposal):
 

	
...
 
@@ -51,4 +52,5 @@ class TutorialProposal(Proposal):
 
        verbose_name = "tutorial proposal"
 

	
 

	
 
class MiniconfProposal(ProposalBase):
 

	
...
 
@@ -56,35 +58,39 @@ class MiniconfProposal(ProposalBase):
 
        verbose_name = "miniconf proposal"
 

	
 

	
 
class SysAdminProposal(Proposal):
 

	
 
    TYPE_SHORT_PRESENTATION = 1
 
    TYPE_LIGHTNING_TALK = 2
 
    
 

 
    TALK_FORMATS = [
 
        (TYPE_SHORT_PRESENTATION, "Short Presentation (15-25 min)"),
 
        (TYPE_LIGHTNING_TALK, "Lightning Talk (5-10 min)"),
 
    ]
 
    
 
    talk_format = models.IntegerField(choices=TALK_FORMATS,
 

	
 
    talk_format = models.IntegerField(
 
        choices=TALK_FORMATS,
 
        help_text="Please indicate your preferred talk length in the private abstract field below.")
 
    
 

 
    class Meta:
 
        verbose_name = "System Administration Miniconf Proposal"
 

	
 

	
 
class WriteTheDocsProposal(Proposal):
 

	
 
    TYPE_LONG_PRESENTATION = 1 
 
    TYPE_LONG_PRESENTATION = 1
 
    TYPE_SHORT_PRESENTATION = 2
 
    
 

 
    TALK_FORMATS = [
 
        (TYPE_LONG_PRESENTATION, "Long Presentation (40 min)"),  
 
        (TYPE_LONG_PRESENTATION, "Long Presentation (40 min)"),
 
        (TYPE_SHORT_PRESENTATION, "Short Presentation (20 min)"),
 
    ]
 
    
 

 
    talk_format = models.IntegerField(choices=TALK_FORMATS)
 
    
 

 
    class Meta:
 
        verbose_name = "WriteThe Docs Miniconf Proposal"
 

	
 

	
 
class OpenRadioProposal(Proposal):
 

	
...
 
@@ -92,4 +98,5 @@ class OpenRadioProposal(Proposal):
 
        verbose_name = "OpenRadio Miniconf Proposal"
 

	
 

	
 
class WootconfProposal(Proposal):
 

	
...
 
@@ -97,4 +104,5 @@ class WootconfProposal(Proposal):
 
        verbose_name = "WOOTCONF Miniconf Proposal"
 

	
 

	
 
class KernelProposal(Proposal):
 

	
...
 
@@ -102,4 +110,5 @@ class KernelProposal(Proposal):
 
        verbose_name = "Kernel Miniconf Proposal"
 

	
 

	
 
class SecurityProposal(Proposal):
 

	
...
 
@@ -107,4 +116,5 @@ class SecurityProposal(Proposal):
 
        verbose_name = "Security/Privacy Miniconf Proposal"
 

	
 

	
 
class GamesProposal(Proposal):
 

	
...
 
@@ -118,10 +128,11 @@ class GamesProposal(Proposal):
 
        (TYPE_OTHER, "Other"),
 
    ]
 
    
 

 
    talk_format = models.IntegerField(choices=TALK_FORMATS)
 
    
 

 
    class Meta:
 
        verbose_name = "Games and FOSS Miniconf Proposal"
 

	
 

	
 
class TestingProposal(Proposal):
 

	
...
 
@@ -129,4 +140,5 @@ class TestingProposal(Proposal):
 
        verbose_name = "Testing/Automation Miniconf Proposal"
 

	
 

	
 
class KnowledgeProposal(Proposal):
 

	
...
 
@@ -134,4 +146,5 @@ class KnowledgeProposal(Proposal):
 
        verbose_name = "Open Knowledge Australia Miniconf Proposal"
 

	
 

	
 
class LawProposal(Proposal):
 

	
...
 
@@ -139,16 +152,17 @@ class LawProposal(Proposal):
 
        verbose_name = "Open Law and Policy Miniconf Proposal"
 

	
 

	
 
class OpenHardwareProposal(Proposal):
 

	
 
    TYPE_NORMAL_PRESENTATION = 1 
 
    TYPE_NORMAL_PRESENTATION = 1
 
    TYPE_LIGHTNING_TALK = 2
 
    
 

 
    TALK_FORMATS = [
 
        (TYPE_NORMAL_PRESENTATION, "Presentation (20 min)"),  
 
        (TYPE_NORMAL_PRESENTATION, "Presentation (20 min)"),
 
        (TYPE_LIGHTNING_TALK, "Lightning Talk (5 min)"),
 
    ]
 
    
 

 
    talk_format = models.IntegerField(choices=TALK_FORMATS)
 
    
 

 
    class Meta:
 
        verbose_name = "Open Hardware Miniconf Proposal"
pinaxcon/registrasion/forms.py
Show inline comments
...
 
@@ -9,5 +9,5 @@ class YesNoField(forms.TypedChoiceField):
 
        super(YesNoField, self).__init__(
 
            *a,
 
            coerce=lambda x: x =='True',
 
            coerce=lambda x: x == 'True',
 
            choices=((False, 'No'), (True, 'Yes')),
 
            widget=forms.RadioSelect,
...
 
@@ -23,11 +23,10 @@ class ProfileForm(forms.ModelForm):
 
        exclude = ['attendee']
 
        field_classes = {
 
            "of_legal_age" : YesNoField,
 
            "of_legal_age": YesNoField,
 
        }
 
        widgets = {
 
            "past_lca" : forms.widgets.CheckboxSelectMultiple(),
 
            "past_lca": forms.widgets.CheckboxSelectMultiple(),
 
        }
 

	
 

	
 
    class Media:
 
        js = ("lca2017/js/profile_form.js", )
pinaxcon/registrasion/management/commands/populate_inventory.py
Show inline comments
...
 
@@ -5,5 +5,5 @@ from decimal import Decimal
 
from django.contrib.auth.models import Group
 
from django.core.exceptions import ObjectDoesNotExist
 
from django.core.management.base import BaseCommand, CommandError
 
from django.core.management.base import BaseCommand
 

	
 
from registrasion.models import inventory as inv
...
 
@@ -11,5 +11,7 @@ from registrasion.models import conditions as cond
 
from symposion import proposals
 

	
 

	
 
class Command(BaseCommand):
 

	
 
    help = 'Populates the inventory with the LCA2017 inventory model'
 

	
...
 
@@ -56,5 +58,5 @@ class Command(BaseCommand):
 
                        "For details of what products are included, see our "
 
                        "[LINK]registration details page.[/LINK]",
 
            required = True,
 
            required=True,
 
            render_type=inv.Category.RENDER_TYPE_RADIO,
 
            limit_per_user=1,
...
 
@@ -69,5 +71,5 @@ class Command(BaseCommand):
 
                        "seats at the dinner, even if a dinner ticket is not "
 
                        "included in your conference ticket price.",
 
            required = False,
 
            required=False,
 
            render_type=inv.Category.RENDER_TYPE_QUANTITY,
 
            limit_per_user=10,
...
 
@@ -82,5 +84,5 @@ class Command(BaseCommand):
 
                        "to 5 tickets in total, for significant others, and "
 
                        "family members.",
 
            required = False,
 
            required=False,
 
            render_type=inv.Category.RENDER_TYPE_QUANTITY,
 
            limit_per_user=5,
...
 
@@ -96,5 +98,5 @@ class Command(BaseCommand):
 
                        "holders, speakers, miniconf organisers, and invited "
 
                        "guests.",
 
            required = False,
 
            required=False,
 
            render_type=inv.Category.RENDER_TYPE_RADIO,
 
            limit_per_user=1,
...
 
@@ -107,5 +109,5 @@ class Command(BaseCommand):
 
            description="Commemorative conference t-shirts, featuring secret "
 
                        "linux.conf.au 2017 artwork.",
 
            required = False,
 
            required=False,
 
            render_type=inv.Category.RENDER_TYPE_ITEM_QUANTITY,
 
            order=40,
...
 
@@ -125,5 +127,5 @@ class Command(BaseCommand):
 
                        "elsewhere. For full details, see [LINK]our "
 
                        "accommodation page.[/LINK]",
 
            required = False,
 
            required=False,
 
            render_type=inv.Category.RENDER_TYPE_RADIO,
 
            limit_per_user=1,
...
 
@@ -136,5 +138,5 @@ class Command(BaseCommand):
 
            description="Other items that can improve your conference "
 
                        "experience.",
 
            required = False,
 
            required=False,
 
            render_type=inv.Category.RENDER_TYPE_QUANTITY,
 
            order=60,
pinaxcon/registrasion/views.py
Show inline comments
 
from django.conf import settings
 
from django.contrib.auth.decorators import login_required
 
from django.contrib import messages
 
from django.core.exceptions import ObjectDoesNotExist
 
from django.core.exceptions import ValidationError
 
from django.http import Http404
 
from django.shortcuts import get_object_or_404
 
from django.shortcuts import redirect
 
from django.shortcuts import render
 

	
 
from registrasion import models as rego
...
 
@@ -19,5 +15,5 @@ def demopay(request, invoice_id, access_code):
 
    '''
 
    invoice_id = int(invoice_id)
 
    inv = get_object_or_404(rego.Invoice.objects,pk=invoice_id)
 
    inv = get_object_or_404(rego.Invoice.objects, pk=invoice_id)
 

	
 
    invoice = InvoiceController(inv)
pinaxcon/settings.py
Show inline comments
 
import os
 
import dj_database_url
 
from django.utils.crypto import get_random_string
 

	
...
 
@@ -8,5 +7,5 @@ PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))
 
BASE_DIR = PACKAGE_ROOT
 

	
 
DEBUG = True #bool(int(os.environ.get("DEBUG", "1")))
 
DEBUG = True  # bool(int(os.environ.get("DEBUG", "1")))
 

	
 
DATABASES = {
...
 
@@ -153,5 +152,5 @@ INSTALLED_APPS = [
 
    "registripe",
 

	
 
    #admin - required by registrasion ??
 
    # admin - required by registrasion ??
 
    "nested_admin",
 

	
...
 
@@ -164,5 +163,5 @@ INSTALLED_APPS = [
 
    "djangoformsetjs",
 

	
 
    #testing
 
    # testing
 
    "django_nose",
 
]
...
 
@@ -205,5 +204,5 @@ LOGGING = {
 
    },
 
    'handlers': {
 
         'console':{
 
        'console': {
 
            'level': 'DEBUG',
 
            'class': 'logging.StreamHandler',
...
 
@@ -274,6 +273,6 @@ PROPOSAL_FORMS = {
 
}
 

	
 
#PINAX_PAGES_HOOKSET = "pinaxcon.hooks.PinaxPagesHookSet"
 
#PINAX_BOXES_HOOKSET = "pinaxcon.hooks.PinaxBoxesHookSet"
 
# PINAX_PAGES_HOOKSET = "pinaxcon.hooks.PinaxPagesHookSet"
 
# PINAX_BOXES_HOOKSET = "pinaxcon.hooks.PinaxBoxesHookSet"
 

	
 
# Registrasion bits:
...
 
@@ -309,5 +308,5 @@ try:
 
except NameError:
 
    try:
 
        from local_settings import *
 
        from local_settings import *  # noqa: F401,F403
 
    except ImportError:
 
        pass
pinaxcon/templatetags/lca2017_tags.py
Show inline comments
 
import cms_pages
 
import hashlib
 
import urllib
 

	
 
from decimal import Decimal
...
 
@@ -56,5 +55,7 @@ def speaker_photo(context, speaker, size):
 
        email = speaker.user.email.encode("utf-8")
 
        md5sum = hashlib.md5(email.strip().lower()).hexdigest()
 
        url = "https://secure.gravatar.com/avatar/%s?s=%d&d=%s" % (md5sum, size, "https://linux.conf.au/site_media/static/lca2017/images/speaker-fallback-devil.jpg")
 
        fallback_image = ("https://linux.conf.au/site_media/static/lca2017"
 
                          "/images/speaker-fallback-devil.jpg")
 
        url = "https://secure.gravatar.com/avatar/%s?s=%d&d=%s" % (md5sum, size, fallback_image)
 

	
 
        return url
...
 
@@ -95,4 +96,5 @@ def conference_name():
 
    return conference_models.Conference.objects.get(id=CONFERENCE_ID).title
 

	
 

	
 
@register.filter()
 
def trackname(room, day):
pinaxcon/templatetags/pyconau2017_tags.py
Show inline comments
 
import cms_pages
 
import hashlib
 
import urllib
 

	
 
import os
...
 
@@ -58,5 +57,7 @@ def speaker_photo(context, speaker, size):
 
        email = speaker.user.email.encode("utf-8")
 
        md5sum = hashlib.md5(email.strip().lower()).hexdigest()
 
        url = "https://secure.gravatar.com/avatar/%s?s=%d&d=%s" % (md5sum, size, "https://2017.pycon-au.org/site_media/static/pyconau23017/images/speaker-fallback-devil.jpg")
 
        fallback_image = ("https://2017.pycon-au.org/site_media/static"
 
                          "/pyconau23017/images/speaker-fallback-devil.jpg")
 
        url = "https://secure.gravatar.com/avatar/%s?s=%d&d=%s" % (md5sum, size, fallback_image)
 

	
 
        return url
...
 
@@ -97,4 +98,5 @@ def conference_name():
 
    return conference_models.Conference.objects.get(id=CONFERENCE_ID).title
 

	
 

	
 
@register.filter()
 
def trackname(room, day):
...
 
@@ -105,4 +107,5 @@ def trackname(room, day):
 
    return track_name
 

	
 

	
 
@register.simple_tag()
 
def sponsor_thumbnail(sponsor_logo):
...
 
@@ -111,4 +114,3 @@ def sponsor_thumbnail(sponsor_logo):
 
            logo_file = os.path.join(settings.MEDIA_URL, str(sponsor_logo.upload))
 
            return logo_file
 

	
 
    return ""
...
 
\ No newline at end of file
 
    return ""
pinaxcon/urls.py
Show inline comments
 
from django.conf import settings
 
from django.conf.urls import patterns, include, url
 
from django.conf.urls import include, url
 
from django.conf.urls.static import static
 
from django.views.generic import TemplateView
...
 
@@ -12,7 +12,4 @@ import symposion.views
 

	
 

	
 

	
 
import sys
 

	
 
urlpatterns = [
 
    url(r"^admin/", include(admin.site.urls)),
...
 
@@ -47,11 +44,11 @@ urlpatterns = [
 

	
 
    # Demo payment gateway and related features
 
    #url(r"^register/pinaxcon/", include("pinaxcon.registrasion.urls")),
 
    # url(r"^register/pinaxcon/", include("pinaxcon.registrasion.urls")),
 

	
 
]
 

	
 
if settings.DEBUG:
 
   import debug_toolbar
 
   urlpatterns.insert(0, url(r'^__debug__/', include(debug_toolbar.urls)))
 
    import debug_toolbar
 
    urlpatterns.insert(0, url(r'^__debug__/', include(debug_toolbar.urls)))
 

	
 

	
pinaxcon/widgets.py
Show inline comments
 
from django import forms
 

	
 

	
 
class AceMarkdownEditor(forms.Textarea):
 

	
0 comments (0 inline, 0 general)