diff options
Diffstat (limited to 'src/analytics/models.py')
-rw-r--r-- | src/analytics/models.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/analytics/models.py b/src/analytics/models.py index 10baa0c..043bad6 100644 --- a/src/analytics/models.py +++ b/src/analytics/models.py @@ -6,25 +6,3 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## - -from django.db import models -from account.models import Lab - - -class ActiveVPNUser(models.Model): - """ Keeps track of how many VPN Users are connected to Lab """ - time_stamp = models.DateTimeField(auto_now_add=True) - lab = models.ForeignKey(Lab, on_delete=models.CASCADE, null=False) - active_users = models.IntegerField() - - @classmethod - def create(cls, lab_name, active_users): - """ - This creates an Active VPN Users entry from - from lab_name as a string - """ - - lab = Lab.objects.get(name=lab_name) - avu = cls(lab=lab, active_users=active_users) - avu.save() - return avu |