Merge branch 'master' of github.com:Gluejar/regluit into tastypie1
commit
5deea69e6d
|
@ -2,9 +2,9 @@
|
|||
|
||||
{% 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" %}
|
||||
{% endfor %}
|
||||
|
|
@ -3,5 +3,5 @@ from django.conf.urls.defaults import *
|
|||
urlpatterns = patterns(
|
||||
"regluit.frontend.views",
|
||||
url(r"^$", "home", name="home"),
|
||||
url(r"^user/(?P<username>.+)/$", "user", name="user"),
|
||||
url(r"^supporter/(?P<supporter_username>.+)/$", "supporter", name="supporter"),
|
||||
)
|
||||
|
|
|
@ -10,9 +10,9 @@ def home(request):
|
|||
context_instance=RequestContext(request)
|
||||
)
|
||||
|
||||
def user(request, username):
|
||||
u = get_object_or_404(User, username=username)
|
||||
return render_to_response('user.html',
|
||||
{"user": u, "wishlist": u.wishlist},
|
||||
def supporter(request, supporter_username):
|
||||
supporter = get_object_or_404(User, username=supporter_username)
|
||||
return render_to_response('supporter.html',
|
||||
{"supporter": supporter},
|
||||
context_instance=RequestContext(request)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue