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

Rework a few basic views

No need to have explicit view functions for a few basic views,
we just use the built-in TemplateView instead.
parent 8ceebafd
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
from django.views.generic import TemplateView
# Import feeds
from events.feeds import EventFeed, feedview
......@@ -20,12 +21,17 @@ feeds = {
'latest' : EventFeed
}
urlpatterns = [
url(r'^$', events.views.index, name="home"),
url(r'^navbar_only$', events.views.navbar_only, name="navbar-only"),
url(r'^SPInfo', events.views.spinfo, name="spinfo"),
url(r'^SPPrivacy', events.views.spprivacy, name="spprivacy"),
url(r'^DiscoveryService', events.views.discovery, name="discovery"),
url(r'^navbar_only$', TemplateView.as_view(
template_name='navbar_only.html'), name="navbar-only"),
url(r'^SPInfo', TemplateView.as_view(template_name='gracedb/spinfo.html'),
name="spinfo"),
url(r'^SPPrivacy', TemplateView.as_view(
template_name='gracedb/spprivacy.html'), name="spprivacy"),
url(r'^DiscoveryService', TemplateView.as_view(
template_name='discovery.html'), name="discovery"),
url(r'^events/', include('events.urls')),
url(r'^superevents/', include('superevents.urls')),
url(r'^options/', include('userprofile.urls')),
......
......@@ -134,19 +134,6 @@ def index(request):
return render(request, 'gracedb/index.html', context=context)
def navbar_only(request):
return render(request, 'navbar_only.html')
# SP Info and Privacy pages are required for Federation with InCommon.
def spinfo(request):
return render(request, 'gracedb/spinfo.html')
def spprivacy(request):
return render(request, 'gracedb/spprivacy.html')
def discovery(request):
return render(request, 'discovery.html')
@event_and_auth_required
def voevent(request, event):
# Default VOEvent type is 'preliminary'
......
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