-
Notifications
You must be signed in to change notification settings - Fork 97
Update asgi templates #1243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update asgi templates #1243
Conversation
…do not work well on the delete endpoint with no content
|
This looks good - thank you. I'll try and give it a go tomorrow 👍 |
|
Great. Thanks. |
dantownsend
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
My only thoughts were:
- Whether we should be returning a 404 if a PUT tries to update a resource which doesn't exist (some people wouldn't treat this as an error). But this is the behaviour we already had in the previous templates, so lets leave it.
- We use
Task._meta.primary_key. An alternative is to doTask.id, but then to add the following to theTasktable definition:
class Task(Table):
"""
An example table.
"""
id: Serial
name = Varchar()
completed = Boolean(default=False)
I think that's the right behavior and using a
Usually when I'm not using a custom primary key, I let Piccolo to automatically create the primary key column. In that case |
|
Looks good, thanks! |
Related to #1242