Is it possible to use django class based generic views with a ManyToManyField relation? For example adding an “Entry” to a “Category”:
class Category(models.Model):
title = models.CharField()
slug = models.CharField()
description = models.TextField()
entry = models.ManyToManyField(Entry,null=True,blank=True)
url(r'^category/(?P<pk>\d+)/add', CreateView.as_view(model=Entry?????),
Here I want to add a new Entry to an existing Category instance.
Use CreateView to create the Entry, and then add id to a category by overriding the
form_valid()method.