Skip to content
Snippets Groups Projects
Commit 96f47a6f authored by Brian Moe's avatar Brian Moe
Browse files

Cleaned up ligolw download function.

parent 28463976
No related branches found
No related tags found
No related merge requests found
......@@ -591,11 +591,11 @@ def search(request, format=""):
return flexigridResponse(request, objects)
elif format == "jqgrid":
return jqgridResponse(request, objects)
elif 'ligolw' in request.POST:
elif 'ligolw' in request.POST or 'ligolw' in request.GET:
if objects.count() > 1000:
# XXX Make this -- Better.
return HttpResponse("No more than 1000 events currently allowed.")
return HttpResponse("Sorry -- no more than 1000 events currently allowed.")
from glue.ligolw import ligolw
# lsctables MUST be loaded before utils.
......
......@@ -110,6 +110,7 @@
<a onClick="toggle_visibility('hints');">Hints on querying</a>
{% if rawquery %}
| <a href="{% url search %}?query={{rawquery|urlencode}}">Link to current query</a>
| <a href="{% url search %}?query={{rawquery|urlencode}}&ligolw">Download LIGOLW File</a>
{% endif %}
</td>
</tr>
......
......@@ -31,8 +31,6 @@ onload="document.search_form.query.focus();"
</tr>
<tr><td/><td>{% include "gracedb/query_help_frag.html" %}</td></tr>
</table>
<input type="Submit" name="submit" value="Submit"/>
<input type="Submit" name="ligolw" value="LigoLW"/>
</form>
<!-- Old style Query -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment