Created
August 12, 2012 23:10
-
-
Save foxmask/3335225 to your computer and use it in GitHub Desktop.
Reverse for ''profiles_profile_detail'' with arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if user.is_authenticated %} | |
<a href="{% url 'profiles_profile_detail' user.username %}">Mon compte</a> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l'appel du urls.py issue du module django-profiles : | |
url(r'^profiles/', include('profiles.urls')), | |
j'obtiens l'erreur : | |
Reverse for ''profiles_profile_detail'' with arguments '(u'foxmask',)' and keyword arguments '{}' not found. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.template import Context, loader | |
from monsite.models import Histo | |
from django.http import HttpResponse | |
def home(request): | |
latest_histo_list = Histo.objects.all().order_by('-date_created')[:5] | |
t = loader.get_template('home.html') | |
c = Context({ | |
'latest_histo_list': latest_histo_list, | |
'user': request.user | |
}) | |
return HttpResponse(t.render(c)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
solution
{% if user.is_authenticated %}
Mon compte
{% endif %}
sans quote