bornhack-website/src/camps/utils.py

10 lines
213 B
Python
Raw Normal View History

from camps.models import Camp
from django.utils import timezone
def get_current_camp():
try:
return Camp.objects.get(camp__contains=timezone.now())
except Camp.DoesNotExist:
return False