mirror of
https://github.com/HackSoftware/Django-Styleguide.git
synced 2025-07-06 21:03:09 +03:00
Removed trailing whitespaces
This commit is contained in:
parent
efa24c19db
commit
7459031e1c
|
@ -414,7 +414,7 @@ The implementation of `inline_serializer` can be found in `utils.py` in this rep
|
||||||
|
|
||||||
Now we have separation between our HTTP interface & the core logic of our application.
|
Now we have separation between our HTTP interface & the core logic of our application.
|
||||||
|
|
||||||
In order to keep this separation of concerns, our services and selectors must not use the `rest_framework.exception` classes because they are bounded with HTTP status codes.
|
In order to keep this separation of concerns, our services and selectors must not use the `rest_framework.exception` classes because they are bounded with HTTP status codes.
|
||||||
|
|
||||||
Our services and selectors must use one of:
|
Our services and selectors must use one of:
|
||||||
|
|
||||||
|
@ -503,7 +503,7 @@ def get_error_message(exc):
|
||||||
return error_msg
|
return error_msg
|
||||||
```
|
```
|
||||||
|
|
||||||
You can move this code to a mixin and use it in every API to prevent code duplication.
|
You can move this code to a mixin and use it in every API to prevent code duplication.
|
||||||
|
|
||||||
We call this `ExceptionHandlerMixin`. Here's a sample implementation from one of our projects:
|
We call this `ExceptionHandlerMixin`. Here's a sample implementation from one of our projects:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user