Ignore:
Timestamp:
Jul 22, 2012, 9:52:37 PM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
0229bd5
Parents:
549c9e9
git-author:
Alex Dehnert <adehnert@…> (07/22/12 21:52:37)
git-committer:
Alex Dehnert <adehnert@…> (07/22/12 21:52:37)
Message:

Correctly linkify constitution URL

We previously linkified any non-empty constitution URL. We now only
linkify constitution URLs starting with "http://" or "https://".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/views.py

    r04a46ed r68c93e8  
    8282        context = super(GroupDetailView, self).get_context_data(**kwargs)
    8383        group = context['group']
     84
     85        const_link = None
     86        const_url = group.constitution_url
     87        if const_url.startswith("http://") or const_url.startswith("https://"):
     88            const_link = const_url
     89        context['constitution_link'] = const_link
    8490
    8591        # Indicate whether this person should be able to see "private" info
Note: See TracChangeset for help on using the changeset viewer.