Commits

housepage  committed 115f815

Changed some of the abbreviation. Addressed a bug in the clean function of BitwiseWeekdayField

  • Participants
  • Parent commits 6416f13

Comments (0)

Files changed (3)

 
 setup(
     name = "django-weekday-field",
-    version = "0.1.2",
+    version = "0.1.3",
     description = "Weekday field for django models",
     url = "http://bitbucket.org/schinckel/django-weekday-field/",
     author = "Matthew Schinckel and Andrew Gall",

File weekday_field/forms.py

 
   def clean(self,value):
     value = [int(x) for x in value]
-    value = reduce(operator.or_, value)
+    if len(value) != 0:
+      value = reduce(operator.or_, value)
+    else:
+      value = 0
     return value

File weekday_field/utils.py

 )
 
 BITWISE_DAY_CHOICES = (
-    (1, "Sun","Sunday"),
-    (2, "Mon","Monday"),
-    (4, "Tue","Tuesday"),
-    (8, "Wed","Wednesday"),
-    (16, "Thu","Thursday"),
-    (32, "Fri","Friday"),
-    (64, "Sat","Saturday"),
+    (1, "S","Sunday"),
+    (2, "M","Monday"),
+    (4, "T","Tuesday"),
+    (8, "W","Wednesday"),
+    (16, "Th","Thursday"),
+    (32, "F","Friday"),
+    (64, "Sa","Saturday"),
 )