diff options
Diffstat (limited to 'pyblackbird_cc')
-rw-r--r-- | pyblackbird_cc/payments/views.py | 9 | ||||
-rw-r--r-- | pyblackbird_cc/resources/views.py | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/pyblackbird_cc/payments/views.py b/pyblackbird_cc/payments/views.py index 2e53af8..d02a2ab 100644 --- a/pyblackbird_cc/payments/views.py +++ b/pyblackbird_cc/payments/views.py @@ -2,12 +2,17 @@ import stripe from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 -from django.shortcuts import render, redirect +from django.shortcuts import redirect +from django.shortcuts import render from django.views import View from django.views.generic import TemplateView from pyblackbird_cc.resources.models import Resource -from .models import ShoppingCart, CartItem, Price, Product + +from .models import CartItem +from .models import Price +from .models import Product +from .models import ShoppingCart stripe.api_key = settings.STRIPE_SECRET_KEY diff --git a/pyblackbird_cc/resources/views.py b/pyblackbird_cc/resources/views.py index c23efa9..ca7ce73 100644 --- a/pyblackbird_cc/resources/views.py +++ b/pyblackbird_cc/resources/views.py @@ -3,6 +3,7 @@ import os import tempfile from collections.abc import Generator from dataclasses import dataclass +from typing import Optional from django.conf import settings from django.contrib import messages @@ -45,10 +46,10 @@ class ResourceInfo: subcategories: str | None age_range: str | None pdf_filenames: list[str] - pdf_urls: list[str] + pdf_urls: list[Optional[str]] snapshot_urls: dict[str, list[str]] thumbnail_filenames: list[str] - thumbnail_urls: list[str] + thumbnail_urls: list[Optional[str]] feature_slot: int created: str updated: str |