From 7ebdf0f2ff5ecbc65b3949027dde193c714d4049 Mon Sep 17 00:00:00 2001 From: Martin Prunell Date: Tue, 9 Mar 2021 14:56:45 -0300 Subject: [PATCH 01/10] Fix display of canceled plan in Settings --- smallslive/templates/account/user_settings_new.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/smallslive/templates/account/user_settings_new.html b/smallslive/templates/account/user_settings_new.html index b97ccdc44..a496baa92 100644 --- a/smallslive/templates/account/user_settings_new.html +++ b/smallslive/templates/account/user_settings_new.html @@ -75,12 +75,12 @@
Supporter settings
Current Pledge
- {% if customer_detail.subscription.plan and not cancelled %} -
${{ monthly_pledge_in_dollars }}/{{ customer_detail.subscription.plan.interval }}
+ {% if customer_detail.subscription and customer_detail.subscription.plan and not cancelled %} +
${{ monthly_pledge_in_dollars }}/{{ customer_detail.subscription.plan.interval }}
{% elif plan and plan.active and plan.interval and plan.interval == 'month' and not cancelled %} -
${{ plan.amount }}/{{ plan.interval }}
+
${{ plan.amount }}/{{ plan.interval }}
{% elif plan and plan.active and plan.interval and plan.interval == 'year' and not cancelled %} -
${{ plan.amount }}/{{ plan.interval }}
+
${{ plan.amount }}/{{ plan.interval }}
{% else %}
{% if cancelled %}Subscription canceled{% else %}None{% endif %}
{% endif %} From ff67936097a9b6038ac99ec95e2f7f30504f067f Mon Sep 17 00:00:00 2001 From: Martin Prunell Date: Wed, 17 Mar 2021 18:03:55 -0300 Subject: [PATCH 02/10] Exclude hours and tickets from info --- smallslive/templates/flatpages/contact-and-info.html | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/smallslive/templates/flatpages/contact-and-info.html b/smallslive/templates/flatpages/contact-and-info.html index 6025bd8a8..8cf714360 100644 --- a/smallslive/templates/flatpages/contact-and-info.html +++ b/smallslive/templates/flatpages/contact-and-info.html @@ -31,14 +31,6 @@ {% block venues-location-active %}{% endblock %}" id="venues-location"> Venues/Location -
  • - Hours/Policies -
  • -
  • - Tickets -
  • About Us @@ -50,8 +42,6 @@ {% include "flatpages/catalog.html" %} {% include "flatpages/streaming.html" %} {% include "flatpages/venues-location.html" %} - {% include "flatpages/hours-policies.html" %} - {% include "flatpages/passes-tickets.html" %} {% include "flatpages/about-us.html" %}
  • From 1a09b74cdc10de4f49363bb5b6bb5303a62e2742 Mon Sep 17 00:00:00 2001 From: Martin Prunell Date: Sun, 11 Apr 2021 12:05:31 -0300 Subject: [PATCH 03/10] Fix non logged in sponsorship showing up incorrectly --- smallslive/templates/search/upcoming_calendar_dates.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smallslive/templates/search/upcoming_calendar_dates.html b/smallslive/templates/search/upcoming_calendar_dates.html index 1a62b2c6f..b3fe26a82 100644 --- a/smallslive/templates/search/upcoming_calendar_dates.html +++ b/smallslive/templates/search/upcoming_calendar_dates.html @@ -18,7 +18,7 @@ data-sponsorship-date="{{ event.get_date }}" data-event-id="{{ event.pk }}">Sponsor This Concert {% endif %} - {% elif event.sponsorship_enabled %} + {% elif event.sponsorship_enabled and not event.sponsorship %} {% endif %} From 094e9877d1097eeb039913dc802213a7e3418601 Mon Sep 17 00:00:00 2001 From: Martin Prunell Date: Sun, 11 Apr 2021 12:08:12 -0300 Subject: [PATCH 04/10] Trigger build From 4b0fb24edfa250864a36650c00ea2203a12e405d Mon Sep 17 00:00:00 2001 From: Martin Prunell Date: Sun, 11 Apr 2021 23:40:38 -0300 Subject: [PATCH 05/10] Make checking account configurable by event --- smallslive/events/forms.py | 3 +- .../migrations/0043_event_is_foundation.py | 20 ++++++ smallslive/events/models.py | 4 ++ smallslive/oscar_apps/basket/models.py | 10 +++ smallslive/oscar_apps/checkout/views.py | 13 ++-- smallslive/oscar_apps/order/models.py | 10 +++ smallslive/oscar_apps/order/processing.py | 6 +- smallslive/subscriptions/mixins.py | 37 +++++----- smallslive/subscriptions/views.py | 13 ++-- .../partials/_basket_content_tickets.html | 17 +++-- .../checkout/preview_tickets_ajax.html | 2 +- .../templates/checkout/tickets_products.html | 16 ++++- .../emails/commtype_ticket_placed_body.html | 47 +++++++++---- .../events/_event_details_upcoming.html | 2 +- .../templates/events/buy_tickets_dialog.html | 20 ++++-- .../subscriptions/completed/thank_you.html | 67 ++++++++++++++----- .../subscriptions/ticket-support.html | 8 ++- smallslive/users/models.py | 1 - 18 files changed, 219 insertions(+), 77 deletions(-) create mode 100644 smallslive/events/migrations/0043_event_is_foundation.py diff --git a/smallslive/events/forms.py b/smallslive/events/forms.py index 63b00a097..6718cb1cf 100644 --- a/smallslive/events/forms.py +++ b/smallslive/events/forms.py @@ -153,6 +153,7 @@ class Meta: 'venue', 'date', 'start', 'end', 'id', 'title', 'subtitle', 'photo', 'image_id', 'cropping', 'description', 'state', 'staff_pick', 'streamable', 'tickets_url', 'minimum_sponsorship_amount', 'sponsorship_enabled', + 'is_foundation', ) widgets = { 'state': EventStatusWidget, @@ -232,7 +233,7 @@ class Meta(EventAddForm.Meta): 'venue', 'title', 'subtitle', 'date', 'start', 'end', 'start_streaming_before_minutes', 'photo', 'image_id', 'cropping', 'description', 'state', 'staff_pick', 'streamable', 'tickets_url', - 'minimum_sponsorship_amount', 'sponsorship_enabled',) + 'minimum_sponsorship_amount', 'sponsorship_enabled', 'is_foundation',) class EventSearchForm(SearchForm): diff --git a/smallslive/events/migrations/0043_event_is_foundation.py b/smallslive/events/migrations/0043_event_is_foundation.py new file mode 100644 index 000000000..37748e493 --- /dev/null +++ b/smallslive/events/migrations/0043_event_is_foundation.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0042_event_sponsorship_enabled'), + ] + + operations = [ + migrations.AddField( + model_name='event', + name='is_foundation', + field=models.BooleanField(default=False), + preserve_default=True, + ), + ] diff --git a/smallslive/events/models.py b/smallslive/events/models.py index 0e3ef97b8..dea8de593 100644 --- a/smallslive/events/models.py +++ b/smallslive/events/models.py @@ -392,6 +392,10 @@ class Event(TimeStampedModel): minimum_sponsorship_amount = models.IntegerField(default=600) sponsorship_enabled = models.BooleanField(default=False) + # Events tickets can be assigned to the Foundation or the venue account + # Different Stripe or PayPal account will be selected for collect payments. + is_foundation = models.BooleanField(default=False) + objects = EventQuerySet.as_manager() class Meta: diff --git a/smallslive/oscar_apps/basket/models.py b/smallslive/oscar_apps/basket/models.py index 145892f07..31958ac01 100644 --- a/smallslive/oscar_apps/basket/models.py +++ b/smallslive/oscar_apps/basket/models.py @@ -46,6 +46,16 @@ def get_tickets_venue(self): venue = line.product.event_set.event.venue return venue + + def get_tickets_event(self): + event = None + qs = self.lines.all().filter(product__product_class__name='Ticket') + lines = list(qs) + if lines: + line = lines[0] + event = line.product.event_set.event + + return event def has_gifts(self): gifts_count = self.all_lines().filter(product__categories__name='Gifts').count() diff --git a/smallslive/oscar_apps/checkout/views.py b/smallslive/oscar_apps/checkout/views.py index 12471696f..2151929e4 100644 --- a/smallslive/oscar_apps/checkout/views.py +++ b/smallslive/oscar_apps/checkout/views.py @@ -842,10 +842,13 @@ def handle_payment(self, order_number, total, basket_lines, shipping_charge=0.00 self.add_payment_event('Purchase', total.incl_tax, reference=self.payment_id) # Set an ongoing donation, finished when payment is confirmed self.total_deductable = basket._get_deductable_physical_total() - venue = self.request.basket.get_tickets_venue() + event = self.request.basket.get_tickets_event() + if event: + venue = event.venue - # Do not register a donation if the Venue is not part of the foundation. - if venue and not venue.foundation: + # Do not register a donation if the Venue is not part of the foundation + # or the event is not assigned to the foundation. + if event and venue and not venue.foundation and not event.is_foundation: return # Anonymous donation or purchase @@ -970,9 +973,9 @@ def handle_payment(self): # request.basket doesn't work b/c the basket is frozen basket = self.get_submitted_basket() - venue = basket.get_tickets_venue() + event = basket.get_tickets_event() - self.payment_id = self.execute_payment(venue) + self.payment_id = self.execute_payment(event) # TODO: check that the strategy is correct for Tracks (right stock record). # If basket has tracks, it's probably to use custom strategy. diff --git a/smallslive/oscar_apps/order/models.py b/smallslive/oscar_apps/order/models.py index 099b20052..53ad87f5f 100644 --- a/smallslive/oscar_apps/order/models.py +++ b/smallslive/oscar_apps/order/models.py @@ -58,6 +58,16 @@ def get_tickets_venue(self): venue = line.product.event_set.event.venue return venue + + def get_tickets_event(self): + event = None + qs = self.lines.all().filter(product__product_class__name='Ticket') + lines = list(qs) + if lines: + line = lines[0] + event = line.product.event_set.event + + return event def has_gift(self): gifts_count = self.lines.filter(product__categories__name='Gifts').count() diff --git a/smallslive/oscar_apps/order/processing.py b/smallslive/oscar_apps/order/processing.py index 7beb9815b..0c7dd1d3e 100644 --- a/smallslive/oscar_apps/order/processing.py +++ b/smallslive/oscar_apps/order/processing.py @@ -19,16 +19,16 @@ def handle_order_status_change(self, order, new_status, note_msg): reference = payment_source.reference amount = payment_source.amount_allocated currency = payment_source.currency - venue = order.get_tickets_venue() + event = order.get_tickets_event() if 'paypal' in payment_source.source_type.name.lower(): refund_reference = self.refund_paypal_payment( reference, amount, currency, - venue) + event) elif 'stripe' in payment_source.source_type.name.lower(): refund_reference = self.refund_stripe_payment( - reference, venue) + reference, event) lines = order.lines.all() line_quantities = lines.values_list('quantity', flat=True) diff --git a/smallslive/subscriptions/mixins.py b/smallslive/subscriptions/mixins.py index d213706d9..1dcf80593 100644 --- a/smallslive/subscriptions/mixins.py +++ b/smallslive/subscriptions/mixins.py @@ -59,8 +59,9 @@ def get_payment_data(self, item_list, currency, shipping_charge=0.00, return data - def configure_paypal(self, venue=None): - if venue: + def configure_paypal(self, event=None): + if event and not event.is_foundation: + venue = event.venue client_id = venue.get_paypal_client_id client_secret = venue.get_paypal_client_secret else: @@ -80,8 +81,8 @@ def handle_paypal_payment(self, currency, item_list, execute_uri=None, cancel_uri=None): - venue = self.request.basket.get_tickets_venue() - self.configure_paypal(venue) + event = self.request.basket.get_tickets_event() + self.configure_paypal(event) payment_data = self.get_payment_data(item_list, currency, shipping_charge, execute_uri=execute_uri, cancel_uri=cancel_uri) @@ -102,8 +103,8 @@ def handle_paypal_payment(self, currency, item_list, else: raise UnableToTakePayment(payment.error) - def execute_payment(self, venue=None): - self.configure_paypal(venue) + def execute_payment(self, event=None): + self.configure_paypal(event) payment_id = self.request.GET.get('paymentId') payer_id = self.request.GET.get('PayerID') payment = paypalrestsdk.Payment.find(payment_id) @@ -114,8 +115,8 @@ def execute_payment(self, venue=None): return payment_id - def refund_paypal_payment(self, payment_id, total, currency, venue=None): - self.configure_paypal(venue) + def refund_paypal_payment(self, payment_id, total, currency, event=None): + self.configure_paypal(event) payment = paypalrestsdk.Payment.find(payment_id) sale_id = payment.transactions[0].related_resources[0].sale.id sale = paypalrestsdk.Sale.find(sale_id) @@ -125,7 +126,6 @@ def refund_paypal_payment(self, payment_id, total, currency, venue=None): 'currency': currency } } - print refund_data refund = sale.refund(refund_data) if refund.success(): refund_id = refund.id @@ -171,12 +171,13 @@ def execute_stripe_payment(self): def handle_stripe_payment(self, order_number, basket_lines, **kwargs): if self.request.user.is_authenticated(): customer = self.request.user.customer - print customer else: customer = None # Smalls tickets are accounted according to the venue's account. - venue = self.request.basket.get_tickets_venue() - if customer: + event = self.request.basket.get_tickets_event() + if event: + venue = event.venue + if customer and event and event.is_foundation: if not self.card_token.startswith('card_'): customer.update_card(self.card_token) charge = customer.charge( @@ -186,8 +187,12 @@ def handle_stripe_payment(self, order_number, basket_lines, **kwargs): stripe_ref = charge.stripe_id else: + if event and event.is_foundation: + stripe_secret_key = settings.STRIPE_SECRET_KEY + else: + stripe_secret_key = venue.get_stripe_secret_key resp = stripe.Charge.create( - api_key=venue.get_stripe_secret_key, + api_key=stripe_secret_key, source=self.card_token, amount=int(self.total.incl_tax * 100), # Convert dollars into cents currency=settings.STRIPE_CURRENCY, @@ -202,9 +207,9 @@ def handle_stripe_payment(self, order_number, basket_lines, **kwargs): return stripe_ref - def refund_stripe_payment(self, charge_id, venue=None): - if venue: - api_key = venue.get_stripe_secret_key + def refund_stripe_payment(self, charge_id, event=None): + if event and not event.is_foundation: + api_key = event.venue.get_stripe_secret_key else: api_key = settings.STRIPE_SECRET_KEY charge = stripe.Charge.retrieve(api_key=api_key, id=charge_id) diff --git a/smallslive/subscriptions/views.py b/smallslive/subscriptions/views.py index e4d27cc33..4ab0472b1 100644 --- a/smallslive/subscriptions/views.py +++ b/smallslive/subscriptions/views.py @@ -795,25 +795,28 @@ class TicketSupportView(BecomeSupporterView): template_name = 'subscriptions/ticket-support.html' - def get_ticket_venue_name(self): + def get_event(self): + basket = self.request.basket product = None for line in basket.lines.all(): product = line.product - product_info = '' if product: - product_info = product.event_set.event.get_venue_name() + return product.event_set.event - return product_info + def can_use_existing_cc(self): + return def get_context_data(self, **kwargs): context = super(TicketSupportView, self).get_context_data(**kwargs) context['payment_info_url'] = reverse('payment_info') context['donation_preview_url'] = reverse('donation_preview') - context['venue_name'] = self.get_ticket_venue_name() + event = self.get_event() + context['venue_name'] = event.get_venue_name() context['STRIPE_PUBLIC_KEY'] = settings.STRIPE_PUBLIC_KEY + context['can_use_existing_cc'] = self.request.user.can_use_existing_cc and event.is_foundation return context diff --git a/smallslive/templates/basket/partials/_basket_content_tickets.html b/smallslive/templates/basket/partials/_basket_content_tickets.html index 8789f8925..aee3bb74d 100644 --- a/smallslive/templates/basket/partials/_basket_content_tickets.html +++ b/smallslive/templates/basket/partials/_basket_content_tickets.html @@ -8,10 +8,15 @@ {% if not product.is_shipping_required %} {% purchase_info_for_line request line as session %} {{ form.id }} + {% with event=product.event_set.event %}
    -
    - Sponsorship seat +
    + {% if event.is_foundation %} + Sponsorship seat + {% else %} + Seat + {% endif %}
    @@ -33,10 +38,10 @@
    - {% endif %} - {% endwith %} - - {% endfor %} + {% endwith %} + {% endif %} + {% endwith %} +{% endfor %}
    diff --git a/smallslive/templates/checkout/preview_tickets_ajax.html b/smallslive/templates/checkout/preview_tickets_ajax.html index 495daf088..70080e67f 100644 --- a/smallslive/templates/checkout/preview_tickets_ajax.html +++ b/smallslive/templates/checkout/preview_tickets_ajax.html @@ -7,7 +7,7 @@
    - {% if not basket.has_physical_products and not basket.has_digital_products %} + {% if not basket.has_physical_products and not basket.has_digital_products and event.is_foundation%}
    Sponsorships
    {% else %}
    Ordered items:
    diff --git a/smallslive/templates/checkout/tickets_products.html b/smallslive/templates/checkout/tickets_products.html index a16168d4c..05e2ec175 100644 --- a/smallslive/templates/checkout/tickets_products.html +++ b/smallslive/templates/checkout/tickets_products.html @@ -7,20 +7,30 @@
    {% for line in basket.digital_lines %} {% with product=line.product %} + {% with event=product.event_set.event %}
    -
    - Sponsorship seat +
    + {% if event.is_foundation %} + Sponsorship seat + {% else %} + Seat + {% endif %}
    ${{ line.price_excl_tax }}
    -
    {{ line.quantity }} {% if line.quantity > 1 %} SPONSOR seats {% else %} SPONSOR seat {% endif %}
    + {% if event.is_foundation %} +
    {{ line.quantity }} {% if line.quantity > 1 %} SPONSOR seats {% else %} SPONSOR seat {% endif %}
    + {% else %} +
    {{ line.quantity }} {% if line.quantity > 1 %} seats {% else %} seat {% endif %}
    + {% endif %}
    {% endwith %} + {% endwith %} {% endfor %}
    diff --git a/smallslive/templates/customer/emails/commtype_ticket_placed_body.html b/smallslive/templates/customer/emails/commtype_ticket_placed_body.html index a380d7a01..b05ab75dd 100644 --- a/smallslive/templates/customer/emails/commtype_ticket_placed_body.html +++ b/smallslive/templates/customer/emails/commtype_ticket_placed_body.html @@ -15,18 +15,41 @@ {% with order_number=order.number %} {% for line in order.lines.all %} -

    - You have sponsored {{ line.quantity }} seat(s) for the {{ line.product.event_set.start }} seating on {{ line.product.event_set.event.date }} at {{ line.product.event_set.event.get_venue_name }} Jazz Club. - Your order number is {{ order_number }}. Your card has been charged for {{ line.line_price_incl_tax|currency:order.currency }}. 75% of this donation to the SmallsLIVE Foundation is tax-deductible. All of your tax information is in your account. -

    -

    - The party name of {{ order.first_name }} {{ order.last_name }} will be with the doorman when you arrive. - Please arrive 1/2 hour before the seating. - We are mandated to take temperatures at the door and to collect contact tracing information from at least one person in your party. Your sponsored seat(s) are guaranteed. Your actual space in the venue is first come/first serve so please arrive on time. -

    -

    - If you have any issues please email us at reservations@smallslive.com. -

    + + {% with event_set=line.product.event_set %} + {% with event=event_set.event %} + {% if event.is_foundation %} +

    + You have sponsored {{ line.quantity }} seat(s) for the {{ event_set.start }} seating on {{ event.date }} at {{ event.get_venue_name }} Jazz Club. + Your order number is {{ order_number }}. Your card has been charged for {{ line.line_price_incl_tax|currency:order.currency }}. 75% of this donation to the SmallsLIVE Foundation is tax-deductible. All of your tax information is in your account. +

    +

    + The party name of {{ order.first_name }} {{ order.last_name }} will be with the doorman when you arrive. + Please arrive 1/2 hour before the seating. + We are mandated to take temperatures at the door and to collect contact tracing information from at least one person in your party. Your sponsored seat(s) are guaranteed. Your actual space in the venue is first come/first serve so please arrive on time. +

    +

    + If you have any issues please email us at reservations@smallslive.com. +

    + {% else %} +

    + You have successfully made {{ line.quantity }} reservation(s) for the {{ event_set.start }} seating on {{ event.date }} at {{ event.get_venue_name }} Jazz Club. + Your order number is {{ order_number }}. Your card has been charged for {{ line.line_price_incl_tax|currency:order.currency }}. +

    +

    + The reservation name is {{ order.first_name }} {{ order.last_name }} and will be with the doorman when you arrive. + Please arrive 1/2 hour before the seating. + We are mandated to take temperatures at the door and to collect contact tracing information from at least one person in your party. + This reservation guarantees your seating. Your actual space in the venue is first come/first serve so please arrive on time. + We reserve the right to release a seat 15 minutes after the seating time. +

    +

    + Reservations are generally non-refundable however, you may exchange your reservation for another seating depending on availability. + If you have any issues please email us at reservations@smallslive.com. +

    + {% endif %} + {% endwith %} + {% endwith %} {% endfor %} {% endwith %}

    diff --git a/smallslive/templates/events/_event_details_upcoming.html b/smallslive/templates/events/_event_details_upcoming.html index bd5df8e8c..43d702fdb 100644 --- a/smallslive/templates/events/_event_details_upcoming.html +++ b/smallslive/templates/events/_event_details_upcoming.html @@ -67,7 +67,7 @@ // Remember form to be submitted $form = $(this).closest('form'); $('#ticket-time').text( $(this).data('ticket-time')); - $('#ticket-price').text("Sponsorship Seats $" + $(this).data('ticket-price')); + $('#ticket-price').text($(this).data('ticket-price')); $('#ticket-availability').text($(this).data('ticket-availability')); $('#buy-tickets-dialog').modal('show'); diff --git a/smallslive/templates/events/buy_tickets_dialog.html b/smallslive/templates/events/buy_tickets_dialog.html index 8b81c3408..25dc8bd15 100644 --- a/smallslive/templates/events/buy_tickets_dialog.html +++ b/smallslive/templates/events/buy_tickets_dialog.html @@ -2,12 +2,24 @@

    diff --git a/smallslive/users/models.py b/smallslive/users/models.py index 1bc599771..3cc827702 100644 --- a/smallslive/users/models.py +++ b/smallslive/users/models.py @@ -345,7 +345,6 @@ def has_activated_account(self): def can_use_existing_cc(self): customer = Customer.objects.get(subscriber=self) if customer and customer.can_charge(): - print '******* Can charge: ', customer.can_charge() return True return False From 7045b7f48ad532af215ad2f2f362f72199a954a6 Mon Sep 17 00:00:00 2001 From: Martin Prunell Date: Sun, 11 Apr 2021 23:43:33 -0300 Subject: [PATCH 06/10] Trigger Build From 0d97823301ad18efe066d00a8a032b243a898375 Mon Sep 17 00:00:00 2001 From: Martin Prunell Date: Wed, 14 Apr 2021 10:52:34 -0300 Subject: [PATCH 07/10] Make checking account configurable by event --- smallslive/events/forms.py | 3 +- .../migrations/0043_event_is_foundation.py | 20 ++++++ smallslive/events/models.py | 4 ++ smallslive/oscar_apps/basket/models.py | 10 +++ smallslive/oscar_apps/checkout/views.py | 32 ++++++--- smallslive/oscar_apps/order/models.py | 10 +++ smallslive/oscar_apps/order/processing.py | 6 +- smallslive/subscriptions/mixins.py | 45 ++++++++----- smallslive/subscriptions/signals/handlers.py | 4 ++ smallslive/subscriptions/views.py | 13 ++-- .../partials/_basket_content_tickets.html | 17 +++-- .../checkout/preview_tickets_ajax.html | 2 +- .../templates/checkout/tickets_products.html | 16 ++++- .../emails/commtype_ticket_placed_body.html | 47 +++++++++---- .../events/_event_details_upcoming.html | 2 +- .../templates/events/buy_tickets_dialog.html | 20 ++++-- .../subscriptions/completed/thank_you.html | 67 ++++++++++++++----- .../subscriptions/ticket-support.html | 8 ++- smallslive/users/models.py | 1 - 19 files changed, 245 insertions(+), 82 deletions(-) create mode 100644 smallslive/events/migrations/0043_event_is_foundation.py diff --git a/smallslive/events/forms.py b/smallslive/events/forms.py index 63b00a097..6718cb1cf 100644 --- a/smallslive/events/forms.py +++ b/smallslive/events/forms.py @@ -153,6 +153,7 @@ class Meta: 'venue', 'date', 'start', 'end', 'id', 'title', 'subtitle', 'photo', 'image_id', 'cropping', 'description', 'state', 'staff_pick', 'streamable', 'tickets_url', 'minimum_sponsorship_amount', 'sponsorship_enabled', + 'is_foundation', ) widgets = { 'state': EventStatusWidget, @@ -232,7 +233,7 @@ class Meta(EventAddForm.Meta): 'venue', 'title', 'subtitle', 'date', 'start', 'end', 'start_streaming_before_minutes', 'photo', 'image_id', 'cropping', 'description', 'state', 'staff_pick', 'streamable', 'tickets_url', - 'minimum_sponsorship_amount', 'sponsorship_enabled',) + 'minimum_sponsorship_amount', 'sponsorship_enabled', 'is_foundation',) class EventSearchForm(SearchForm): diff --git a/smallslive/events/migrations/0043_event_is_foundation.py b/smallslive/events/migrations/0043_event_is_foundation.py new file mode 100644 index 000000000..37748e493 --- /dev/null +++ b/smallslive/events/migrations/0043_event_is_foundation.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0042_event_sponsorship_enabled'), + ] + + operations = [ + migrations.AddField( + model_name='event', + name='is_foundation', + field=models.BooleanField(default=False), + preserve_default=True, + ), + ] diff --git a/smallslive/events/models.py b/smallslive/events/models.py index 0e3ef97b8..dea8de593 100644 --- a/smallslive/events/models.py +++ b/smallslive/events/models.py @@ -392,6 +392,10 @@ class Event(TimeStampedModel): minimum_sponsorship_amount = models.IntegerField(default=600) sponsorship_enabled = models.BooleanField(default=False) + # Events tickets can be assigned to the Foundation or the venue account + # Different Stripe or PayPal account will be selected for collect payments. + is_foundation = models.BooleanField(default=False) + objects = EventQuerySet.as_manager() class Meta: diff --git a/smallslive/oscar_apps/basket/models.py b/smallslive/oscar_apps/basket/models.py index 145892f07..31958ac01 100644 --- a/smallslive/oscar_apps/basket/models.py +++ b/smallslive/oscar_apps/basket/models.py @@ -46,6 +46,16 @@ def get_tickets_venue(self): venue = line.product.event_set.event.venue return venue + + def get_tickets_event(self): + event = None + qs = self.lines.all().filter(product__product_class__name='Ticket') + lines = list(qs) + if lines: + line = lines[0] + event = line.product.event_set.event + + return event def has_gifts(self): gifts_count = self.all_lines().filter(product__categories__name='Gifts').count() diff --git a/smallslive/oscar_apps/checkout/views.py b/smallslive/oscar_apps/checkout/views.py index 12471696f..c718b9e8d 100644 --- a/smallslive/oscar_apps/checkout/views.py +++ b/smallslive/oscar_apps/checkout/views.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from paypal.payflow import facade from django import http from django.conf import settings from django.contrib import messages @@ -21,6 +20,7 @@ from oscar.core.loading import get_class from oscar_apps.catalogue.models import UserCatalogue, UserCatalogueProduct from oscar_apps.payment.exceptions import RedirectRequiredAjax +from events.models import Event from subscriptions.mixins import PayPalMixin, StripeMixin from subscriptions.models import Donation from utils import utils as sl_utils @@ -233,6 +233,16 @@ def handle(self): artist_id=self.artist_id, event_id=self.event_id, product_id=self.product_id) if self.tickets_type: + event = self.order.get_tickets_event() + if event and event.is_foundation: + payment_source = 'PayPal' + if self.card_token: + payment_source = 'Stripe' + Donation.objects.create_by_order( + self.order, + payment_source, + artist_id=self.artist_id, event_id=self.event_id, product_id=self.product_id) + # Set status to completed for lines if it's a ticket. # 'create_lines_models' method is not passed the order status unfortunately. lines = self.order.lines.all() @@ -842,10 +852,13 @@ def handle_payment(self, order_number, total, basket_lines, shipping_charge=0.00 self.add_payment_event('Purchase', total.incl_tax, reference=self.payment_id) # Set an ongoing donation, finished when payment is confirmed self.total_deductable = basket._get_deductable_physical_total() - venue = self.request.basket.get_tickets_venue() + event = self.request.basket.get_tickets_event() + if event: + venue = event.venue - # Do not register a donation if the Venue is not part of the foundation. - if venue and not venue.foundation: + # Do not register a donation if the Venue is not part of the foundation + # or the event is not assigned to the foundation. + if event and venue and not venue.foundation and not event.is_foundation: return # Anonymous donation or purchase @@ -896,7 +909,6 @@ def __init__(self, *args, **kwargs): super(ExecutePayPalPaymentView, self).__init__(*args, **kwargs) self.order = None self.payment_id = None - self.tickets = None self.tickets_type = None self.product_id = None self.event_id = None @@ -970,9 +982,9 @@ def handle_payment(self): # request.basket doesn't work b/c the basket is frozen basket = self.get_submitted_basket() - venue = basket.get_tickets_venue() + event = basket.get_tickets_event() - self.payment_id = self.execute_payment(venue) + self.payment_id = self.execute_payment(event) # TODO: check that the strategy is correct for Tracks (right stock record). # If basket has tracks, it's probably to use custom strategy. @@ -994,9 +1006,9 @@ def handle_payment(self): # Record payment source order_kwargs = {'order_type': basket.get_order_type()} - venue = basket.get_tickets_venue() - if venue: - self.tickets = venue.name.lower() + if event: + venue = event.venue + self.tickets_type = venue.name.lower() order_kwargs['status'] = 'Completed' payment_source = '{} PayPal'.format(venue.name) payment_event = 'Sold' diff --git a/smallslive/oscar_apps/order/models.py b/smallslive/oscar_apps/order/models.py index 099b20052..53ad87f5f 100644 --- a/smallslive/oscar_apps/order/models.py +++ b/smallslive/oscar_apps/order/models.py @@ -58,6 +58,16 @@ def get_tickets_venue(self): venue = line.product.event_set.event.venue return venue + + def get_tickets_event(self): + event = None + qs = self.lines.all().filter(product__product_class__name='Ticket') + lines = list(qs) + if lines: + line = lines[0] + event = line.product.event_set.event + + return event def has_gift(self): gifts_count = self.lines.filter(product__categories__name='Gifts').count() diff --git a/smallslive/oscar_apps/order/processing.py b/smallslive/oscar_apps/order/processing.py index 7beb9815b..0c7dd1d3e 100644 --- a/smallslive/oscar_apps/order/processing.py +++ b/smallslive/oscar_apps/order/processing.py @@ -19,16 +19,16 @@ def handle_order_status_change(self, order, new_status, note_msg): reference = payment_source.reference amount = payment_source.amount_allocated currency = payment_source.currency - venue = order.get_tickets_venue() + event = order.get_tickets_event() if 'paypal' in payment_source.source_type.name.lower(): refund_reference = self.refund_paypal_payment( reference, amount, currency, - venue) + event) elif 'stripe' in payment_source.source_type.name.lower(): refund_reference = self.refund_stripe_payment( - reference, venue) + reference, event) lines = order.lines.all() line_quantities = lines.values_list('quantity', flat=True) diff --git a/smallslive/subscriptions/mixins.py b/smallslive/subscriptions/mixins.py index d213706d9..a2459dde7 100644 --- a/smallslive/subscriptions/mixins.py +++ b/smallslive/subscriptions/mixins.py @@ -59,8 +59,9 @@ def get_payment_data(self, item_list, currency, shipping_charge=0.00, return data - def configure_paypal(self, venue=None): - if venue: + def configure_paypal(self, event=None): + if event and not event.is_foundation: + venue = event.venue client_id = venue.get_paypal_client_id client_secret = venue.get_paypal_client_secret else: @@ -80,8 +81,8 @@ def handle_paypal_payment(self, currency, item_list, execute_uri=None, cancel_uri=None): - venue = self.request.basket.get_tickets_venue() - self.configure_paypal(venue) + event = self.request.basket.get_tickets_event() + self.configure_paypal(event) payment_data = self.get_payment_data(item_list, currency, shipping_charge, execute_uri=execute_uri, cancel_uri=cancel_uri) @@ -102,8 +103,8 @@ def handle_paypal_payment(self, currency, item_list, else: raise UnableToTakePayment(payment.error) - def execute_payment(self, venue=None): - self.configure_paypal(venue) + def execute_payment(self, event=None): + self.configure_paypal(event) payment_id = self.request.GET.get('paymentId') payer_id = self.request.GET.get('PayerID') payment = paypalrestsdk.Payment.find(payment_id) @@ -114,8 +115,8 @@ def execute_payment(self, venue=None): return payment_id - def refund_paypal_payment(self, payment_id, total, currency, venue=None): - self.configure_paypal(venue) + def refund_paypal_payment(self, payment_id, total, currency, event=None): + self.configure_paypal(event) payment = paypalrestsdk.Payment.find(payment_id) sale_id = payment.transactions[0].related_resources[0].sale.id sale = paypalrestsdk.Sale.find(sale_id) @@ -125,7 +126,6 @@ def refund_paypal_payment(self, payment_id, total, currency, venue=None): 'currency': currency } } - print refund_data refund = sale.refund(refund_data) if refund.success(): refund_id = refund.id @@ -171,12 +171,13 @@ def execute_stripe_payment(self): def handle_stripe_payment(self, order_number, basket_lines, **kwargs): if self.request.user.is_authenticated(): customer = self.request.user.customer - print customer else: customer = None # Smalls tickets are accounted according to the venue's account. - venue = self.request.basket.get_tickets_venue() - if customer: + event = self.request.basket.get_tickets_event() + if event: + venue = event.venue + if customer and event and event.is_foundation: if not self.card_token.startswith('card_'): customer.update_card(self.card_token) charge = customer.charge( @@ -186,12 +187,24 @@ def handle_stripe_payment(self, order_number, basket_lines, **kwargs): stripe_ref = charge.stripe_id else: + metadata = { + 'isFoundation': True + } + if event and event.is_foundation: + stripe_secret_key = settings.STRIPE_SECRET_KEY + else: + stripe_secret_key = venue.get_stripe_secret_key + if event: + metadata = { + 'isFoundation': False + } resp = stripe.Charge.create( - api_key=venue.get_stripe_secret_key, + api_key=stripe_secret_key, source=self.card_token, amount=int(self.total.incl_tax * 100), # Convert dollars into cents currency=settings.STRIPE_CURRENCY, description=self.payment_description(order_number, self.total.incl_tax, **kwargs), + metadata=metadata ) stripe_ref = resp['id'] @@ -202,9 +215,9 @@ def handle_stripe_payment(self, order_number, basket_lines, **kwargs): return stripe_ref - def refund_stripe_payment(self, charge_id, venue=None): - if venue: - api_key = venue.get_stripe_secret_key + def refund_stripe_payment(self, charge_id, event=None): + if event and not event.is_foundation: + api_key = event.venue.get_stripe_secret_key else: api_key = settings.STRIPE_SECRET_KEY charge = stripe.Charge.retrieve(api_key=api_key, id=charge_id) diff --git a/smallslive/subscriptions/signals/handlers.py b/smallslive/subscriptions/signals/handlers.py index bae2d3f62..e182f2ad2 100644 --- a/smallslive/subscriptions/signals/handlers.py +++ b/smallslive/subscriptions/signals/handlers.py @@ -15,6 +15,10 @@ def invoice_payment_succeeded(sender, **kwargs): if event: customer = event.customer charge = event.message['data']['object'] + metadata = charge['metadata'] + if 'isFoundation' in metadata and not metadata['isFoundation']: + return + invoice = charge['invoice'] charge_id = charge['id'] amount = charge['amount'] / 100 diff --git a/smallslive/subscriptions/views.py b/smallslive/subscriptions/views.py index e4d27cc33..4ab0472b1 100644 --- a/smallslive/subscriptions/views.py +++ b/smallslive/subscriptions/views.py @@ -795,25 +795,28 @@ class TicketSupportView(BecomeSupporterView): template_name = 'subscriptions/ticket-support.html' - def get_ticket_venue_name(self): + def get_event(self): + basket = self.request.basket product = None for line in basket.lines.all(): product = line.product - product_info = '' if product: - product_info = product.event_set.event.get_venue_name() + return product.event_set.event - return product_info + def can_use_existing_cc(self): + return def get_context_data(self, **kwargs): context = super(TicketSupportView, self).get_context_data(**kwargs) context['payment_info_url'] = reverse('payment_info') context['donation_preview_url'] = reverse('donation_preview') - context['venue_name'] = self.get_ticket_venue_name() + event = self.get_event() + context['venue_name'] = event.get_venue_name() context['STRIPE_PUBLIC_KEY'] = settings.STRIPE_PUBLIC_KEY + context['can_use_existing_cc'] = self.request.user.can_use_existing_cc and event.is_foundation return context diff --git a/smallslive/templates/basket/partials/_basket_content_tickets.html b/smallslive/templates/basket/partials/_basket_content_tickets.html index 8789f8925..aee3bb74d 100644 --- a/smallslive/templates/basket/partials/_basket_content_tickets.html +++ b/smallslive/templates/basket/partials/_basket_content_tickets.html @@ -8,10 +8,15 @@ {% if not product.is_shipping_required %} {% purchase_info_for_line request line as session %} {{ form.id }} + {% with event=product.event_set.event %}
    -
    - Sponsorship seat +
    + {% if event.is_foundation %} + Sponsorship seat + {% else %} + Seat + {% endif %}
    @@ -33,10 +38,10 @@
    - {% endif %} - {% endwith %} - - {% endfor %} + {% endwith %} + {% endif %} + {% endwith %} +{% endfor %}
    diff --git a/smallslive/templates/checkout/preview_tickets_ajax.html b/smallslive/templates/checkout/preview_tickets_ajax.html index 495daf088..70080e67f 100644 --- a/smallslive/templates/checkout/preview_tickets_ajax.html +++ b/smallslive/templates/checkout/preview_tickets_ajax.html @@ -7,7 +7,7 @@
    - {% if not basket.has_physical_products and not basket.has_digital_products %} + {% if not basket.has_physical_products and not basket.has_digital_products and event.is_foundation%}
    Sponsorships
    {% else %}
    Ordered items:
    diff --git a/smallslive/templates/checkout/tickets_products.html b/smallslive/templates/checkout/tickets_products.html index a16168d4c..05e2ec175 100644 --- a/smallslive/templates/checkout/tickets_products.html +++ b/smallslive/templates/checkout/tickets_products.html @@ -7,20 +7,30 @@
    {% for line in basket.digital_lines %} {% with product=line.product %} + {% with event=product.event_set.event %}
    -
    - Sponsorship seat +
    + {% if event.is_foundation %} + Sponsorship seat + {% else %} + Seat + {% endif %}
    ${{ line.price_excl_tax }}
    -
    {{ line.quantity }} {% if line.quantity > 1 %} SPONSOR seats {% else %} SPONSOR seat {% endif %}
    + {% if event.is_foundation %} +
    {{ line.quantity }} {% if line.quantity > 1 %} SPONSOR seats {% else %} SPONSOR seat {% endif %}
    + {% else %} +
    {{ line.quantity }} {% if line.quantity > 1 %} seats {% else %} seat {% endif %}
    + {% endif %}
    {% endwith %} + {% endwith %} {% endfor %}
    diff --git a/smallslive/templates/customer/emails/commtype_ticket_placed_body.html b/smallslive/templates/customer/emails/commtype_ticket_placed_body.html index a380d7a01..b05ab75dd 100644 --- a/smallslive/templates/customer/emails/commtype_ticket_placed_body.html +++ b/smallslive/templates/customer/emails/commtype_ticket_placed_body.html @@ -15,18 +15,41 @@ {% with order_number=order.number %} {% for line in order.lines.all %} -

    - You have sponsored {{ line.quantity }} seat(s) for the {{ line.product.event_set.start }} seating on {{ line.product.event_set.event.date }} at {{ line.product.event_set.event.get_venue_name }} Jazz Club. - Your order number is {{ order_number }}. Your card has been charged for {{ line.line_price_incl_tax|currency:order.currency }}. 75% of this donation to the SmallsLIVE Foundation is tax-deductible. All of your tax information is in your account. -

    -

    - The party name of {{ order.first_name }} {{ order.last_name }} will be with the doorman when you arrive. - Please arrive 1/2 hour before the seating. - We are mandated to take temperatures at the door and to collect contact tracing information from at least one person in your party. Your sponsored seat(s) are guaranteed. Your actual space in the venue is first come/first serve so please arrive on time. -

    -

    - If you have any issues please email us at reservations@smallslive.com. -

    + + {% with event_set=line.product.event_set %} + {% with event=event_set.event %} + {% if event.is_foundation %} +

    + You have sponsored {{ line.quantity }} seat(s) for the {{ event_set.start }} seating on {{ event.date }} at {{ event.get_venue_name }} Jazz Club. + Your order number is {{ order_number }}. Your card has been charged for {{ line.line_price_incl_tax|currency:order.currency }}. 75% of this donation to the SmallsLIVE Foundation is tax-deductible. All of your tax information is in your account. +

    +

    + The party name of {{ order.first_name }} {{ order.last_name }} will be with the doorman when you arrive. + Please arrive 1/2 hour before the seating. + We are mandated to take temperatures at the door and to collect contact tracing information from at least one person in your party. Your sponsored seat(s) are guaranteed. Your actual space in the venue is first come/first serve so please arrive on time. +

    +

    + If you have any issues please email us at reservations@smallslive.com. +

    + {% else %} +

    + You have successfully made {{ line.quantity }} reservation(s) for the {{ event_set.start }} seating on {{ event.date }} at {{ event.get_venue_name }} Jazz Club. + Your order number is {{ order_number }}. Your card has been charged for {{ line.line_price_incl_tax|currency:order.currency }}. +

    +

    + The reservation name is {{ order.first_name }} {{ order.last_name }} and will be with the doorman when you arrive. + Please arrive 1/2 hour before the seating. + We are mandated to take temperatures at the door and to collect contact tracing information from at least one person in your party. + This reservation guarantees your seating. Your actual space in the venue is first come/first serve so please arrive on time. + We reserve the right to release a seat 15 minutes after the seating time. +

    +

    + Reservations are generally non-refundable however, you may exchange your reservation for another seating depending on availability. + If you have any issues please email us at reservations@smallslive.com. +

    + {% endif %} + {% endwith %} + {% endwith %} {% endfor %} {% endwith %}

    diff --git a/smallslive/templates/events/_event_details_upcoming.html b/smallslive/templates/events/_event_details_upcoming.html index bd5df8e8c..43d702fdb 100644 --- a/smallslive/templates/events/_event_details_upcoming.html +++ b/smallslive/templates/events/_event_details_upcoming.html @@ -67,7 +67,7 @@ // Remember form to be submitted $form = $(this).closest('form'); $('#ticket-time').text( $(this).data('ticket-time')); - $('#ticket-price').text("Sponsorship Seats $" + $(this).data('ticket-price')); + $('#ticket-price').text($(this).data('ticket-price')); $('#ticket-availability').text($(this).data('ticket-availability')); $('#buy-tickets-dialog').modal('show'); diff --git a/smallslive/templates/events/buy_tickets_dialog.html b/smallslive/templates/events/buy_tickets_dialog.html index 8b81c3408..25dc8bd15 100644 --- a/smallslive/templates/events/buy_tickets_dialog.html +++ b/smallslive/templates/events/buy_tickets_dialog.html @@ -2,12 +2,24 @@

    diff --git a/smallslive/users/models.py b/smallslive/users/models.py index 1bc599771..3cc827702 100644 --- a/smallslive/users/models.py +++ b/smallslive/users/models.py @@ -345,7 +345,6 @@ def has_activated_account(self): def can_use_existing_cc(self): customer = Customer.objects.get(subscriber=self) if customer and customer.can_charge(): - print '******* Can charge: ', customer.can_charge() return True return False From cece83b34e4cc751d8c5771d23d37fcd4a0f77b0 Mon Sep 17 00:00:00 2001 From: Martin Prunell Date: Wed, 14 Apr 2021 11:25:05 -0300 Subject: [PATCH 08/10] Merge --- smallslive/oscar_apps/checkout/views.py | 19 ++++++++++++++----- smallslive/subscriptions/mixins.py | 16 +++++++++++++--- smallslive/subscriptions/signals/handlers.py | 4 ++++ 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/smallslive/oscar_apps/checkout/views.py b/smallslive/oscar_apps/checkout/views.py index 2151929e4..c718b9e8d 100644 --- a/smallslive/oscar_apps/checkout/views.py +++ b/smallslive/oscar_apps/checkout/views.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from paypal.payflow import facade from django import http from django.conf import settings from django.contrib import messages @@ -21,6 +20,7 @@ from oscar.core.loading import get_class from oscar_apps.catalogue.models import UserCatalogue, UserCatalogueProduct from oscar_apps.payment.exceptions import RedirectRequiredAjax +from events.models import Event from subscriptions.mixins import PayPalMixin, StripeMixin from subscriptions.models import Donation from utils import utils as sl_utils @@ -233,6 +233,16 @@ def handle(self): artist_id=self.artist_id, event_id=self.event_id, product_id=self.product_id) if self.tickets_type: + event = self.order.get_tickets_event() + if event and event.is_foundation: + payment_source = 'PayPal' + if self.card_token: + payment_source = 'Stripe' + Donation.objects.create_by_order( + self.order, + payment_source, + artist_id=self.artist_id, event_id=self.event_id, product_id=self.product_id) + # Set status to completed for lines if it's a ticket. # 'create_lines_models' method is not passed the order status unfortunately. lines = self.order.lines.all() @@ -899,7 +909,6 @@ def __init__(self, *args, **kwargs): super(ExecutePayPalPaymentView, self).__init__(*args, **kwargs) self.order = None self.payment_id = None - self.tickets = None self.tickets_type = None self.product_id = None self.event_id = None @@ -997,9 +1006,9 @@ def handle_payment(self): # Record payment source order_kwargs = {'order_type': basket.get_order_type()} - venue = basket.get_tickets_venue() - if venue: - self.tickets = venue.name.lower() + if event: + venue = event.venue + self.tickets_type = venue.name.lower() order_kwargs['status'] = 'Completed' payment_source = '{} PayPal'.format(venue.name) payment_event = 'Sold' diff --git a/smallslive/subscriptions/mixins.py b/smallslive/subscriptions/mixins.py index 1dcf80593..132513d44 100644 --- a/smallslive/subscriptions/mixins.py +++ b/smallslive/subscriptions/mixins.py @@ -187,16 +187,26 @@ def handle_stripe_payment(self, order_number, basket_lines, **kwargs): stripe_ref = charge.stripe_id else: - if event and event.is_foundation: - stripe_secret_key = settings.STRIPE_SECRET_KEY + metadata = { + 'isFoundation': True + } + if event: + if event.is_foundation: + stripe_secret_key = settings.STRIPE_SECRET_KEY + else: + stripe_secret_key = venue.get_stripe_secret_key + metadata = { + 'isFoundation': False + } else: - stripe_secret_key = venue.get_stripe_secret_key + stripe_secret_key = settings.STRIPE_SECRET_KEY resp = stripe.Charge.create( api_key=stripe_secret_key, source=self.card_token, amount=int(self.total.incl_tax * 100), # Convert dollars into cents currency=settings.STRIPE_CURRENCY, description=self.payment_description(order_number, self.total.incl_tax, **kwargs), + metadata=metadata ) stripe_ref = resp['id'] diff --git a/smallslive/subscriptions/signals/handlers.py b/smallslive/subscriptions/signals/handlers.py index bae2d3f62..e182f2ad2 100644 --- a/smallslive/subscriptions/signals/handlers.py +++ b/smallslive/subscriptions/signals/handlers.py @@ -15,6 +15,10 @@ def invoice_payment_succeeded(sender, **kwargs): if event: customer = event.customer charge = event.message['data']['object'] + metadata = charge['metadata'] + if 'isFoundation' in metadata and not metadata['isFoundation']: + return + invoice = charge['invoice'] charge_id = charge['id'] amount = charge['amount'] / 100 From 31809d155af3dfcf448ddfcb3189332bfa35a98e Mon Sep 17 00:00:00 2001 From: Martin Prunell Date: Fri, 7 May 2021 15:44:41 -0300 Subject: [PATCH 09/10] Remove wkhtmltopdf requirement --- requirements/base.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 2c1715107..9c1c1030c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -97,6 +97,4 @@ urllib3==1.10.1 whitenoise==2.0.4 wsgiref==0.1.2 xlsxwriter==0.7.3 -django-wkhtmltopdf==3.2.0 -wkhtmltopdf-pack==0.12.2.4 paypalrestsdk From 13a486217875cce18b3ca1f26d145a38620edcb6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 May 2021 18:46:28 +0000 Subject: [PATCH 10/10] Bump hosted-git-info from 2.7.1 to 2.8.9 Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.7.1 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.9) Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c31f3381..875ed50b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -612,7 +612,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { "ansi-styles": "^2.2.1", @@ -2595,7 +2595,7 @@ }, "lodash": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=" }, "minimatch": { @@ -2920,9 +2920,9 @@ } }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" }, "http-errors": { "version": "1.6.3",