BluePython
BluePython

Reputation: 1597

Angular JS and Django

This might be a silly question that might relate to my ignorance about angular js, but is it possible to use a Django framework mostly for backend and database interactions, in conjunction with an Angular JS app/website?

I know angular js still requires Node Js for serving the data so, it seems like that would be a conflict. There was a similar but slightly more technical and specific from what I was looking for here: Django, REST and Angular Routes

What alternatives do I have if I want to experiment with Angular JS but need some database functionality?

Also how do you go about the fact that your code will be open to everyone?

Upvotes: 3

Views: 4203

Answers (2)

Jason
Jason

Reputation: 15931

There is no dependency on NodeJS whatsoever. Your web framework handles server requests, and your angular app runs in the browser. You would use Django to serve the files used by the angular runtime, typically this includes a mix of HTML, JS and CSS files.

Your angular app may request data from the server, in which case it would 'call into' your Django code via an XHR request using the built in $http service (or possibly $resource service).

Upvotes: 3

Zack Argyle
Zack Argyle

Reputation: 8407

Not a dumb question. But yes, it is totally doable. I put together a git seed for an angular web app with a django rest framework api. Check it out, I think it is exactly what you are looking for. Clone it down and try it out! Easy instructions to follow.

Angular-Django Seed

Upvotes: 3

Related Questions