0

We are getting started using Angular in our existing Django app, and I have seen mention of the Django Rest Framework as well as Django-Angular library. The DRF has been very easy to use, and seems to make a lot of sense when using a framework like Angular. That said, there also seem to be some great features available in the Django-Angular library - like being able to generate client side validation based on the server side validation rules.

But it seems like Django-Angular is really based on django forms, and the DRF is built around serializers. Is there any way to use these two together, and otherwise is there any way to automate client side validation rules based on DRF serializer validation rules?

1 Answer 1

1

Why don't you make the validatons direct in the model? I have no experience with DRF, but I suppose that it checks the model validations

Sign up to request clarification or add additional context in comments.

2 Comments

Django Angular Validation I am more wondering about something like this - I really like the idea of being able to create client side validation rules from server side ones because our website has dozens of forms on it for data entry. I haven't been able to find anything similar for Django and Angular, and it's not readily apparent to me how DRF and this could be integrated due to the whole form/serializer issue.
This is hard to get, maybe creating your custom "validation engine" using template tags and getting the validations from the model/form.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.