add slicename prop
authorTony Mack <tmack@tux.cs.princeton.edu>
Mon, 11 Aug 2014 15:14:58 +0000 (11:14 -0400)
committerTony Mack <tmack@tux.cs.princeton.edu>
Mon, 11 Aug 2014 15:14:58 +0000 (11:14 -0400)
planetstack/core/models/slice.py

index bd41f87..50b10c5 100644 (file)
@@ -32,6 +32,10 @@ class Slice(PlCoreBase):
 
     def __unicode__(self):  return u'%s' % (self.name)
 
+    @property
+    def slicename(self):
+        return "%s_%s" % (self.site.login_base, self.name)
+
     def save(self, *args, **kwds):
         if self.serviceClass is None:
             # We allowed None=True for serviceClass because Django evolution