You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I only recently understood that it is allowed to use PUT to create a resource. It might be worth mentioning in the docs that this behaviour is supported by the framework.
Secondly, it doesn't yet fully work as it should. If you put against a url that does not yet exist, an object is created for you, but on a different one. I used the rest_framework_tutorial and it just created a new object with a pk that was the latest +1, which makes sense.
I than tried using slugs as primary keys, but haven't managed to get that working.
The text was updated successfully, but these errors were encountered:
The intention is the the .pre_save() method should correctly set the pk or slug field, which I believed was working, but will take a look. I think there should be a test for it, but perhaps I missed it out, again will take a look...
I only recently understood that it is allowed to use PUT to create a resource. It might be worth mentioning in the docs that this behaviour is supported by the framework.
Secondly, it doesn't yet fully work as it should. If you put against a url that does not yet exist, an object is created for you, but on a different one. I used the rest_framework_tutorial and it just created a new object with a pk that was the latest +1, which makes sense.
I than tried using slugs as primary keys, but haven't managed to get that working.
—
Reply to this email directly or view it on GitHub.
I only recently understood that it is allowed to use PUT to create a resource. It might be worth mentioning in the docs that this behaviour is supported by the framework.
Secondly, it doesn't yet fully work as it should. If you put against a url that does not yet exist, an object is created for you, but on a different one. I used the rest_framework_tutorial and it just created a new object with a pk that was the latest +1, which makes sense.
I than tried using slugs as primary keys, but haven't managed to get that working.
The text was updated successfully, but these errors were encountered: