Skip to content

Commit

Permalink
Merge pull request #2535 from firm1/hotfix-2301
Browse files Browse the repository at this point in the history
Hotfix release 1.7 : réparation de l'encodage des URLs de membre
  • Loading branch information
SpaceFox committed Apr 13, 2015
2 parents b23b4ea + ee42f92 commit 05ff79e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/misc/member_item.part.html
Expand Up @@ -4,7 +4,7 @@

{% with profile=member|profile %}
<a
href="{{ member.get_absolute_url }}"
href="{{ profile.get_absolute_url }}"
class="member-item"
itemscope
itemtype="http://schema.org/Person"
Expand Down
3 changes: 2 additions & 1 deletion zds/member/views.py
Expand Up @@ -15,6 +15,7 @@
from django.core.urlresolvers import reverse
from django.db import transaction
from django.db.models import Q
from django.utils.http import urlunquote
from django.http import Http404, HttpResponseBadRequest
from django.shortcuts import redirect, render, get_object_or_404
from django.template.loader import render_to_string
Expand Down Expand Up @@ -60,7 +61,7 @@ class MemberDetail(DetailView):
template_name = 'member/profile.html'

def get_object(self, queryset=None):
return get_object_or_404(User, username=self.kwargs['user_name'])
return get_object_or_404(User, username=urlunquote(self.kwargs['user_name']))

def get_context_data(self, **kwargs):
context = super(MemberDetail, self).get_context_data(**kwargs)
Expand Down

0 comments on commit 05ff79e

Please sign in to comment.