Skip to content
Snippets Groups Projects
Commit 695eae51 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Remove web event-voevent view

A weird web view for processing GET (!) parameters and running
buildVOEvent exists in the events app.  I can't believe this is
still ever used and it should not be used in favor of the API.
So I am removing it!
parent 1fb10ce0
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,6 @@ urlpatterns = [
# Event detail page
url(r'^(?P<graceid>[GEHMT]\d+)/view/$', views.view, name="view"),
# Event VOEvent creation page
url(r'^(?P<graceid>[GEHMT]\d+)/voevent/$', views.voevent, name="voevent"),
# Event file list and file download
url(r'^(?P<graceid>[GEHMT]\d+)/files/$', views.file_list,
name="file_list"),
......@@ -56,10 +53,6 @@ urlpatterns = [
url(r'^view/(?P<graceid>[GEHMT]\d+)', views.view, name="legacyview"),
url(r'^(?P<graceid>[GEHMT]\d+)$', views.view, name="legacyview2"),
# VOEvent creation
url(r'^voevent/(?P<graceid>[GEHMT]\d+)', views.voevent,
name="legacyvoevent"),
# Neighbors
url((r'^neighbors/(?P<graceid>[GEHMT]\d+)/\(?(?P<delta1>[-+]?\d+)'
'(,(?P<delta2>[-+]?\d+)\)?)?'), views.neighbors,
......
......@@ -134,28 +134,6 @@ def index(request):
return render(request, 'gracedb/index.html', context=context)
@event_and_auth_required
def voevent(request, event):
# Default VOEvent type is 'preliminary'
voevent_type=request.GET.get('voevent_type', 'preliminary')
internal=request.GET.get('internal', 1)
try:
# Tanner (10/25/2016): need to modify this call to buildVOEvent,
# second argument should be a serial_number.
voevent = buildVOEvent(event, voevent_type=voevent_type,
request=request, internal=internal)
# Issue alert
EventVOEventAlertIssuer(voevent, alert_type='voevent').issue_alerts()
# Exceptions caused by user errors of some sort.
except VOEventBuilderException, e:
return HttpResponseBadRequest(str(e))
# All other exceptions return 500.
except Exception, e:
return HttpResponseServerError(str(e))
return HttpResponse(voevent, content_type="application/xml")
def create(request):
d = _create(request)
if isinstance(d, HttpResponse):
......
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