Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRogelio Mita <rogeliomita@activitycentral.com>2013-09-04 20:05:09 (GMT)
committer Rogelio Mita <rogeliomita@activitycentral.com>2013-09-04 20:05:09 (GMT)
commitbfa657d4c07f44d368c63ce86118f1f8359641c7 (patch)
tree1efc2c224f0b4d4cbdcc782081f2b25fa42ba445
parent6b98488a23caa7b4ca9d7484dedf0f2b6673292a (diff)
change get_time_string to staticmethod
-rw-r--r--webapp/polls/views.py2
-rw-r--r--webapp/webapp/test_settings.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/webapp/polls/views.py b/webapp/polls/views.py
index d3b0fb4..bcb11b3 100644
--- a/webapp/polls/views.py
+++ b/webapp/polls/views.py
@@ -420,7 +420,7 @@ class UnploadPollResultFormView(TemplateView):
else:
# End validations
- date_time_string = Clock().get_time_string()
+ date_time_string = Clock.get_time_string()
uploaded_files = [
(f.name, f.temporary_file_path()) for f in files
]
diff --git a/webapp/webapp/test_settings.py b/webapp/webapp/test_settings.py
index f4aa21f..5e8b856 100644
--- a/webapp/webapp/test_settings.py
+++ b/webapp/webapp/test_settings.py
@@ -33,7 +33,8 @@ RESULT_BCK_ROOT = '/tmp'
class MockClock(object):
- def get_time_string(self):
+ @staticmethod
+ def get_time_string():
return "31/12/1999 23:59hs"