django-rest-framework Questions
3
I'm using django 1.11.6 and python 3.5 on an ubuntu server.
I have an api for user registration.
This is my curlcommand:
curl -i -H 'Accept: application/json; indent=4' -X POST https://mydomain...
Pharmacopoeia asked 26/10, 2017 at 6:45
5
I'm using django-allauth on my website for social logins. I also have a REST API powered by django-rest-framework that serves as the backend of a mobile app. Is there a way I can directly plug in a...
Collogue asked 25/7, 2013 at 15:8
4
I'm learning DRF and feel confused a little now.
I set up QuestionView and QuestionSerializer like this.
views.py
class QuestionView(viewsets.ModelViewSet) :
queryset = models.Question.objects....
Villainous asked 25/9, 2018 at 0:26
2
I need to add API documentation to my project. I wrote my custom schema using swagger editor and now I have a YAML file as follows:
swagger: "2.0"
info:
description: "This is the documentation of...
Hogue asked 10/6, 2020 at 5:29
1
I. I'm new to using Django REST Swagger for API documentation. I'm trying to understand how to edit a) 'Implementation Notes' and b) parameter descriptions. Image below -
Here's my viewset for ...
Petes asked 23/3, 2018 at 17:33
5
Solved
https://gist.github.com/ranman/3d97ea9054c984bca75e
Desired Behavior
User lookup happens by the username: /api/users/randall
Speaker lookup happens by the username as well: /api/speakers/randall
Co...
Gorki asked 16/3, 2015 at 0:54
3
Solved
The docs on using to_representation is somewhat short. This method is used by Django Rest Framework 3.0+ to change the representation of your data in an API.
Here' the documentation link:
http://...
Doodlesack asked 4/8, 2015 at 22:22
5
Solved
I am using the Django REST Framework 2.0.
Here is my model class:
class Mission(models.Model):
assigned_to = models.ForeignKey('auth.User',
related_name='missions_assigned',
blank = True)
Here ...
Purgation asked 16/5, 2013 at 13:40
11
Solved
The scenario is quite straight-forward:
I have a model with some fields that are required. Let's say one of them is a TextField which can't be blank.
I also have a ModelSerializer (Django Rest Fra...
Osteal asked 15/11, 2014 at 8:18
4
Solved
How can I create a search results page in Django 1.11, using PostgreSQL full text search, where the terms searched for are highlighted?
Giffy asked 24/9, 2017 at 0:44
2
Solved
How can I do a range filter for dates and number in Django REST Framework? Other filters (lt, gt etc.) work fine. I tried many variants such as:
import rest_framework_filters as filters
class Or...
Jennelljenner asked 25/5, 2017 at 13:38
2
Solved
I am new in Django and react. I already faced this error at last week and That times its was request URL error. yesterday I changed backend design and now its error happens again.
Here is my url=>...
Tortfeasor asked 2/7, 2019 at 4:0
5
I'm implementing an auth system with django and react. The two app run respectively on port 8000, 3000. I have implemented the authentication system using the Djoser package. This package uses some...
Berkshire asked 15/2, 2021 at 8:48
22
Solved
I'm developing an API using Django Rest Framework. I'm trying to list or create an "Order" object, but when i'm trying to access the console gives me this error:
{"detail": "Authentication credent...
Phrygian asked 13/11, 2014 at 10:27
5
Solved
I have an API created using django rest framework in a Linode server. Now, I want to check the number and the response code of each request, I want to get stats for my api. How can I do it? thankyo...
Saltillo asked 14/12, 2015 at 19:50
3
I am running a Django restserver application served by Daphne and Nginx acting as reverse proxy. I also have a periodic cron job that pulls updated code from my git to the server.
I am not able t...
Afrit asked 27/3, 2018 at 1:11
3
I am writing tests for endpoints which requires bearer token authentication, but I am getting errors trying to pass authentication errors to HTTP methods like client.post(url,data,**auth_header)
I...
Torrell asked 17/1, 2019 at 18:55
4
I'm seeing an error when running my tests, i.e. $ ./manage.py test --settings=my.test.settings
django.db.utils.ProgrammingError: relation "<relation name>" does not exist
This is after runni...
Discography asked 27/11, 2017 at 18:58
37
Solved
When I run python manage.py migrate on my Django project, I get the following error:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.a...
Chorea asked 20/6, 2017 at 11:25
1
The documentation for Next Auth is mostly outdated examples and, as I understand it, it is still being finalized.
In reality, it is very difficult to find information on how to do this. The docs of...
Intranuclear asked 14/3 at 18:26
2
this is realted to my other question
django-rest-framework, multitable model inheritance, ModelSerializers and nested serializers
In django rest framework we can define nested model serializer lik...
Necrotomy asked 5/6, 2014 at 18:19
2
Solved
I have been trying for a while now to add an 'owner' field to my models. I have looked at other questions but I still have had no luck. Ideally when a new note is created, the current user will be ...
Coordination asked 21/8, 2018 at 2:59
4
Solved
In reference to this link, I've seen plenty of examples of using a HyperlinkedModelSerializer in Django Rest Framework. It says:
The HyperlinkedModelSerializer class is similar to the ModelSeria...
Minier asked 29/10, 2015 at 17:42
3
Solved
I'm new at Django and my project is in REST
when i'm using postman to check URLs it's make this error:
"detail": "Unsupported media type "multipart/form-data; boundary=----WebKi...
Redeemable asked 18/12, 2017 at 18:18
6
Previously I was using drf-yasg but want to update to use OpenAPI 3. I am trying to switch over to drf-spectacular. Following the instruction, I ran pip install drf-spectacular, I've removed all re...
Personality asked 26/10, 2020 at 22:30
© 2022 - 2024 — McMap. All rights reserved.