- Added PricingPlan Model
- Implement a complete cycle for buying a Matrix Chat Host - Refactor the Payement cycle and stripe related methods
This commit is contained in:
parent
e205d8d07c
commit
b7aa1c6971
81 changed files with 5079 additions and 810 deletions
10
matrixhosting/signals.py
Normal file
10
matrixhosting/signals.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from matrixhosting.models import VMInstance
|
||||
from uncloud_pay.models import Order
|
||||
from django.db.models.signals import post_save
|
||||
from django.dispatch import receiver
|
||||
|
||||
@receiver(post_save, sender=Order)
|
||||
def create_instance(sender, instance, created, **kwargs):
|
||||
machine = VMInstance.objects.filter(order=instance).first()
|
||||
if not machine:
|
||||
VMInstance.objects.create(owner=instance.owner, order=instance, config=instance.config)
|
||||
Loading…
Add table
Add a link
Reference in a new issue