+
+@login_required
+@require_POST
+def delete_shelf(request, slug):
+ user_set = get_object_or_404(models.Tag, slug=slug, category='set', user=request.user)
+ user_set.delete()
+ return HttpResponse(u'<p>Półka <strong>%s</strong> została usunięta</p>' % user_set.name)
+
+
+@login_required
+def user_shelves(request):
+ shelves = models.Tag.objects.filter(category='set', user=request.user)
+ new_set_form = forms.NewSetForm()
+ return render_to_response('catalogue/user_shelves.html', locals(),
+ context_instance=RequestContext(request))
+