123456789101112131415161718192021222324252627282930313233343536 |
- def content_add(request, hotspot=False):
- active_ref = None
- if request.method == "GET":
- active_ref = request.GET.get("reference", None)
- references = []
- # for ref in models.ReferenceGenome.objects.all():
- for ref in models.ReferenceGenome.objects.filter(
- index_version=settings.TMAP_VERSION
- ):
- references.append(
- {
- "long_name": ref.short_name + " - " + ref.name,
- "short_name": ref.short_name,
- "selected": ref.short_name == active_ref,
- }
- )
- if hotspot:
- title = ugettext_lazy("content_add_hotspots.title")
- else:
- title = ugettext_lazy("content_add_targetregions.title")
- return render_to_response(
- "rundb/ion_publisher_content_add.html",
- {
- "hotspot": hotspot,
- "references": references,
- "Content": labels.Content,
- "HotspotsContent": labels.HotspotsContent,
- "TargetRegionsContent": labels.TargetRegionsContent,
- },
- context_instance=RequestContext(request),
- )
|