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