From 8a4a2ff94172a83f5d7531e1b3e31bd5fd8812f5 Mon Sep 17 00:00:00 2001 From: Levi Date: Mon, 16 Jan 2017 11:03:23 -0500 Subject: [PATCH] fixed scroll navbar issue, fixed supportus, fixed billing addres --- digitalglarus/static/digitalglarus/css/price.css | 2 +- .../templates/digitalglarus/booking_orders_detail.html | 2 +- .../digitalglarus/membership_orders_detail.html | 2 +- digitalglarus/templates/digitalglarus/supportus.html | 8 +++----- digitalglarus/views.py | 9 +++++---- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/digitalglarus/static/digitalglarus/css/price.css b/digitalglarus/static/digitalglarus/css/price.css index 7ba953ab..12a0e2f0 100644 --- a/digitalglarus/static/digitalglarus/css/price.css +++ b/digitalglarus/static/digitalglarus/css/price.css @@ -71,7 +71,7 @@ padding-right: 15px; padding-top: 15px; padding-bottom: 30px; - margin-top: 10px; + margin-top: 80px; margin-bottom: 30px; margin-left: 10px; margin-right: 10px; diff --git a/digitalglarus/templates/digitalglarus/booking_orders_detail.html b/digitalglarus/templates/digitalglarus/booking_orders_detail.html index a84428bd..36435f0d 100644 --- a/digitalglarus/templates/digitalglarus/booking_orders_detail.html +++ b/digitalglarus/templates/digitalglarus/booking_orders_detail.html @@ -113,7 +113,7 @@ {% else %}

- Go to my page + Go to my page

{% endif %} diff --git a/digitalglarus/templates/digitalglarus/membership_orders_detail.html b/digitalglarus/templates/digitalglarus/membership_orders_detail.html index c8c5018c..b504c6e0 100644 --- a/digitalglarus/templates/digitalglarus/membership_orders_detail.html +++ b/digitalglarus/templates/digitalglarus/membership_orders_detail.html @@ -50,7 +50,7 @@ -
+

Order Summary

diff --git a/digitalglarus/templates/digitalglarus/supportus.html b/digitalglarus/templates/digitalglarus/supportus.html index afff1994..28659e23 100644 --- a/digitalglarus/templates/digitalglarus/supportus.html +++ b/digitalglarus/templates/digitalglarus/supportus.html @@ -1,7 +1,9 @@ {% extends "new_base_glarus.html" %} {% load staticfiles cms_tags %} -{% block extra_css %} + +{% block content %} + -{% endblock %} - - -{% block content %}
diff --git a/digitalglarus/views.py b/digitalglarus/views.py index cafe82a8..ed9e062b 100644 --- a/digitalglarus/views.py +++ b/digitalglarus/views.py @@ -328,7 +328,7 @@ class BookingPaymentView(LoginRequiredMixin, MembershipRequiredMixin, FormView): #credit_card_data = #### ESTOY POR AQUI CAMBIANDO ESTO UN POCO PARA VER SI FUNCIONA ########################################################################################## - cus = StripeCustomer.get_or_create(email=user ) + cus = StripeCustomer.get_or_create(email=user) s= str(cus) s= s.split(" ") customer = stripe.Customer.retrieve(s[0]) @@ -647,11 +647,11 @@ class UserBillingAddressView(LoginRequiredMixin, UpdateView): def get_context_data(self, **kwargs): context = super(UserBillingAddressView, self).get_context_data(**kwargs) - current_billing_address = self.request.user.billing_addresses.first() + current_billing_address = self.request.user.billing_addresses.all().first() context.update({ 'current_billing_address': current_billing_address }) - return current_billing_address + return context def form_valid(self, form): """ @@ -679,7 +679,8 @@ class UserBillingAddressView(LoginRequiredMixin, UpdateView): return form_kwargs def get_object(self): - current_billing_address = self.request.user.billing_addresses.filter(current=True).last() + current_billing_address = self.request.user.\ + billing_addresses.filter(current=True).last() # if not current_billing_address: # raise AttributeError("Billing Address does not exists") return current_billing_address