Зачем для такой простой вещи батарейка?
models.pyclass Wish(models.Model):
customer = models.ForeignKey(User)
item = models.ForeignKey(Product)
class Meta:
unique_together = ['customer', 'item']
views.pyclass WishCreate(CreateView):
model = Wish
fields = ['item']
def form_valid(self, form):
obj = form.save(commit=False)
obj.customer = self.request.user
obj.save()
return http.HttpResponseRedirect(self.get_success_url())
class WishDelete(DeleteView):
model = Wish
success_url = reverse_lazy('wish-list')
class WishList(ListView):
model = Wish
def get_queryset(self):
return Wish.objects.filter(customer=self.request.user)
Всё. Осталось только шаблоны сделать.