diff --git a/accounts/context_processors.py b/accounts/context_processors.py index 6166662..755ece6 100644 --- a/accounts/context_processors.py +++ b/accounts/context_processors.py @@ -33,10 +33,12 @@ def compute_resource_action_constants(): 'RESOURCE_MANAGE_WALLET': resource_action.RESOURCE_MANAGE_WALLET, 'RESOURCE_MANAGE_PAYMENT': resource_action.RESOURCE_MANAGE_PAYMENT, 'RESOURCE_MANAGE_EVENTS': resource_action.RESOURCE_MANAGE_EVENTS, + 'RESOURCE_MANAGE_VENUES': resource_action.RESOURCE_MANAGE_VENUES, 'RESOURCE_MANAGE_CONTACT_US': resource_action.RESOURCE_MANAGE_CONTACT_US, 'RESOURCE_MANAGE_CMS': resource_action.RESOURCE_MANAGE_CMS, 'RESOURCE_MANAGE_REPORTS': resource_action.RESOURCE_MANAGE_REPORTS, 'RESOURCE_MANAGE_SUBSCRIPTIONS': resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS, + 'RESOURCE_PRINCIPAL_SUBSCRIPTIONS': resource_action.RESOURCE_PRINCIPAL_SUBSCRIPTIONS, 'RESOURCE_MANAGE_NOTIFICATIONS': resource_action.RESOURCE_MANAGE_NOTIFICATIONS, 'RESOURCE_MANAGE_REFERRALS': resource_action.RESOURCE_MANAGE_REFERRALS, 'RESOURCE_MANAGE_FEEDBACK': resource_action.RESOURCE_MANAGE_FEEDBACK, diff --git a/accounts/fixture_script.py b/accounts/fixture_script.py index eecfd7d..e5f99eb 100644 --- a/accounts/fixture_script.py +++ b/accounts/fixture_script.py @@ -18,10 +18,12 @@ from accounts.resource_action import ( RESOURCE_MANAGE_WALLET, RESOURCE_MANAGE_PAYMENT, RESOURCE_MANAGE_EVENTS, + RESOURCE_MANAGE_VENUES, RESOURCE_MANAGE_CONTACT_US, RESOURCE_MANAGE_CMS, RESOURCE_MANAGE_REPORTS, RESOURCE_MANAGE_SUBSCRIPTIONS, + RESOURCE_PRINCIPAL_SUBSCRIPTIONS, RESOURCE_MANAGE_REFERRALS, RESOURCE_MANAGE_FEEDBACK, ) @@ -282,4 +284,28 @@ fixture_data = [ "action": [1, 2, 3, 4], }, }, + { + "model": "accounts.iamappresource", + "pk": 14, + "fields": { + "name": RESOURCE_MANAGE_VENUES, + "label": RESOURCE_MANAGE_VENUES, + "slug": RESOURCE_MANAGE_VENUES, + "created_on": "2023-09-28T16:17:42.815", + "modified_on": "2023-09-28T16:17:42.815", + "action": [1, 2, 3, 4], + }, + }, + { + "model": "accounts.iamappresource", + "pk": 15, + "fields": { + "name": RESOURCE_PRINCIPAL_SUBSCRIPTIONS, + "label": RESOURCE_PRINCIPAL_SUBSCRIPTIONS, + "slug": RESOURCE_PRINCIPAL_SUBSCRIPTIONS, + "created_on": "2023-09-28T16:17:42.815", + "modified_on": "2023-09-28T16:17:42.815", + "action": [1, 2, 3, 4], + }, + }, ] diff --git a/accounts/fixtures/resource_action_fixture.json b/accounts/fixtures/resource_action_fixture.json index 2c7fa7a..b414de9 100644 --- a/accounts/fixtures/resource_action_fixture.json +++ b/accounts/fixtures/resource_action_fixture.json @@ -318,5 +318,39 @@ 4 ] } + }, + { + "model": "accounts.iamappresource", + "pk": 14, + "fields": { + "name": "manage_venues", + "label": "manage_venues", + "slug": "manage_venues", + "created_on": "2023-09-28T16:17:42.815", + "modified_on": "2023-09-28T16:17:42.815", + "action": [ + 1, + 2, + 3, + 4 + ] + } + }, + { + "model": "accounts.iamappresource", + "pk": 15, + "fields": { + "name": "principal_subscription", + "label": "principal_subscription", + "slug": "principal_subscription", + "created_on": "2023-09-28T16:17:42.815", + "modified_on": "2023-09-28T16:17:42.815", + "action": [ + 1, + 2, + 3, + 4 + ] + } } ] \ No newline at end of file diff --git a/accounts/resource_action.py b/accounts/resource_action.py index 72413c4..9ac0e88 100644 --- a/accounts/resource_action.py +++ b/accounts/resource_action.py @@ -16,11 +16,13 @@ RESOURCE_MANAGE_CUSTOMER = "manage_customer" RESOURCE_MANAGE_WALLET = "manage_wallet" RESOURCE_MANAGE_PAYMENT = "manage_payment" RESOURCE_MANAGE_EVENTS = "manage_events" +RESOURCE_MANAGE_VENUES = "manage_venues" RESOURCE_MANAGE_CONTACT_US = "manage_contact_us" RESOURCE_MANAGE_TICKET = "manage_ticket" RESOURCE_MANAGE_CMS = "manage_cms" RESOURCE_MANAGE_REPORTS = "manage_reports" RESOURCE_MANAGE_SUBSCRIPTIONS = "manage_subscriptions" +RESOURCE_PRINCIPAL_SUBSCRIPTIONS = "principal_subscriptions" RESOURCE_MANAGE_FEEDBACK = "manage_feedback" RESOURCE_MANAGE_REFERRALS = "manage_referrals" RESOURCE_MANAGE_NOTIFICATIONS = "manage_notifications" diff --git a/goodtimes/settings/base.py b/goodtimes/settings/base.py index 497d1b7..c41bf8e 100644 --- a/goodtimes/settings/base.py +++ b/goodtimes/settings/base.py @@ -277,7 +277,7 @@ LOGGING = { # jwt configuration # https://django-rest-framework-simplejwt.readthedocs.io/en/latest/settings.html#settings SIMPLE_JWT = { - "ACCESS_TOKEN_LIFETIME": datetime.timedelta(days=10), + "ACCESS_TOKEN_LIFETIME": datetime.timedelta(minutes=1), "REFRESH_TOKEN_LIFETIME": datetime.timedelta(days=15), "ROTATE_REFRESH_TOKENS": False, "BLACKLIST_AFTER_ROTATION": False, @@ -332,3 +332,7 @@ CRONJOBS = [ ] GOOGLE_MAPS_API_KEY = env.str("GOOGLE_MAPS_API_KEY") +PLACES_MAPS_API_KEY = env.str("GOOGLE_MAPS_API_KEY") +PLACES_MAP_WIDGET_HEIGHT = 480 +PLACES_MAP_OPTIONS = '{"center": { "lat": 38.971584, "lng": -95.235072 }, "zoom": 10}' +PLACES_MARKER_OPTIONS = '{"draggable": true}' diff --git a/manage_cms/urls.py b/manage_cms/urls.py index d179036..3deb64f 100644 --- a/manage_cms/urls.py +++ b/manage_cms/urls.py @@ -32,6 +32,8 @@ urlpatterns = [ path('faq/', views.FaqListView.as_view(), name='faq_list'), path('faq/add/', views.FaqCreateOrUpdateView.as_view(), name='faq_add'), path('faq/edit//', views.FaqCreateOrUpdateView.as_view(), name='faq_edit'), + path('faq/delete//', views.FAQDeleteView.as_view(), name='faq_delete'), + path('faq/category/add/', views.FaqCategoryCreateOrUpdateView.as_view(), name='faq_category_add'), path('faq/category/edit//', views.FaqCategoryCreateOrUpdateView.as_view(), name='faq_category_edit'), diff --git a/manage_cms/views.py b/manage_cms/views.py index 8726fdf..36f52e3 100644 --- a/manage_cms/views.py +++ b/manage_cms/views.py @@ -541,6 +541,28 @@ class FaqCreateOrUpdateView(LoginRequiredMixin, generic.View): return redirect(self.success_url) +class FAQDeleteView(LoginRequiredMixin, generic.View): + page_name = resource_action.RESOURCE_MANAGE_CMS + resource = resource_action.RESOURCE_MANAGE_CMS + action = resource_action.ACTION_DELETE + model = Faqs + success_url = reverse_lazy("manage_cms:faq_list") + success_message = constants.RECORD_DELETED + error_message = constants.RECORD_NOT_FOUND + + def get(self, request, pk): + try: + faq_obj = self.model.objects.get(id=pk) + faq_obj.deleted = True + faq_obj.active = False + faq_obj.save() + messages.success(request, self.success_message) + except self.model.DoesNotExist: + messages.success(request, self.error_message) + + return redirect(self.success_url) + + class FaqCategoryCreateOrUpdateView(LoginRequiredMixin, generic.View): # Set the page_name and resource page_name = resource_action.RESOURCE_MANAGE_CMS diff --git a/manage_events/forms.py b/manage_events/forms.py index c3475e5..8da26e8 100644 --- a/manage_events/forms.py +++ b/manage_events/forms.py @@ -1,5 +1,7 @@ from django import forms -from manage_events.models import EventMaster, Event, EventCategory +from manage_events.models import EventMaster, Event, EventCategory, Venue +from django.core.exceptions import ValidationError +from django.utils.translation import gettext_lazy as _ class EventCategoryForm(forms.ModelForm): @@ -18,7 +20,7 @@ class EventForm(forms.ModelForm): model = Event fields = [ "title", - "event_master", + # "event_master", "description", "image", "status", @@ -62,13 +64,57 @@ class EventForm(forms.ModelForm): "image": forms.FileInput(attrs={"class": "form-control-file"}), # For ForeignKey fields like 'EventMaster' and 'venue', Django uses a select widget by default. # You can customize it further if needed: - "event_master": forms.Select(attrs={"class": "form-control"}), + # "event_master": forms.Select(attrs={"class": "form-control"}), "venue": forms.Select(attrs={"class": "form-control"}), "category": forms.Select(attrs={"class": "form-control"}), } + def clean(self): + cleaned_data = super().clean() + + # Get the start and end dates from cleaned_data + start_date = cleaned_data.get("start_date") + end_date = cleaned_data.get("end_date") + + # Validation 1: end_date should not be less than start_date + if end_date and start_date and end_date < start_date: + self.add_error("end_date", _("End date cannot be before the start date.")) + + # Get the from and to times from cleaned_data + from_time = cleaned_data.get("from_time") + to_time = cleaned_data.get("to_time") + + # Validation 2: to_time should not be less than or equal to from_time + if to_time and from_time and to_time <= from_time: + self.add_error("to_time", _("End time must be after the start time.")) + + return cleaned_data + class EventMasterForm(forms.ModelForm): class Meta: model = EventMaster fields = "__all__" # Includes all fields from the model + + +class VenueForm(forms.ModelForm): + class Meta: + model = Venue + fields = [ + "title", + "description", + "address", + "image", + "url", + "latitude", + "longitude", + ] + widgets = { + "title": forms.TextInput(attrs={"class": "form-control"}), + "description": forms.Textarea(attrs={"class": "form-control", "rows": 4}), + "address": forms.Textarea(attrs={"class": "form-control", "rows": 3}), + "image": forms.FileInput(attrs={"class": "form-control"}), + "url": forms.URLInput(attrs={"class": "form-control"}), + "latitude": forms.NumberInput(attrs={"class": "form-control"}), + "longitude": forms.NumberInput(attrs={"class": "form-control"}), + } diff --git a/manage_events/urls.py b/manage_events/urls.py index b9e699f..543d40b 100644 --- a/manage_events/urls.py +++ b/manage_events/urls.py @@ -68,4 +68,25 @@ urlpatterns = [ views.EventDeleteView.as_view(), name="event_delete", ), + # Venue + path( + "venue/list/", + views.VenueView.as_view(), + name="venue_list", + ), + path( + "venue/add/", + views.VenueCreateOrUpdateView.as_view(), + name="venue_add", + ), + path( + "venue/edit//", + views.VenueCreateOrUpdateView.as_view(), + name="venue_edit", + ), + path( + "venue/delete/", + views.VenueDeleteView.as_view(), + name="venue_delete", + ), ] diff --git a/manage_events/views.py b/manage_events/views.py index 8c38b5c..6de956d 100644 --- a/manage_events/views.py +++ b/manage_events/views.py @@ -4,9 +4,10 @@ from manage_events.forms import ( EventMasterForm, EventCategoryForm, EventForm, + VenueForm, ) from django.core.paginator import Paginator -from .models import EventMaster, Event, EventCategory +from .models import EventMaster, Event, EventCategory, Venue from django.views import generic from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy @@ -351,3 +352,106 @@ class EventDeleteView(LoginRequiredMixin, generic.View): messages.success(request, self.error_message) return redirect(self.success_url) + + +class VenueCreateOrUpdateView(LoginRequiredMixin, generic.View): + # Set the page_name and resource + page_name = resource_action.RESOURCE_MANAGE_VENUES + resource = resource_action.RESOURCE_MANAGE_VENUES + + # Initialize the action as ACTION_CREATE (can change based on logic) + action = resource_action.ACTION_CREATE # Default action + + template_name = "manage_venues/venue_add.html" + model = Venue + form_class = VenueForm + success_url = reverse_lazy("manage_events:venue_list") + error_message = "An error occurred while saving the data." + + # Determine the success message dynamically based on whether it's an update or create + def get_success_message(self): + self.success_message = ( + constants.RECORD_CREATED if not self.object else constants.RECORD_UPDATED + ) + return self.success_message + + # Get the object (if exists) based on URL parameter 'pk' + def get_object(self): + pk = self.kwargs.get("pk") + return get_object_or_404(self.model, pk=pk) if pk else None + + # Add page_name and operation to the context + def get_context_data(self, **kwargs): + context = { + "page_name": self.page_name, + "operation": "Add" if not self.object else "Edit", + } + context.update(kwargs) # Include any additional context data passed to the view + return context + + def get(self, request, *args, **kwargs): + self.object = self.get_object() + + # If an object is found, change action to ACTION_UPDATE + if self.object is not None: + self.action = resource_action.ACTION_UPDATE + + form = self.form_class(instance=self.object) + context = self.get_context_data(form=form) + return render(request, self.template_name, context=context) + + def post(self, request, *args, **kwargs): + self.object = self.get_object() + + # If an object is found, change action to ACTION_UPDATE + if self.object is not None: + self.action = resource_action.ACTION_UPDATE + + form = self.form_class(request.POST, request.FILES, instance=self.object) + if not form.is_valid(): + print(form.errors) + context = self.get_context_data(form=form) + return render(request, self.template_name, context=context) + form.save() + messages.success(self.request, self.get_success_message()) + return redirect(self.success_url) + + +class VenueView(LoginRequiredMixin, generic.ListView): + page_name = resource_action.RESOURCE_MANAGE_VENUES + resource = resource_action.RESOURCE_MANAGE_VENUES + action = resource_action.ACTION_READ + model = Venue + template_name = "manage_venues/venue_list.html" + context_object_name = "venue_obj" + # paginate_by = 10 + + def get_queryset(self): + return super().get_queryset().filter(deleted=False, active=True) + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["page_name"] = self.page_name + return context + + +class VenueDeleteView(LoginRequiredMixin, generic.View): + page_name = resource_action.RESOURCE_MANAGE_VENUES + resource = resource_action.RESOURCE_MANAGE_VENUES + action = resource_action.ACTION_DELETE + model = Venue + success_url = reverse_lazy("manage_events:venue_list") + success_message = constants.RECORD_DELETED + error_message = constants.RECORD_NOT_FOUND + + def get(self, request, pk): + try: + type_obj = self.model.objects.get(id=pk) + type_obj.deleted = True + type_obj.active = False + type_obj.save() + messages.success(request, self.success_message) + except self.model.DoesNotExist: + messages.success(request, self.error_message) + + return redirect(self.success_url) diff --git a/manage_notifications/forms.py b/manage_notifications/forms.py index 24ec1d3..6c36c13 100644 --- a/manage_notifications/forms.py +++ b/manage_notifications/forms.py @@ -8,7 +8,7 @@ class PushNotificationForm(forms.ModelForm): fields = [ "title", "notification_category", - "banner_image", + # "banner_image", "principal_type", "message", ] diff --git a/manage_notifications/utils.py b/manage_notifications/utils.py index 2fa6a08..ce7382a 100644 --- a/manage_notifications/utils.py +++ b/manage_notifications/utils.py @@ -1,5 +1,6 @@ import json import requests +from django.db.models import Q from onesignal_sdk.client import Client as OneSignalClient from django.conf import settings from .models import IAmPrincipalNotificationSettings, IAmPrincipal, PrincipalType @@ -33,6 +34,8 @@ def onesignal_send_notification( if image_url: # Include image URL if provided (requires additional OneSignal configuration) + data["big_picture"] = str(image_url.url) + data["small_icon"] = str(image_url.url) data["large_icon"] = str(image_url.url) # data = json.dumps(data) @@ -68,14 +71,16 @@ def send_notification(title, message, image_url=None, eligible_principals=None): "headings": {"en": title}, "contents": {"en": message}, "include_player_ids": eligible_principals, - "big_picture": image_url.url, } - if image_url: - image_url_str = image_url.url - notification_payload["big_picture"] = image_url_str + # if image_url: + # # image_url_str = image_url.url + # notification_payload["big_picture"] = image_url + # notification_payload["small_icon"] = image_url + # notification_payload["large_icon"] = image_url # Send notification + print("notification_payload: ", notification_payload) response = onesignal_client.send_notification(notification_payload) print(response.status_code, response.body) @@ -88,37 +93,44 @@ def get_eligible_principals_for_notification(push_notification): if principal_type == PrincipalType.BOTH: # If BOTH is selected, fetch users categorized under both EVENT_USER and EVENT_MANAGER - event_user_principals = IAmPrincipal.objects.filter( - principal_type__name=PrincipalType.EVENT_USER, - notifications_principal__notification_category=notification_category, - notifications_principal__is_enabled=True, + eligible_principals = list( + IAmPrincipal.objects.filter( + Q(principal_type__name=PrincipalType.EVENT_USER) + | Q(principal_type__name=PrincipalType.EVENT_MANAGER), + notifications_principal__notification_category=notification_category, + notifications_principal__is_enabled=True, + ).values_list("player_id", flat=True) ) - event_manager_principals = IAmPrincipal.objects.filter( - principal_type__name=PrincipalType.EVENT_MANAGER, - notifications_principal__notification_category=notification_category, - notifications_principal__is_enabled=True, - ) + # event_manager_principals = IAmPrincipal.objects.filter( + # principal_type__name=PrincipalType.EVENT_MANAGER, + # notifications_principal__notification_category=notification_category, + # notifications_principal__is_enabled=True, + # ) - # Combine the QuerySets. Use | operator for OR query (union) and distinct() to avoid duplicates. - eligible_principals = ( - event_user_principals | event_manager_principals - ).distinct() + # # Combine the QuerySets. Use | operator for OR query (union) and distinct() to avoid duplicates. + # eligible_principals = ( + # event_user_principals | event_manager_principals + # ) elif principal_type == PrincipalType.EVENT_USER: # Fetch only EVENT_USER principals - eligible_principals = IAmPrincipal.objects.filter( - principal_type__name=PrincipalType.EVENT_USER, - notifications_principal__notification_category=notification_category, - notifications_principal__is_enabled=True, + eligible_principals = list( + IAmPrincipal.objects.filter( + principal_type__name=PrincipalType.EVENT_USER, + notifications_principal__notification_category=notification_category, + notifications_principal__is_enabled=True, + ).values_list("player_id", flat=True) ) elif principal_type == PrincipalType.EVENT_MANAGER: # Fetch only EVENT_MANAGER principals - eligible_principals = IAmPrincipal.objects.filter( - principal_type__name=PrincipalType.EVENT_MANAGER, - notifications_principal__notification_category=notification_category, - notifications_principal__is_enabled=True, + eligible_principals = list( + IAmPrincipal.objects.filter( + principal_type__name=PrincipalType.EVENT_MANAGER, + notifications_principal__notification_category=notification_category, + notifications_principal__is_enabled=True, + ).values_list("player_id", flat=True) ) return eligible_principals diff --git a/manage_notifications/views.py b/manage_notifications/views.py index 6244b44..f99a6f7 100644 --- a/manage_notifications/views.py +++ b/manage_notifications/views.py @@ -5,6 +5,8 @@ from django.views import generic from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from django.core.serializers import serialize +from django.contrib.sites.shortcuts import get_current_site +from django.conf import settings from accounts import resource_action from goodtimes import constants from manage_notifications.forms import PushNotificationForm @@ -64,6 +66,12 @@ class PushNotificationsCreateOrUpdateView(LoginRequiredMixin, generic.View): context = self.get_context_data(form=form) return render(request, self.template_name, context=context) + def get_image_url(self, obj, field_name, request): + image_field = getattr(obj, field_name, None) + if image_field: + return request.build_absolute_uri(image_field.url) + return "" + def post(self, request, *args, **kwargs): self.object = self.get_object() # If an object is found, change action to ACTION_UPDATE @@ -76,36 +84,23 @@ class PushNotificationsCreateOrUpdateView(LoginRequiredMixin, generic.View): context = self.get_context_data(form=form) return render(request, self.template_name, context=context) - push_notification = form.instance + push_notification = form.save() eligible_principals = get_eligible_principals_for_notification( push_notification ) print("eligible_principals: ", eligible_principals) - eligible_principals_json = serialize('json', eligible_principals) - eligible_principals_list = json.loads(eligible_principals_json) - player_ids = [principal['fields']['player_id'] for principal in eligible_principals_list] # Send notification title = push_notification.title message = push_notification.message - image_url = push_notification.banner_image - # onesignal_send_notification(title, message, image_url, player_ids) - send_notification(title, message, image_url, player_ids) - print(onesignal_send_notification) - # if onesignal_send_notification( - # push_notification.title, - # push_notification.message, - # None, - # eligible_principals, - # ): - # form.save() - # messages.success(request, self.get_success_message()) - # return redirect(self.success_url) - # else: - # messages.error(request, "Failed to send notification. Form not saved.") - # context = self.get_context_data(form=form) - # return render(request, self.template_name, context=context) - - form.save() + # image_url = self.get_image_url(push_notification, "banner_image", request) + # print(f"image url=========={image_url}") + send_notification( + title=title, + message=message, + # image_url=image_url, + eligible_principals=eligible_principals, + ) + print(send_notification) messages.success(request, self.get_success_message()) return redirect(self.success_url) diff --git a/manage_subscriptions/forms.py b/manage_subscriptions/forms.py index ab7b442..0e99151 100644 --- a/manage_subscriptions/forms.py +++ b/manage_subscriptions/forms.py @@ -30,10 +30,8 @@ class PrincipalSubscriptionForm(forms.ModelForm): model = PrincipalSubscription fields = "__all__" # Includes all fields from the model widgets = { - 'start_date': forms.DateInput(attrs={'type': 'date'}), - 'end_date': forms.DateInput(attrs={'type': 'date'}), - 'grace_period_end_date': forms.DateInput(attrs={'type': 'date'}), - 'cancelled_date_time': forms.DateTimeInput(attrs={'type': 'datetime'}), + "start_date": forms.DateInput(attrs={"type": "date"}), + "end_date": forms.DateInput(attrs={"type": "date"}), + "grace_period_end_date": forms.DateInput(attrs={"type": "date"}), + "cancelled_date_time": forms.DateTimeInput(attrs={"type": "datetime"}), } - - diff --git a/manage_subscriptions/urls.py b/manage_subscriptions/urls.py index 8deff4e..aa767f8 100644 --- a/manage_subscriptions/urls.py +++ b/manage_subscriptions/urls.py @@ -17,39 +17,39 @@ urlpatterns = [ views.SubscriptionCreateOrUpdateView.as_view(), name="subscription_edit", ), - path( - "subscription/delete/", - views.SubscriptionDeleteView.as_view(), - name="subscription_delete", - ), + # path( + # "subscription/delete/", + # views.SubscriptionDeleteView.as_view(), + # name="subscription_delete", + # ), # PLANS path("plan/list/", views.PlanView.as_view(), name="plan_list"), - path( - "plan/add/", - views.PlanCreateOrUpdateView.as_view(), - name="plan_add", - ), - path( - "plan/edit//", - views.PlanCreateOrUpdateView.as_view(), - name="plan_edit", - ), - path( - "plan/delete/", - views.PlanDeleteView.as_view(), - name="plan_delete", - ), + # path( + # "plan/add/", + # views.PlanCreateOrUpdateView.as_view(), + # name="plan_add", + # ), + # path( + # "plan/edit//", + # views.PlanCreateOrUpdateView.as_view(), + # name="plan_edit", + # ), + # path( + # "plan/delete/", + # views.PlanDeleteView.as_view(), + # name="plan_delete", + # ), # Principal Subscription path( "principal_subscription/list/", views.PrincipalSubscriptionView.as_view(), name="principal_subscriptions_list", ), - path( - "principal_subscription/add/", - views.PrincipalSubscriptionCreateOrUpdateView.as_view(), - name="principal_subscription_add", - ), + # path( + # "principal_subscription/add/", + # views.PrincipalSubscriptionCreateOrUpdateView.as_view(), + # name="principal_subscription_add", + # ), path( "principal_subscription/edit//", views.PrincipalSubscriptionCreateOrUpdateView.as_view(), @@ -73,5 +73,5 @@ urlpatterns = [ path("stripe/", views.SubscriptionPageView.as_view(), name="stripe"), path("success/", views.SuccessView.as_view(), name="success"), path("cancel/", views.CancelView.as_view(), name="cancel"), - path("join-now/", views.IndexView.as_view(), name="index"), + # path("join-now/", views.IndexView.as_view(), name="index"), ] diff --git a/manage_subscriptions/views.py b/manage_subscriptions/views.py index 8110929..aa8b122 100644 --- a/manage_subscriptions/views.py +++ b/manage_subscriptions/views.py @@ -115,89 +115,89 @@ class SubscriptionView(LoginRequiredMixin, generic.ListView): return context -class SubscriptionDeleteView(LoginRequiredMixin, generic.View): - page_name = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS - resource = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS - action = resource_action.ACTION_DELETE - model = Subscription - success_url = reverse_lazy("manage_subscriptions:subscription_list") - success_message = constants.RECORD_DELETED - error_message = constants.RECORD_NOT_FOUND +# class SubscriptionDeleteView(LoginRequiredMixin, generic.View): +# page_name = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS +# resource = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS +# action = resource_action.ACTION_DELETE +# model = Subscription +# success_url = reverse_lazy("manage_subscriptions:subscription_list") +# success_message = constants.RECORD_DELETED +# error_message = constants.RECORD_NOT_FOUND - def get(self, request, pk): - try: - type_obj = self.model.objects.get(id=pk) - type_obj.deleted = True - type_obj.active = False - type_obj.save() - messages.success(request, self.success_message) - except self.model.DoesNotExist: - messages.success(request, self.error_message) +# def get(self, request, pk): +# try: +# type_obj = self.model.objects.get(id=pk) +# type_obj.deleted = True +# type_obj.active = False +# type_obj.save() +# messages.success(request, self.success_message) +# except self.model.DoesNotExist: +# messages.success(request, self.error_message) - return redirect(self.success_url) +# return redirect(self.success_url) -class PlanCreateOrUpdateView(LoginRequiredMixin, generic.View): - # Set the page_name and resource - page_name = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS - resource = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS +# class PlanCreateOrUpdateView(LoginRequiredMixin, generic.View): +# # Set the page_name and resource +# page_name = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS +# resource = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS - # Initialize the action as ACTION_CREATE (can change based on logic) - action = resource_action.ACTION_CREATE # Default action +# # Initialize the action as ACTION_CREATE (can change based on logic) +# action = resource_action.ACTION_CREATE # Default action - template_name = "manage_subscriptions/plan_add.html" - model = Plan - form_class = PlanForm - success_url = reverse_lazy("manage_subscriptions:plan_list") - error_message = "An error occurred while saving the data." +# template_name = "manage_subscriptions/plan_add.html" +# model = Plan +# form_class = PlanForm +# success_url = reverse_lazy("manage_subscriptions:plan_list") +# error_message = "An error occurred while saving the data." - # Determine the success message dynamically based on whether it's an update or create - def get_success_message(self): - self.success_message = ( - constants.RECORD_CREATED if not self.object else constants.RECORD_UPDATED - ) - return self.success_message +# # Determine the success message dynamically based on whether it's an update or create +# def get_success_message(self): +# self.success_message = ( +# constants.RECORD_CREATED if not self.object else constants.RECORD_UPDATED +# ) +# return self.success_message - # Get the object (if exists) based on URL parameter 'pk' - def get_object(self): - pk = self.kwargs.get("pk") - return get_object_or_404(self.model, pk=pk) if pk else None +# # Get the object (if exists) based on URL parameter 'pk' +# def get_object(self): +# pk = self.kwargs.get("pk") +# return get_object_or_404(self.model, pk=pk) if pk else None - # Add page_name and operation to the context - def get_context_data(self, **kwargs): - context = { - "page_name": self.page_name, - "operation": "Add" if not self.object else "Edit", - } - context.update(kwargs) # Include any additional context data passed to the view - return context +# # Add page_name and operation to the context +# def get_context_data(self, **kwargs): +# context = { +# "page_name": self.page_name, +# "operation": "Add" if not self.object else "Edit", +# } +# context.update(kwargs) # Include any additional context data passed to the view +# return context - def get(self, request, *args, **kwargs): - self.object = self.get_object() +# def get(self, request, *args, **kwargs): +# self.object = self.get_object() - # If an object is found, change action to ACTION_UPDATE - if self.object is not None: - self.action = resource_action.ACTION_UPDATE +# # If an object is found, change action to ACTION_UPDATE +# if self.object is not None: +# self.action = resource_action.ACTION_UPDATE - form = self.form_class(instance=self.object) - context = self.get_context_data(form=form) - return render(request, self.template_name, context=context) +# form = self.form_class(instance=self.object) +# context = self.get_context_data(form=form) +# return render(request, self.template_name, context=context) - def post(self, request, *args, **kwargs): - self.object = self.get_object() +# def post(self, request, *args, **kwargs): +# self.object = self.get_object() - # If an object is found, change action to ACTION_UPDATE - if self.object is not None: - self.action = resource_action.ACTION_UPDATE +# # If an object is found, change action to ACTION_UPDATE +# if self.object is not None: +# self.action = resource_action.ACTION_UPDATE - form = self.form_class(request.POST, instance=self.object) - if not form.is_valid(): - print(form.errors) - context = self.get_context_data(form=form) - return render(request, self.template_name, context=context) - form.save() - messages.success(self.request, self.get_success_message()) - return redirect(self.success_url) +# form = self.form_class(request.POST, instance=self.object) +# if not form.is_valid(): +# print(form.errors) +# context = self.get_context_data(form=form) +# return render(request, self.template_name, context=context) +# form.save() +# messages.success(self.request, self.get_success_message()) +# return redirect(self.success_url) class PlanView(LoginRequiredMixin, generic.ListView): @@ -217,26 +217,26 @@ class PlanView(LoginRequiredMixin, generic.ListView): return context -class PlanDeleteView(LoginRequiredMixin, generic.View): - page_name = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS - resource = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS - action = resource_action.ACTION_DELETE - model = Plan - success_url = reverse_lazy("manage_subscriptions:plan_list") - success_message = constants.RECORD_DELETED - error_message = constants.RECORD_NOT_FOUND +# class PlanDeleteView(LoginRequiredMixin, generic.View): +# page_name = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS +# resource = resource_action.RESOURCE_MANAGE_SUBSCRIPTIONS +# action = resource_action.ACTION_DELETE +# model = Plan +# success_url = reverse_lazy("manage_subscriptions:plan_list") +# success_message = constants.RECORD_DELETED +# error_message = constants.RECORD_NOT_FOUND - def get(self, request, pk): - try: - type_obj = self.model.objects.get(id=pk) - type_obj.deleted = True - type_obj.active = False - type_obj.save() - messages.success(request, self.success_message) - except self.model.DoesNotExist: - messages.success(request, self.error_message) +# def get(self, request, pk): +# try: +# type_obj = self.model.objects.get(id=pk) +# type_obj.deleted = True +# type_obj.active = False +# type_obj.save() +# messages.success(request, self.success_message) +# except self.model.DoesNotExist: +# messages.success(request, self.error_message) - return redirect(self.success_url) +# return redirect(self.success_url) class PrincipalSubscriptionCreateOrUpdateView(LoginRequiredMixin, generic.View): @@ -386,7 +386,6 @@ def stripe_config(request): @csrf_exempt def create_checkout_session(request): if request.method == "GET": - domain_url = "http://localhost:8000/" stripe.api_key = settings.STRIPE_SECRET_KEY subscription_id = None # Assuming 3 is a default or fallback subscription ID @@ -485,36 +484,36 @@ class CancelView(TemplateView): template_name = "stripe_html/cancel.html" -class IndexView(TemplateView): - template_name = "stripe_html/index.html" +# class IndexView(TemplateView): +# template_name = "stripe_html/index.html" - def get(self, request, *args, **kwargs): - # Example of extracting the token from a query parameter or cookie - token = request.GET.get("token") - # token = request.GET.get("token") or request.COOKIES.get("jwt") - print("token: ", token) - if token: - try: - # Decode and validate token - payload = jwt.decode(token, settings.SECRET_KEY, algorithms=["HS256"]) - print("payload: ", payload) - try: - UserModel = get_user_model() - user = UserModel.objects.get(id=payload["user_id"]) - # Manually specify the authentication backend - user.backend = "django.contrib.auth.backends.ModelBackend" - # Log the user in - login(request, user) - print("Logged in user: ", user) +# def get(self, request, *args, **kwargs): +# # Example of extracting the token from a query parameter or cookie +# token = request.GET.get("token") +# # token = request.GET.get("token") or request.COOKIES.get("jwt") +# print("token: ", token) +# if token: +# try: +# # Decode and validate token +# payload = jwt.decode(token, settings.SECRET_KEY, algorithms=["HS256"]) +# print("payload: ", payload) +# try: +# UserModel = get_user_model() +# user = UserModel.objects.get(id=payload["user_id"]) +# # Manually specify the authentication backend +# user.backend = "django.contrib.auth.backends.ModelBackend" +# # Log the user in +# login(request, user) +# print("Logged in user: ", user) - except IAmPrincipal.DoesNotExist: - # Handle expired token - return HttpResponseBadRequest("No Principal Found") +# except IAmPrincipal.DoesNotExist: +# # Handle expired token +# return HttpResponseBadRequest("No Principal Found") - except jwt.ExpiredSignatureError: - # Handle expired token - return HttpResponseBadRequest("Expired Signature Error") - except jwt.InvalidTokenError: - return HttpResponseBadRequest("Invalid Token Error") +# except jwt.ExpiredSignatureError: +# # Handle expired token +# return HttpResponseBadRequest("Expired Signature Error") +# except jwt.InvalidTokenError: +# return HttpResponseBadRequest("Invalid Token Error") - return super().get(request, *args, **kwargs) +# return super().get(request, *args, **kwargs) diff --git a/templates/accounts/customer/customer_list.html b/templates/accounts/customer/customer_list.html index 52cf9f9..613db19 100644 --- a/templates/accounts/customer/customer_list.html +++ b/templates/accounts/customer/customer_list.html @@ -62,8 +62,8 @@ style="width: 98.875px;">Modified On Active - Delete + Action @@ -91,11 +91,11 @@ {{ data_obj.is_active }} - + diff --git a/templates/elements/sidebar.html b/templates/elements/sidebar.html index 7f5b227..2f51cbd 100644 --- a/templates/elements/sidebar.html +++ b/templates/elements/sidebar.html @@ -46,7 +46,7 @@ - - + --> + + --> -
  • {{operation}} {{page_title}}

    +
  • -
  • -
  • + --> diff --git a/templates/manage_events/event_list.html b/templates/manage_events/event_list.html index 7ee2810..d7dcae2 100644 --- a/templates/manage_events/event_list.html +++ b/templates/manage_events/event_list.html @@ -23,7 +23,7 @@ --> Add Event Event Category - Event Master + diff --git a/templates/manage_subscriptions/commission.html b/templates/manage_subscriptions/commission.html deleted file mode 100644 index 85e8c53..0000000 --- a/templates/manage_subscriptions/commission.html +++ /dev/null @@ -1,135 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - {% include "cdn_through_html/datatable_cdn_css.html" %} - -{% endblock %} - -{% block content %} - -
    -
    -
    -
    -

    Manage Games

    -
    -
    - - {% comment %} Example form {% endcomment %} - Add Commission -
    -
    - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - -{% endblock content %} - -{% block javascript %} - - {% include "cdn_through_html/datatable_cdn_js.html" %} - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/commission_add.html b/templates/manage_subscriptions/commission_add.html deleted file mode 100644 index 3923f18..0000000 --- a/templates/manage_subscriptions/commission_add.html +++ /dev/null @@ -1,135 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - - {% include "cdn_through_html/filepond_cdn_css.html" %} - {% include "cdn_through_html/quill_cdn_css.html" %} - {% include "cdn_through_html/tagify_cdn_css.html" %} - {{form.media}} - -{% endblock %} - -{% block content %} - -
    -
    -
    -
    -

    Add Commission Percentage

    -
    -
    - -
    -
    -
    -
    -
    -
    - - - {% csrf_token %} - {% include 'includes/dynamic_template_form.html' with form=form %} -
    -
    -
    - {% comment %}
    - - -
    We'll never share your email with anyone else.
    -
    -
    - -
    -
    -
    - -
    -
      -
      -
      -
      - - -
      - {% endcomment %} - - -
      -
      -
      -
      -
      -
      - - -{% endblock content %} - -{% block javascript %} - - - {% include "cdn_through_html/filepond_cdn_js.html" %} - {% include "cdn_through_html/quill_cdn_js.html" %} - {% include "cdn_through_html/tagify_cdn_js.html" %} - - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/distribution_type_list.html b/templates/manage_subscriptions/distribution_type_list.html deleted file mode 100644 index 91d359b..0000000 --- a/templates/manage_subscriptions/distribution_type_list.html +++ /dev/null @@ -1,144 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - {% include "cdn_through_html/datatable_cdn_css.html" %} - -{% endblock %} - -{% block content %} - -
      -
      -
      -
      -

      Manage Games

      -
      -
      - - {% comment %} Example form {% endcomment %} - {% comment %} Add Commission {% endcomment %} -
      -
      - - -
      -
      -
      -
      - -
      -
      -
      -
      -
      -
      - -{% endblock content %} - -{% block javascript %} - - {% include "cdn_through_html/datatable_cdn_js.html" %} - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/entryfee.html b/templates/manage_subscriptions/entryfee.html deleted file mode 100644 index af34d94..0000000 --- a/templates/manage_subscriptions/entryfee.html +++ /dev/null @@ -1,132 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - {% include "cdn_through_html/datatable_cdn_css.html" %} - -{% endblock %} - -{% block content %} - -
      -
      -
      -
      -

      Manage Games

      -
      -
      - - {% comment %} Example form {% endcomment %} - Add Entry Fee -
      -
      - - -
      -
      -
      -
      - -
      -
      -
      -
      -
      -
      - -{% endblock content %} - -{% block javascript %} - - {% include "cdn_through_html/datatable_cdn_js.html" %} - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/game_details.html b/templates/manage_subscriptions/game_details.html deleted file mode 100644 index dad1a0f..0000000 --- a/templates/manage_subscriptions/game_details.html +++ /dev/null @@ -1,393 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - {% include "cdn_through_html/datatable_cdn_css.html" %} - {% include "cdn_through_html/tabs_cdn_css.html" %} - -{% endblock %} - -{% block content %} - -
      -
      -
      -
      -

      Manage News & Article

      -
      - -
      - -
      -
      -
      -
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      -
      -
      -
      -
      -
      - - -{% endblock content %} - -{% block javascript %} - - {% include "cdn_through_html/datatable_cdn_js.html" %} - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/game_entryfee_add.html b/templates/manage_subscriptions/game_entryfee_add.html deleted file mode 100644 index 1625f87..0000000 --- a/templates/manage_subscriptions/game_entryfee_add.html +++ /dev/null @@ -1,143 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - - {% include "cdn_through_html/filepond_cdn_css.html" %} - {% include "cdn_through_html/quill_cdn_css.html" %} - {% include "cdn_through_html/tagify_cdn_css.html" %} - {% include "cdn_through_html/flatpicker_cdn_css.html" %} - {{form.media}} - -{% endblock %} - -{% block content %} - -
      -
      -
      -
      -

      Add Game Entry Fee

      -
      -
      - -
      -
      -
      -
      -
      -
      - -
      - {% csrf_token %} - {% include 'includes/dynamic_template_form.html' with form=form %} -
      -
      -
      - {% comment %}
      - - -
      We'll never share your email with anyone else.
      -
      -
      - -
      -
      -
      - -
      -
        -
        -
        -
        - - -
        - {% endcomment %} -
        - -
        -
        -
        -
        -
        -
        - - -{% endblock content %} - -{% block javascript %} - - - {% include "cdn_through_html/filepond_cdn_js.html" %} - {% include "cdn_through_html/quill_cdn_js.html" %} - {% include "cdn_through_html/tagify_cdn_js.html" %} - {% include "cdn_through_html/flatpicker_cdn_js.html" %} - - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/game_teams_list.html b/templates/manage_subscriptions/game_teams_list.html deleted file mode 100644 index be66b28..0000000 --- a/templates/manage_subscriptions/game_teams_list.html +++ /dev/null @@ -1,153 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - {% include "cdn_through_html/datatable_cdn_css.html" %} - -{% endblock %} - -{% block content %} - -
        -
        -
        -
        -

        {{teams_obj.0.game.title}}

        -
        -
        - - {% comment %} Example form {% endcomment %} - {% comment %} Add Commission {% endcomment %} -
        -
        - - -
        -
        -
        -
        - -
        -
        -
        -
        -
        -
        - -{% endblock content %} - -{% block javascript %} - - {% include "cdn_through_html/datatable_cdn_js.html" %} - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/games_add.html b/templates/manage_subscriptions/games_add.html deleted file mode 100644 index 2f8a46b..0000000 --- a/templates/manage_subscriptions/games_add.html +++ /dev/null @@ -1,135 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - - {% include "cdn_through_html/filepond_cdn_css.html" %} - {% include "cdn_through_html/quill_cdn_css.html" %} - {% include "cdn_through_html/tagify_cdn_css.html" %} - {{form.media}} - -{% endblock %} - -{% block content %} - -
        -
        -
        -
        -

        Add Game

        -
        -
        - -
        -
        -
        -
        -
        -
        - -
        - {% csrf_token %} - {% include 'includes/dynamic_template_form.html' with form=form %} -
        -
        -
        - {% comment %}
        - - -
        We'll never share your email with anyone else.
        -
        -
        - -
        -
        -
        - -
        -
          -
          -
          -
          - - -
          - {% endcomment %} -
          - -
          -
          -
          -
          -
          -
          - - -{% endblock content %} - -{% block javascript %} - - - {% include "cdn_through_html/filepond_cdn_js.html" %} - {% include "cdn_through_html/quill_cdn_js.html" %} - {% include "cdn_through_html/tagify_cdn_js.html" %} - - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/merchant_contest_add.html b/templates/manage_subscriptions/merchant_contest_add.html deleted file mode 100644 index a7451aa..0000000 --- a/templates/manage_subscriptions/merchant_contest_add.html +++ /dev/null @@ -1,221 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - - {% include "cdn_through_html/filepond_cdn_css.html" %} - {% include "cdn_through_html/quill_cdn_css.html" %} - {% include "cdn_through_html/tagify_cdn_css.html" %} - {% include "cdn_through_html/flatpicker_cdn_css.html" %} - {{form.media}} - -{% endblock %} - -{% block content %} - -
          -
          -
          -
          -

          {{operation}} {{page_title}}

          -
          -
          - -
          -
          -
          -
          -
          -
          -
          - {% csrf_token %} - {% include 'includes/dynamic_template_form.html' with form=form %} -
          - Contest Prizes -
          - {% if contest_prize %} - {% for prize_form in contest_prize %} -
          -
          - -
          -
          - -
          -
          - - -
          -
          - {% endfor %} - {% else %} -
          -
          - -
          -
          - -
          -
          - - -
          -
          - {% endif %} -
          - -
          - -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          - - -{% endblock content %} - -{% block javascript %} - - - {% include "cdn_through_html/filepond_cdn_js.html" %} - {% include "cdn_through_html/quill_cdn_js.html" %} - {% include "cdn_through_html/tagify_cdn_js.html" %} - {% include "cdn_through_html/flatpicker_cdn_js.html" %} - - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/merchant_contest_list.html b/templates/manage_subscriptions/merchant_contest_list.html deleted file mode 100644 index 5514b07..0000000 --- a/templates/manage_subscriptions/merchant_contest_list.html +++ /dev/null @@ -1,309 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - - {% include "cdn_through_html/datatable_cdn_css.html" %} - {% include "cdn_through_html/animate_cdn_css.html" %} - {% include "cdn_through_html/modal_cdn_css.html" %} - -{% endblock %} - -{% block content %} - -
          -
          -
          -
          -

          Merchant Contest

          -
          -
          - {% comment %} {% endcomment %} - Add Contest -
          -
          -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          - - - - - - -{% endblock content %} - -{% block javascript %} - - - {% include "cdn_through_html/datatable_cdn_js.html" %} - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/plan_list.html b/templates/manage_subscriptions/plan_list.html index bd7feb2..49eb06f 100644 --- a/templates/manage_subscriptions/plan_list.html +++ b/templates/manage_subscriptions/plan_list.html @@ -21,7 +21,7 @@ Back --> - Add Plans + Subscriptions @@ -48,9 +48,9 @@ style="width: 69.2656px;"> Days Active - Action + style="width: 100.625px;">Action --> @@ -62,35 +62,7 @@ {{data_obj.active}} - - - + {% endfor %} diff --git a/templates/manage_subscriptions/prev_live_upc.html b/templates/manage_subscriptions/prev_live_upc.html deleted file mode 100644 index 24e9345..0000000 --- a/templates/manage_subscriptions/prev_live_upc.html +++ /dev/null @@ -1,455 +0,0 @@ -{% extends 'layout/base_template.html' %} -{% load static %} -{% block stylesheet %} - - {% include "cdn_through_html/datatable_cdn_css.html" %} - {% include "cdn_through_html/tabs_cdn_css.html" %} - -{% endblock %} - -{% block content %} - -
          -
          -
          -
          -

          Manage Games

          -
          -
          - - {% comment %} Example form {% endcomment %} - Add Game - Entry Fee - Commission -
          -
          - -
          -
          -
          -
          -
          - -
          -
          - -
          -
          - -
          -
          - -
          -
          - -
          -
          -
          -
          -
          -
          -
          - - -{% endblock content %} - -{% block javascript %} - - {% include "cdn_through_html/datatable_cdn_js.html" %} - - -{% endblock %} \ No newline at end of file diff --git a/templates/manage_subscriptions/principal_subscriptions_list.html b/templates/manage_subscriptions/principal_subscriptions_list.html index fd18d7e..0199181 100644 --- a/templates/manage_subscriptions/principal_subscriptions_list.html +++ b/templates/manage_subscriptions/principal_subscriptions_list.html @@ -12,7 +12,7 @@
          -

          Manage Subscriptions

          +

          Principal Subscriptions

          @@ -74,7 +73,7 @@ {{data_obj.id}} {{data_obj.subscription}} - {{data_obj.prinpal}} + {{data_obj.principal}} {{data_obj.is_paid}} {{data_obj.status}} {{data_obj.start_date}} @@ -97,7 +96,7 @@ d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"> -
        • -
        • + --> diff --git a/templates/manage_subscriptions/subscription_list.html b/templates/manage_subscriptions/subscription_list.html index f41bb49..5c6a9cb 100644 --- a/templates/manage_subscriptions/subscription_list.html +++ b/templates/manage_subscriptions/subscription_list.html @@ -21,7 +21,7 @@ Back --> - Add Subscriptions + Plans Principal Subscription
          @@ -81,19 +81,7 @@ d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"> -
        • - - - -
        • + diff --git a/templates/manage_venues/venue_add.html b/templates/manage_venues/venue_add.html new file mode 100644 index 0000000..7af23b8 --- /dev/null +++ b/templates/manage_venues/venue_add.html @@ -0,0 +1,122 @@ +{% extends 'layout/base_template.html' %} +{% load static %} +{% block stylesheet %} + + +{% include "cdn_through_html/filepond_cdn_css.html" %} +{% include "cdn_through_html/quill_cdn_css.html" %} +{% include "cdn_through_html/tagify_cdn_css.html" %} +{{form.media}} + +{% endblock %} + +{% block content %} + +
          +
          +
          +
          +

          {{operation}} {{page_title}}

          +
          + +
          + +
          +
          +
          +
          +
          +
          + +
          + {% csrf_token %} + {% include 'includes/dynamic_template_form.html' with form=form %} +
          +
          +
          +
          + +
          +
          +
          +
          +
          +
          + + +{% endblock content %} + +{% block javascript %} + + + + + + + +{% include "cdn_through_html/filepond_cdn_js.html" %} +{% include "cdn_through_html/quill_cdn_js.html" %} +{% include "cdn_through_html/tagify_cdn_js.html" %} + + + +{% endblock %} \ No newline at end of file diff --git a/templates/manage_venues/venue_list.html b/templates/manage_venues/venue_list.html new file mode 100644 index 0000000..1da78a0 --- /dev/null +++ b/templates/manage_venues/venue_list.html @@ -0,0 +1,139 @@ +{% extends 'layout/base_template.html' %} +{% load static %} +{% block stylesheet %} + + {% include "cdn_through_html/datatable_cdn_css.html" %} + +{% endblock %} + +{% block content %} + +
          +
          +
          +
          +

          Manage Venues

          +
          +
          + + Add Venue + +
          +
          + + +
          +
          +
          +
          + +
          +
          +
          +
          +
          +
          + + {% endblock content %} + + {% block javascript %} + + {% include "cdn_through_html/datatable_cdn_js.html" %} + + + {% endblock %} \ No newline at end of file diff --git a/templates/stripe_html/index.html b/templates/stripe_html/index.html index eebf833..af9acfb 100644 --- a/templates/stripe_html/index.html +++ b/templates/stripe_html/index.html @@ -251,16 +251,15 @@
          This is the second item's accordion body. It is hidden by default, - until the collapse plugin adds the - appropriate classes that we use to style - each element. These classes control the - overall appearance, as well as the showing - and hiding via CSS transitions. You can - modify any of this with custom CSS or - overriding our default variables. It's also - worth noting that just about any HTML can go - within the .accordion-body, - though the transition does limit overflow. + until the collapse plugin adds the + appropriate classes that we use to style + each element. These classes control the + overall appearance, as well as the showing + and hiding via CSS transitions. You can + modify any of this with custom CSS or + overriding our default variables. It's also + worth noting that just about any HTML can go + within the transition does limit overflow.
          @@ -276,16 +275,15 @@
          This is the third item's accordion body. It is hidden by default, - until the collapse plugin adds the - appropriate classes that we use to style - each element. These classes control the - overall appearance, as well as the showing - and hiding via CSS transitions. You can - modify any of this with custom CSS or - overriding our default variables. It's also - worth noting that just about any HTML can go - within the .accordion-body, - though the transition does limit overflow. + until the collapse plugin adds the + appropriate classes that we use to style + each element. These classes control the + overall appearance, as well as the showing + and hiding via CSS transitions. You can + modify any of this with custom CSS or + overriding our default variables. It's also + worth noting that just about any HTML can go + within the transition does limit overflow.
          @@ -301,16 +299,15 @@
          This is the third item's accordion body. It is hidden by default, - until the collapse plugin adds the - appropriate classes that we use to style - each element. These classes control the - overall appearance, as well as the showing - and hiding via CSS transitions. You can - modify any of this with custom CSS or - overriding our default variables. It's also - worth noting that just about any HTML can go - within the .accordion-body, - though the transition does limit overflow. + until the collapse plugin adds the + appropriate classes that we use to style + each element. These classes control the + overall appearance, as well as the showing + and hiding via CSS transitions. You can + modify any of this with custom CSS or + overriding our default variables. It's also + worth noting that just about any HTML can go + within the transition does limit overflow.
          @@ -333,8 +330,7 @@ modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go - within the .accordion-body, - though the transition does limit overflow. + within the transition does limit overflow.