Need help cloning? Learn how to
clone a repository.
is a free Git and Mercurial client for Windows.
is a free Git and Mercurial client for Mac.
No description provided.
Can you elaborate on this?
Here's the code as it currently stands in 23ebc37c78e8
def create(self, request, *args, **kwargs):
if not self.has_model():
attrs = self.flatten_dict(request.POST)
inst = self.model.objects.get(**attrs)
inst = self.model(attrs)
On the "inst = self.model(attrs)" line I get an error about not being able to convert dict to int. (I assume that's because a single positional argument is used as the ID.) Expanding the contents of attrs as keyword arguments works.
kw expanding args to self.model in default create, fixes #25, thanks mmarshall