Update monkey_patch.py
This commit is contained in:
parent
caa1c0de38
commit
fb55f88cc7
1 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.mail import EmailMultiAlternatives
|
from django.core.mail import EmailMultiAlternatives
|
||||||
|
|
||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +15,7 @@ class MonkeyPatchMiddleware(object):
|
||||||
|
|
||||||
def do_monkey_patch():
|
def do_monkey_patch():
|
||||||
patch_stripe_card_defaults()
|
patch_stripe_card_defaults()
|
||||||
|
patch_registrasion_views()
|
||||||
patch_conference_schedule()
|
patch_conference_schedule()
|
||||||
|
|
||||||
# Remove this function from existence
|
# Remove this function from existence
|
||||||
|
@ -35,6 +38,13 @@ def patch_stripe_card_defaults():
|
||||||
sources.sync_card = sync_card
|
sources.sync_card = sync_card
|
||||||
|
|
||||||
|
|
||||||
|
def patch_registrasion_views():
|
||||||
|
from registrasion import views as registrasion_views
|
||||||
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
|
|
||||||
|
registrasion_views.invoice_mailout = csrf_exempt(registrasion_views.invoice_mailout)
|
||||||
|
|
||||||
|
|
||||||
def patch_conference_schedule():
|
def patch_conference_schedule():
|
||||||
from symposion.schedule import views as sv
|
from symposion.schedule import views as sv
|
||||||
from symposion.schedule import models as sm
|
from symposion.schedule import models as sm
|
||||||
|
|
Loading…
Reference in a new issue