initialise logger inside class so __name__ tells us where we are

This commit is contained in:
Thomas Steen Rasmussen 2017-03-28 09:17:29 +02:00
parent 70b6a51c5c
commit 3bed6c25b8
1 changed files with 1 additions and 0 deletions

View File

@ -10,6 +10,7 @@ logger = logging.getLogger("bornhack.%s" % __name__)
class CampRedirectView(CampViewMixin, View):
logger = logging.getLogger("bornhack.%s" % __name__)
def dispatch(self, request, *args, **kwargs):
# find the closest camp in the past
prevcamp = Camp.objects.filter(camp__endswith__lt=timezone.now()).order_by('-camp')[0]