I have to solve a task where I need to create login and signup web pages using Django. But they told me you should use rest API to do tasks.
So my question is calling API which is made by Django rest-framework from Django view is a good idea to do?
It is efficient or has any benefits?
In real-world industries use this?
CodePudding user response:
You can use flask
pip install flask
It's useful for these type of tasks
CodePudding user response:
Good Idea.
You have the logic in api, in a single place and you are DRY. In this case your view does not have logic, but is used only for templating. The endpoint is useful also for external application.