+class Tag(models.Model):
+ tag_name = models.CharField(max_length=100, db_index=True,core=True,blank=False,null=False)
+ TAG_CONTEXT = (
+ #('Antibody','Antibody'),
+ #('Cellline', 'Cellline'),
+ #('Condition', 'Condition'),
+ ('Library', 'Library'),
+ ('ANY','ANY'),
+ )
+ context = models.CharField(max_length=50, choices=TAG_CONTEXT, default='Library')
+
+ def __str__(self):
+ return '%s' % (self.tag_name)
+
+ class Meta:
+ ordering = ["context","tag_name"]
+
+ class Admin:
+ list_display = ('tag_name','context')
+ fields = (
+ (None, {
+ 'fields': ('tag_name','context')
+ }),
+ )
+