mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-11 13:16:09 +00:00
Create the customer when subscribing if it does not exists yet
This commit is contained in:
1 parent
97ff4341a7
commit
7a267dbc3f
2 files changed
+10
-6
No files matched your search
@@ -5,6 +5,7 @@ from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
from datetime import timedelta
|
||||
from random import randrange
|
||||
|
||||
from club.models import Club
|
||||
from accounting.models import CurrencyField
|
||||
@@ -27,6 +28,9 @@ class Customer(models.Model):
|
||||
def __str__(self):
|
||||
return self.user.username
|
||||
|
||||
def generate_account_id():
|
||||
return randrange(0, 4000) # TODO: improve me!
|
||||
|
||||
class ProductType(models.Model):
|
||||
"""
|
||||
This describes a product type
|
||||
|
||||
Reference in new issue
Block a user