Merge branch 'master' of github.com:Gluejar/regluit into tastypie1

pull/1/head
Raymond Yee 2011-09-12 13:11:03 -07:00
commit 5deea69e6d
3 changed files with 7 additions and 7 deletions

View File

@ -2,9 +2,9 @@
{% block content %} {% block content %}
<h1>Wishlist for {{ user.username }}</h1> <h1>Wishlist for {{ supporter.username }}</h1>
{% for work in user.wishlist.works.all %} {% for work in supporter.wishlist.works.all %}
{% include "book_panel.html" %} {% include "book_panel.html" %}
{% endfor %} {% endfor %}

View File

@ -3,5 +3,5 @@ from django.conf.urls.defaults import *
urlpatterns = patterns( urlpatterns = patterns(
"regluit.frontend.views", "regluit.frontend.views",
url(r"^$", "home", name="home"), url(r"^$", "home", name="home"),
url(r"^user/(?P<username>.+)/$", "user", name="user"), url(r"^supporter/(?P<supporter_username>.+)/$", "supporter", name="supporter"),
) )

View File

@ -10,9 +10,9 @@ def home(request):
context_instance=RequestContext(request) context_instance=RequestContext(request)
) )
def user(request, username): def supporter(request, supporter_username):
u = get_object_or_404(User, username=username) supporter = get_object_or_404(User, username=supporter_username)
return render_to_response('user.html', return render_to_response('supporter.html',
{"user": u, "wishlist": u.wishlist}, {"supporter": supporter},
context_instance=RequestContext(request) context_instance=RequestContext(request)
) )