more cleanups
This commit is contained in:
parent
ab7a4d3b99
commit
ab74e95c41
|
@ -24,7 +24,7 @@
|
||||||
<li><a href="/about">ABOUT</a></li>
|
<li><a href="/about">ABOUT</a></li>
|
||||||
{% available_content as sections %}
|
{% available_content as sections %}
|
||||||
{% for url, title in sections %}
|
{% for url, title in sections %}
|
||||||
<li><a href="{{url}}">{{title}}</a></li>
|
<li><a href="{{url}}index/">{{title}}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<li><a href="/contact">CONTACT</a></li>
|
<li><a href="/contact">CONTACT</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -135,6 +135,7 @@ def render_content(request, shortname, section, template, types):
|
||||||
return event(request)
|
return event(request)
|
||||||
else:
|
else:
|
||||||
return section_index(request, section)
|
return section_index(request, section)
|
||||||
|
shortname = shortname.replace(' ', '_')
|
||||||
content = get_object_or_404(Content, shortname=shortname, type__name__in=types)
|
content = get_object_or_404(Content, shortname=shortname, type__name__in=types)
|
||||||
if not content.published and not request.user.is_staff:
|
if not content.published and not request.user.is_staff:
|
||||||
raise Http404
|
raise Http404
|
||||||
|
@ -242,9 +243,9 @@ def redirect_index(request):
|
||||||
return redirect(reverse('index'))
|
return redirect(reverse('index'))
|
||||||
|
|
||||||
def redirect_event(request):
|
def redirect_event(request):
|
||||||
shortname = request.GET.get('this')
|
shortname = request.GET.get('this').replace(' ', '_').lower()
|
||||||
if shortname:
|
if shortname:
|
||||||
content = get_object_or_404(Content, shortname=shortname)
|
content = get_object_or_404(Content, shortname__iexact=shortname)
|
||||||
return redirect(content.get_absolute_url())
|
return redirect(content.get_absolute_url())
|
||||||
id = request.GET.get('id')
|
id = request.GET.get('id')
|
||||||
if id:
|
if id:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user