About 389,000 results
Open links in new tab
  1. python - What is the difference between Django and Django Rest ...

    Django is the web development framework in python whereas the Django Rest Framework is the library used in Django to build Rest APIs. Django Rest Framework is especially designed to make the CRUD operations easier to design in Django. Django Rest Framework makes it easy to use your Django Server as an REST API. REST stands for "representational ...

  2. python - Django or Django Rest Framework - Stack Overflow

    Django Rest Framework makes it easy to use your Django Server as an REST API. REST stands for "representational state transfer" and API stands for application programming interface. You can build a restful api using regular Django, but it will be …

  3. Implement a REST API and web interface in Django

    Feb 23, 2018 · Is there a correct/proper approach to implementing a RESTful API and a user interface that uses that API in Django? I have an application that I'd like to create a REST API for and also have a web interface, but I don't know the best approach. Lets say I want to implement the following endpoint: /1.0/transactions. I can create a view for the API

  4. python - Django Rest Framework File Upload - Stack Overflow

    # views.py # imports from rest_framework.decorators import api_view, parser_classes from rest_framework.response import Response from rest_framework.parsers import MultiPartParser from .models import Document from .serializers import DocumentSerializer @api_view(['POST']) @parser_classes([MultiPartParser]) def upload_document(request, filename ...

  5. Django rest framework api_view vs normal view - Stack Overflow

    Jan 17, 2014 · from django.core.urlresolvers import NoReverseMatch from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.reverse import reverse from .urls import urlpatterns @api_view(('GET',)) def root_endpoint(request, format=None): """ List of all the available resources of this RESTful API.

  6. python - Calling a REST API from django view - Stack Overflow

    Jun 15, 2017 · For instance, if the consumed API is unreliable and you need to setup retries, won't that potentially stall the entire django application ? – Overdrivr Commented Oct 17, 2018 at 7:53

  7. python - Django REST api calls and allowed_hosts - Stack Overflow

    Sep 9, 2017 · I'm trying to implement a RESTful API in Django such that any ip could query the endpoints. However, I'm concerned about header attacks if I were to set ALLOWED_HOSTS = ['*']. I read an answer to...

  8. How do I use django rest framework to send a file in response?

    May 25, 2015 · The problem here is that you are trying to return a mix of JSON and PDF, which either isn't what you are looking for or is going to return a giant base64-encoded response.

  9. python - Return the current user with Django Rest Framework

    Apr 3, 2013 · I am currently developing an API using Django. However , I would like to create a view that returns the current User with the following endpoint: /users/current/ . To do so, I created a list view and filtered the queryset on the user that made the request.

  10. Django Rest API for simple python dictionary - Stack Overflow

    Oct 25, 2020 · I'm new to Django and I want to make a simple restful API that will return the python dictionary in JSON format upon calling it from the postman. I have set up my project folder and have installed the RestfulAPI frame and also I have configured my settings.py For example, In dictionary.py I have the following code

Refresh