mirror of
https://github.com/HackSoftware/Django-Styleguide.git
synced 2024-11-25 19:13:45 +03:00
commit
ff7828c3ea
|
@ -708,7 +708,7 @@ In our projects, we format the errors like that:
|
||||||
|
|
||||||
If we raise a `ValidationError`, then field is optional.
|
If we raise a `ValidationError`, then field is optional.
|
||||||
|
|
||||||
In order to acheive that, we implement a custom exception handler:
|
In order to achieve that, we implement a custom exception handler:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from rest_framework.views import exception_handler
|
from rest_framework.views import exception_handler
|
||||||
|
|
Loading…
Reference in New Issue
Block a user