]> git.parisson.com Git - django-jqchat.git/commitdiff
update display time setting
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 19 Dec 2013 11:07:55 +0000 (12:07 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 19 Dec 2013 11:07:55 +0000 (12:07 +0100)
jqchat/views.py

index f2e5037f35fd31f1d50d3e9a6612c4e7f5ac390f..f02dcee10944026e03607bbadde337381d3d52dc 100644 (file)
@@ -16,16 +16,12 @@ except AttributeError:
     # Use default format.
     DATE_FORMAT = "D-H:i:s"
 
-# Time in hours over which the messages will not be displayed
-try:
-    JQCHAT_DISPLAY_TIME = settings.JQCHAT_DISPLAY_TIME
-except AttributeError:
-    JQCHAT_DISPLAY_TIME = 0
-
-
 # How many messages to retrieve at most.
 JQCHAT_DISPLAY_COUNT = getattr(settings, 'JQCHAT_DISPLAY_COUNT', 100)
 
+# Time in hours over which the messages will not be displayed
+JQCHAT_DISPLAY_TIME = getattr(settings, 'JQCHAT_DISPLAY_TIME', 0)
+
 #------------------------------------------------------------------------------
 @login_required
 def window(request, id):