from django templating to full rest?

Viewed 39

I want to make my django/html/css website completely in REST (json). The site was developed using django templating to render and send answers to the frontend (html/css).

My questions are: how can I handle the url redirection, use json data in the html templates since there will be no django variables.

1 Answers

I'm actually doing something very similar right now. Implementing Django Rest Framework on a system that uses Django templating.

What I'm doing is using AngularJS for the front end and just calling the api methods.

This means that you can do everything using a completely different framework.

The URL redirection for example, I'm using the $stateProvider service from AngularJS.

Hope this gives you some direction.

Related