Hi guys,
 
Following the API first mindset I created my first API with Django rest-framework. Using generic-views helps a lot and makes that a piece of cake, especially with the support of the community.
 
The challenge is now to create a nice UI for the API. Normally I would create the application with Django views and forms to realize the creation and modification of data and the Django templates in combination with the twitter bootstrap (normally I would not have an API!).
Since I want to offer people access to the API to automate things as well as to a frontend in case they do not need that, I would like to have URLs like /API/Users and /Users (non API use). To not rewrite the whole application in django, I would like to consume the API myself with the Django frontend and serve the data with the Django template language. Unfortunately I have not found out how to call the API from Django to post data from a form (PUT api calls) and to display data (GET API calls) and especially parse and transform the data to be used in the API and templates.
  1. Is there a way to consume the own API to not rewrite the whole part?
  2. Is there may be a better way?  Learning node.js or stuff like that and hardcode the parameters and urls to build a frontend for the API seems like a waste of time?
Thank you very much.
Mike
 
 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/trinity-513c2b69-3ae2-4c88-94dc-349489ddfb74-1447277772649%403capp-gmx-bs64.
For more options, visit https://groups.google.com/d/optout.

Reply via email to