Finished the Players content block on the default main page. Yay. http://sandbox.evennia.com is the front page for the test site. None of the links work yet, just working on the front page.
This commit is contained in:
parent
6b8c3f137c
commit
72ebe9cc7b
3 changed files with 12 additions and 1 deletions
|
|
@ -28,6 +28,16 @@ def num_connected_players():
|
|||
"""
|
||||
return get_connected_players().count()
|
||||
|
||||
def num_recently_created_players(days=7):
|
||||
"""
|
||||
Returns a QuerySet containing the player User accounts that have been
|
||||
connected within the last <days> days.
|
||||
"""
|
||||
end_date = datetime.now()
|
||||
tdelta = timedelta(days)
|
||||
start_date = end_date - tdelta
|
||||
return User.objects.filter(date_joined__range=(start_date, end_date)).count()
|
||||
|
||||
def num_recently_connected_players(days=7):
|
||||
"""
|
||||
Returns a QuerySet containing the player User accounts that have been
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue