Commits

Anonymous committed 0d38aa8

cleanup

Comments (0)

Files changed (1)

portlets/models.py

             return etree.fromstring(value)
 
 
-def generate_session_name():
-    return ''.join(choice(letters) for i in xrange(6))
-
-def generate_session_element():
-    return '<portlet-session />'
-
 class PortletSession(models.Model):
     """ Base portlet session. All portlet sessions should inherit from this class
         and define attributes 'portlet' and 'user'.
     # in a manner they like.
     creation_time = models.DateField(auto_now_add=True)
     name = models.CharField(unique=True, blank=False, max_length=6,
-        default=generate_session_name()
+        default = ''.join(choice(letters) for i in xrange(6))
         )
     _Element = ElementField(max_length=512,
         blank=False,
-        default=generate_session_element()
+        default = '<portlet-session />'
         )
 
     class Meta: