0

I have a django project that uses postgresql. I am trying to use angular as a front end in my html pages. Which is the best approach to use the angular js controllers in the django project to connect to the django models and the database to perform basic operations like insert, delete, update etc?

Currently i just have static data that i defined in my angular controller. But i would like to know how to get the data from the database dynamically. Any advice will be helpful

1
  • AJAX, JSON, Django ORM Commented Apr 14, 2014 at 7:07

1 Answer 1

2

As per my experience with Django and AngularJs, first you should make api in django to get the data from database. Afterthat, in single page application, you should make angularjs service for each api in controller. After rendering data, you can submit / modify your data either through api or through form submission(with form validation).

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

Comments

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.