Added 'lanes_for' which will show recent flowcell lanes ordered by date,
[htsworkflow.git] / htsworkflow / frontend / experiments / models.py
index 7fdf3f1e97a96d26522cc66b23e43cdf3a716136..9329add350cf36dc14887dc68dd44981bcd8231d 100755 (executable)
@@ -79,7 +79,16 @@ class FlowCell(models.Model):
     # that's the django way... except it didn't work
     #return urlresolvers.reverse('admin_experiments_FlowCell_change', args=(self.id,))
     return '/admin/experiments/flowcell/%s/' % (self.id,)
-  
+
+  def flowcell_type(self):
+    """
+    Convert our boolean 'is paired' flag to a name
+    """
+    if self.paired_end:
+      return u"Paired"
+    else:
+      return u"Single"
+    
 ### -----------------------
 class DataRun(models.Model):
   ConfTemplate = "CONFIG PARAMS WILL BE GENERATED BY THE PIPELINE SCRIPT.\nYOU'LL BE ABLE TO EDIT AFTER IF NEEDED."