Add a way to browse the list of entered antibody/antigene
[htsworkflow.git] / htsworkflow / frontend / samples / views.py
index 95270d8c99493d23f8c6ea01c368f5286cac5ae7..12bb79288b7b978f3bf65a84bb0fd4b3108ceaee 100644 (file)
@@ -12,7 +12,7 @@ except ImportError, e:
 from htsworkflow.frontend.auth import require_api_key
 from htsworkflow.frontend.experiments.models import FlowCell, Lane, LANE_STATUS_MAP
 from htsworkflow.frontend.samples.changelist import ChangeList
-from htsworkflow.frontend.samples.models import Library, Species, HTSUser
+from htsworkflow.frontend.samples.models import Antibody, Library, Species, HTSUser
 from htsworkflow.frontend.samples.results import get_flowcell_result_dict
 from htsworkflow.frontend.bcmagic.forms import BarcodeMagicForm
 from htsworkflow.pipelines.runfolder import load_pipeline_run_xml
@@ -518,6 +518,11 @@ def species(request, species_id):
 
     return render_to_response("samples/species_detail.html", context)
 
+def antibodies(request):
+    context = RequestContext(request,
+                             {'antibodies': Antibody.objects.order_by('antigene')})
+    return render_to_response("samples/antibody_index.html", context)
+    
 @login_required
 def user_profile(request):
     """
@@ -533,3 +538,4 @@ def user_profile(request):
     return render_to_response('registration/profile.html', context,
                               context_instance=RequestContext(request))
 
+