Added status field to a booked VM. Added the capability to change a booked VM status from the admin panel. Send email to user after his VM is approved
This commit is contained in:
parent
5da39e8ed3
commit
c33c4f4148
14 changed files with 177 additions and 15 deletions
|
|
@ -2,7 +2,7 @@ from datetime import datetime
|
|||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.contrib.auth.models import User, AbstractBaseUser, BaseUserManager, AbstractUser
|
||||
from django.contrib.auth.models import User, AbstractBaseUser, BaseUserManager, AbstractUser, PermissionsMixin
|
||||
from django.contrib.auth.hashers import make_password
|
||||
from django.core.validators import RegexValidator
|
||||
from django.contrib.auth.models import User
|
||||
|
|
@ -47,7 +47,7 @@ class MyUserManager(BaseUserManager):
|
|||
return user
|
||||
|
||||
|
||||
class CustomUser(AbstractBaseUser):
|
||||
class CustomUser(AbstractBaseUser, PermissionsMixin):
|
||||
VALIDATED_CHOICES = ((0, 'Not validated'), (1, 'Validated'))
|
||||
site = models.ForeignKey(Site, default=1)
|
||||
name = models.CharField(max_length=50)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue