Commits

Ian George committed b442af5

added unicodes so admin looks sweet

Comments (0)

Files changed (2)

statemachine/fields.py

         defaults.update(kwargs)
         super(FSM_StateField, self).__init__(self, **defaults)
 
+    def __unicode__(self):
+        return self.name
+
     def setup(self, state_name):
         if not self._machine:
             self._machine = deepcopy(self.__base_machine)

statemachine/fsm.py

         self.entry_action = entry_action
         self.exit_action = exit_action
 
+    def __unicode__(self):
+        return self.name
+
 
     def exit(self, target_state, *args, **kwargs):
         """ 
         self.dbg = None
         self.verify_on_execute = verify_on_execute
 
+    def __unicode__(self):
+        return self.__state
+
     def getstate(self):
         return self.__state