done
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.utils import timezone
|
||||
|
||||
from Main.models.set import Set
|
||||
from Main.models.group import Group
|
||||
from Main.models.settask import SetTask
|
||||
from Main.models.subscription import Subscription
|
||||
@@ -55,6 +55,10 @@ class UserInfo(models.Model):
|
||||
self._append_task(task, tasks)
|
||||
return sorted(tasks, key=lambda x: x.time_estimation)
|
||||
|
||||
@property
|
||||
def available_sets(self):
|
||||
return Set.objects.all()
|
||||
|
||||
@property
|
||||
def place(self):
|
||||
return len(UserInfo.objects.filter(rating__gt=self.rating)) + 1
|
||||
|
Reference in New Issue
Block a user