From f35ffded815e6ef917e54ef187565029a83b2599 Mon Sep 17 00:00:00 2001 From: rizwanisready Date: Fri, 24 May 2024 16:39:00 +0530 Subject: [PATCH] html web view --- manage_subscriptions/views.py | 6 +- templates/stripe_html/index.html | 176 +++++++++++++++++++------------ 2 files changed, 109 insertions(+), 73 deletions(-) diff --git a/manage_subscriptions/views.py b/manage_subscriptions/views.py index f6e47dd..cf1c929 100644 --- a/manage_subscriptions/views.py +++ b/manage_subscriptions/views.py @@ -1,6 +1,6 @@ from datetime import timedelta import json -from django.http import HttpResponseBadRequest, JsonResponse +from django.http import HttpResponseBadRequest, JsonResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, redirect, render import stripe from accounts import resource_action @@ -427,8 +427,8 @@ def create_checkout_session(request): principal_id = request.user.id if _has_active_principal_subscription(principal_id): - messages.success(request, "Active principal subscription already exists") - return redirect(success_url) + messages.error(request, "Active principal subscription already exists") + return HttpResponseRedirect(success_url) try: subscription = Subscription.objects.get(id=subscription_id) diff --git a/templates/stripe_html/index.html b/templates/stripe_html/index.html index 152a687..40ab87f 100644 --- a/templates/stripe_html/index.html +++ b/templates/stripe_html/index.html @@ -52,14 +52,7 @@
-
- {% for message in messages %} - - {% endfor %} -
- +
@@ -81,46 +74,7 @@
--> - {% for subscription in subscriptions %} -
-
- -
{{ subscription.title }}
- {% if subscription.image %} - {{ subscription.title }} - {% endif %} -
-
- {% if subscription.short_description %} -

{{ subscription.short_description }}

- {% endif %} - {% if subscription.long_description %} -

{{ subscription.long_description|truncatewords:20 }}

- {% endif %} -
Subscription Amount
- {% if subscription.high_amount and subscription.high_amount > subscription.amount %} -

£ {{ subscription.high_amount }} £ {{ subscription.amount }}

- {% else %} -

£ {{ subscription.amount }}

- {% endif %} - {% if subscription.plan.days %} -

Days of Subscription: {{ subscription.plan.days }}

- {% else %} -

Days of Subscription: Not available

- {% endif %} - -
-
- - -
-
-
- {% empty %} -

No subscriptions available.

- {% endfor %} +
@@ -136,6 +90,55 @@
+
+
+
+ {% for subscription in subscriptions %} +
+
+ +
{{ subscription.title }} +
+ {% if subscription.image %} + {{ subscription.title }} + {% endif %} +
+
+ {% if subscription.short_description %} +

{{ subscription.short_description }}

+ {% endif %} + {% if subscription.long_description %} +

{{ subscription.long_description|truncatewords:20 }}

+ {% endif %} +
Subscription Amount
+ {% if subscription.high_amount and subscription.high_amount > subscription.amount %} +

£ {{ subscription.high_amount }} £ {{ subscription.amount }} +

+ {% else %} +

£ {{ subscription.amount }}

+ {% endif %} + {% if subscription.plan.days %} +

Days of Subscription: {{ subscription.plan.days }}

+ {% else %} +

Days of Subscription: Not available

+ {% endif %} + +
+
+ + +
+
+
+ {% empty %} +

No subscriptions available.

+ {% endfor %} +
+ +
+
+
@@ -276,11 +279,13 @@

-

-
+
Good Times covers a wide range of events, including concerts, sporting events, @@ -292,125 +297,156 @@

-

- The Good Times App is a revolutionary mobile application designed to bring people together by providing a comprehensive listing of local and regional events. It caters to a wide range of interests and passions, making it easier for users to find and connect with events they love. + The Good Times App is a revolutionary mobile application designed to bring people + together by providing a comprehensive listing of local and regional events. It caters to + a wide range of interests and passions, making it easier for users to find and connect + with events they love.

-

- For every new user that signs up for the Good Times App using a referral code, the referrer earns 1 G-Token. The referrer continues to earn G-Tokens for each monthly subscription payment made by the referred user. These tokens can be sold back to Good Times Ltd for cash or used towards event payments. + For every new user that signs up for the Good Times App using a referral code, the + referrer earns 1 G-Token. The referrer continues to earn G-Tokens for each monthly + subscription payment made by the referred user. These tokens can be sold back to Good + Times Ltd for cash or used towards event payments.

-

- G-Tokens are valued at 25% of the minimum monthly subscription cost. The funds from sold G-Tokens are paid into the user's bank account of choice, according to the app's terms and conditions. + G-Tokens are valued at 25% of the minimum monthly subscription cost. The funds from sold + G-Tokens are paid into the user's bank account of choice, according to the app's terms + and conditions.

-

- No, there's no limit to the number of G-Tokens you can sell back to Good Times. However, withdrawals can only be made once per month. + No, there's no limit to the number of G-Tokens you can sell back to Good Times. However, + withdrawals can only be made once per month.

-

- The Good Times App partners with local event organizers and venues, granting them 24-hour control over their event profiles and promotions. This ensures that customers receive the most recent and accurate event information directly from the source. + The Good Times App partners with local event organizers and venues, granting them + 24-hour control over their event profiles and promotions. This ensures that customers + receive the most recent and accurate event information directly from the source.

-

- Events are ranked based on a unique algorithm that considers customer interaction, website traffic to the event's page, and the event's 1-to-5 star reviews. This helps users find popular and highly regarded events tailored to their interests. + Events are ranked based on a unique algorithm that considers customer interaction, + website traffic to the event's page, and the event's 1-to-5 star reviews. This helps + users find popular and highly regarded events tailored to their interests.

-

- No, the app does not facilitate direct event bookings. However, it provides links to event owners' or promoters' websites, where users can make bookings. + No, the app does not facilitate direct event bookings. However, it provides links to + event owners' or promoters' websites, where users can make bookings.

-

- No, Good Times does not charge partners for traffic data to their websites. The app focuses on facilitating easy access to events for users without additional costs for traffic. + No, Good Times does not charge partners for traffic data to their websites. The app + focuses on facilitating easy access to events for users without additional costs for + traffic.

-

- Safety and security are paramount for Good Times. The app employs the latest technologies and practices to protect user data and privacy. While it vets each event and organizer, it also encourages users to perform their due diligence for added safety. + Safety and security are paramount for Good Times. The app employs the latest + technologies and practices to protect user data and privacy. While it vets each event + and organizer, it also encourages users to perform their due diligence for added safety.

-

- If you cancel your subscription, Good Times offers account recovery, allowing you to pick up where you left off, including any referrals made previously. There is also a 15-day grace period for missed payments, after which wallet funds will be lost if the payment is not made. + If you cancel your subscription, Good Times offers account recovery, allowing you to + pick up where you left off, including any referrals made previously. There is also a + 15-day grace period for missed payments, after which wallet funds will be lost if the + payment is not made.