简体   繁体   中英

Django API and Front-End Separation

I am using Django for REST API. Currently, I am generating primitive web pages from the same Django project. I think it's in my interest to separate API logic and front end.

What is a best way to do this? Should I create another Django app, that just calls this API and generates web pages from template or should I use some other framework for this?

Thanks

You should use front-end framework like Angular, React or Vue for the front end.

So you are going to call the Django-api built from the front end.

You are not supposed to create another Django app.

Here is a link for example of using React front-end with Django-rest api. https://hackernoon.com/creating-websites-using-react-and-django-rest-framework-b14c066087c7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM