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):
 

	
...
 
@@ -85,4 +86,5 @@ class MiniconfProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class SysAdminProposalForm(ProposalForm):
 

	
...
 
@@ -108,4 +110,5 @@ class SysAdminProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class WriteTheDocsProposalForm(ProposalForm):
 

	
...
 
@@ -131,4 +134,5 @@ class WriteTheDocsProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class RadioProposalForm(ProposalForm):
 

	
...
 
@@ -153,4 +157,5 @@ class RadioProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class KernelProposalForm(ProposalForm):
 

	
...
 
@@ -175,4 +180,5 @@ class KernelProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class WootconfProposalForm(ProposalForm):
 

	
...
 
@@ -197,4 +203,5 @@ class WootconfProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class SecurityProposalForm(ProposalForm):
 

	
...
 
@@ -219,4 +226,5 @@ class SecurityProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class GamesProposalForm(ProposalForm):
 

	
...
 
@@ -242,4 +250,5 @@ class GamesProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class TestingProposalForm(ProposalForm):
 

	
...
 
@@ -264,4 +273,5 @@ class TestingProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class KnowledgeProposalForm(ProposalForm):
 

	
...
 
@@ -286,4 +296,5 @@ class KnowledgeProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class LawProposalForm(ProposalForm):
 

	
...
 
@@ -308,4 +319,5 @@ class LawProposalForm(ProposalForm):
 
        }
 

	
 

	
 
class OpenHardwareProposalForm(ProposalForm):
 

	
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,4 +58,5 @@ class MiniconfProposal(ProposalBase):
 
        verbose_name = "miniconf proposal"
 

	
 

	
 
class SysAdminProposal(Proposal):
 

	
...
 
@@ -66,5 +69,6 @@ class SysAdminProposal(Proposal):
 
    ]
 

	
 
    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.")
 

	
...
 
@@ -72,4 +76,5 @@ class SysAdminProposal(Proposal):
 
        verbose_name = "System Administration Miniconf Proposal"
 

	
 

	
 
class WriteTheDocsProposal(Proposal):
 

	
...
 
@@ -87,4 +92,5 @@ class WriteTheDocsProposal(Proposal):
 
        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):
 

	
...
 
@@ -124,4 +134,5 @@ class GamesProposal(Proposal):
 
        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,4 +152,5 @@ class LawProposal(Proposal):
 
        verbose_name = "Open Law and Policy Miniconf Proposal"
 

	
 

	
 
class OpenHardwareProposal(Proposal):
 

	
pinaxcon/registrasion/forms.py
Show inline comments
...
 
@@ -29,5 +29,4 @@ class ProfileForm(forms.ModelForm):
 
        }
 

	
 

	
 
    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'
 

	
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
pinaxcon/settings.py
Show inline comments
 
import os
 
import dj_database_url
 
from django.utils.crypto import get_random_string
 

	
...
 
@@ -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 ""
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)),
pinaxcon/widgets.py
Show inline comments
 
from django import forms
 

	
 

	
 
class AceMarkdownEditor(forms.Textarea):
 

	
0 comments (0 inline, 0 general)