This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using cluster file `/etc/foundationdb/fdb.cluster'. | |
The database is unavailable; type `status' for more information. | |
Welcome to the fdbcli. For help, type `help'. | |
fdb> status json | |
{ | |
"client" : { | |
"cluster_file" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
from django.db import models | |
class EventQuerySet(models.QuerySet): | |
def current(self): | |
one_day_events = models.Q(date=date.today(), date_end=None) | |
several_day_events = models.Q(date__lte=date.today(), date_end__gte=date.today()) | |
return self.filter(one_day_events | several_day_events) |