implement credit card listing

This commit is contained in:
Nico Schottelius 2020-12-28 23:35:34 +01:00
commit e225bf1cc0
12 changed files with 183 additions and 63 deletions

View file

@ -6,7 +6,7 @@ from django.contrib.auth import get_user_model
from django.core.validators import MinValueValidator, MaxValueValidator
from django.core.exceptions import FieldError, ValidationError
from uncloud_pay.models import Order
from uncloud_pay.models import Order, Product
class WireGuardVPNPool(models.Model):
"""
@ -123,6 +123,19 @@ class WireGuardVPN(models.Model):
def __str__(self):
return f"{self.address} ({self.pool_index})"
def create_product(self):
"""
Ensure we have a product for the WireguardVPN
"""
pass
# Product.objects.get_or_create(
# name="WireGuardVPN",
# description="Wireguard VPN",
# currency=Currency.CHF,
# config=
class WireGuardVPNFreeLeases(models.Model):
"""