From what ive seen when i use it its like django admin but with more features.
Django Admin is not an API, nor can it be used that way. If you need API functionality, you would write the interface yourself, or use a package such as DRF.
DRF and the Django Admin perform the same functionality internally, but provide two different methods of external interaction. I believe what you are referring to is the browseable API feature within DRF that may give a somewhat Django Admin-like feel. (http://www.django-rest-framework.org/topics/browsable-api/). The browseable API is designed to guide programmers to the proper use of the API, and not to be interacted with directly in production.
Django Admin is designed to provide an 'out of the box' user interface that admins and staff (humans) can use to manage models via a web browser. Computers, on the other hand, do not use a browser to communicate with other computers. DRF (and all API's in a broader sense) is designed to facilitate computer to computer communication (or more succinctly, application to application).
Here is an example query of a REST API that DRF could potentially be configured to return in JSON (assuming you had access to all of the financial data that Yahoo! does):
You can past that in your browser to see what the application would receive. Obviously this isn't very human-friendly, but to a computer it's just data and can happily munch away at it.
I also noticed that it has the serializers are those for like using it with a machine ot translatign code?
I'm not exactly sure what you mean here, but in DRF, serializers are used to convert the data values stored in model records to formats used by API consumers (other applications) such as JSON or XML. The result is generally something that looks like the data returned from the Yahoo! URL above, or could be as simple as an HTTP return code of 200 (if no data is returned from the API call).
I also have question on why its needed i understand that the api is for client and users to collect data is that the whole point for an api so that an end user could embedd info or to tap into ?
I think I covered this already, but yes, exposing an API provides a way for other application programmers to integrate data and services that your application offers into their own applications.
can someone explain to to me why its needed?
-James
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/CA%2Be%2BciWypCvcWxoybdTsLEdBtPm1ztTb7x_BzCrVRTpgX2gahQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment