Support for FQDN host names.
authorRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Fri, 26 Sep 2014 14:31:26 +0000 (16:31 +0200)
committerRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Fri, 26 Sep 2014 14:31:26 +0000 (16:31 +0200)
apps/quiz/models.py

index 8916ce9..0690f12 100644 (file)
@@ -20,7 +20,7 @@ class Quiz(Site):
 
     @classmethod
     def current(cls, request):
-        return cls.objects.get(domain=request.get_host())
+        return cls.objects.get(domain=request.get_host().rstrip('.'))
 
     def start(self):
         return self.question_set.all()[0]