-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
other than dict types are not allowed Signed-off-by: Piyus Kumar <[email protected]>
Signed-off-by: Piyus Kumar <[email protected]>
Signed-off-by: Piyus Kumar <[email protected]>
Added PUT method to update single row object this will always lookup using pk and can update non restricted columns. References #15 Signed-off-by: Piyus Kumar <[email protected]>
@Piyusgupta, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
@piyusql, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
@piyusql, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
This change includes a new urls which writes (create or update) the django model based on the parameters passed such as db_name or pk. If a primary key is included in the url then bridgeql will try to update the model, else it will create it. Added test cases. Signed-off-by: Priyank Singh <[email protected]>
While updating a model if primary key used to get the model is invalid, then bridgeql raises an InvalidPKException. Added test cases. Signed-off-by: Priyank Singh <[email protected]>
@piyusql, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
Inorder to support patch method, we need to retrieve payload directly from request body since there is no equivalent `request.POST` for patch method. However this introduces a constraint that the client should always pass the request body in json format with content type `applicaton/json`. Added a better way of handling exception Fixed test cases Signed-off-by: Priyank Singh <[email protected]>
@piyusql, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
Signed-off-by: Priyank Singh <[email protected]>
@piyusql, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
use separate auth for reader and writer, `BRIDGEQL_AUTHENTICATION_DECORATOR` now accepts, a dictionary with attributes reader and writer containing their respective auth decorator import path. Added test cases to verify auth decorators and update model when field is not present in the model. Signed-off-by: Priyank Singh <[email protected]>
@piyusql, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
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.
Overall looks good, few things to address before merge.
bridgeql/django/models.py
Outdated
setattr(self.instance, key, val) | ||
# Perform validation | ||
self.instance.full_clean() | ||
self.instance.validate_unique() | ||
except (ValidationError, AttributeError) as e: | ||
raise InvalidRequest(str(e)) | ||
self.instance.save() |
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.
move this up inside try/except and change AttributeError -> IntegrityError
@piyusql, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
URLs are now of the pattern create/, read/, update/. New url of delete would also be added which would delete the resource based on the primary key. Minor fixes, resolved reviews, updated test cases and README Signed-off-by: Priyank Singh <[email protected]>
@piyusql, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
Signed-off-by: Priyank Singh <[email protected]>
@piyusql, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
No description provided.