Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
60 views

Can login as superuser but not as normal user

i have made a super user and registering other users. but only able to log in as superuser and when i try to login as normal user its shows "Invalid phone number or password". Can someone ...
Shriyansh's user avatar
-1 votes
0 answers
20 views

How do I create a REST API for a project for a hackathon using django which I have no experience of?

I have to create a REST API for a project in django for a hackathon, I have never created one. I have worked on basic django projects but have not built an api. I tried following along a tutorial but ...
chiranjit saha's user avatar
1 vote
1 answer
82 views

Why is django-ninja PUT endpoint not using value from request body but instead is returning the default value for field to be updated (ModelSchema)?

Goal I'm trying to use a Django Ninja API endpoint (with Django Ninja's ModelSchema) to update the time zone preference (tz_preference*) field on my Django app's user model. *Note: The tz_preference ...
DevinG's user avatar
  • 502
0 votes
0 answers
26 views

Double model creation after payment in django website

I am currently working on Learning management course using Django and React .I am creating payment gateway using stripe . After the payment is successfully done , the courses should be called enrolled ...
rohan Kumar's user avatar
1 vote
0 answers
41 views

MiddlewareMixin.__init__() missing 1 required positional argument: 'get_response'

I have created a custom django middleware and decorator to authenticate the RESTful API that I am developing. Here is the code of the middleware that I have developed: # myproject/middleware.py ...
Bilal Tufail's user avatar
1 vote
1 answer
32 views

Is it good practice to modify a session with a GET request?

I am trying to implement an invitation system in Django, compatible with django-allauth. It is similar to django-invitations, but I have some requirements that require a custom implementation. After ...
Juanma Donado's user avatar
0 votes
0 answers
23 views

Flatten DRF's nested serializer

I have two models for each user, a User model and a Profile model. class User(BaseModel, AbstractUser): username = None image = models.CharField(max_length=300, blank=True, null=True) ...
Amir Shabani's user avatar
  • 4,087
1 vote
0 answers
31 views

Is there a way to restrict users to only see children of a parent element they belong to in Django Rest?

I have built a Django REST app for a client that allows users to join communities. The Community model has 20+ models that link back to it in some way (things like events, event dates, meetings, ...
Race Wolf's user avatar
-2 votes
1 answer
41 views

Access to ForeignKey fields of another model

I have project in Django Rest Framework where I need get access from Project to ProjectTemplate. But between I have Department model, so I can only connect with Department via ForeignKey. There is ...
user2962768's user avatar
0 votes
0 answers
41 views

I keep on getting GET http://127.0.0.1:8000/room/f5428fc5 404 (Not Found):

Im making a Next.js and Django full stack app with Spotify api, and Im having trouble fetching the get-room api, when ever I click on the button to create a room in the create.js page the room is ...
amirlasalle's user avatar
0 votes
0 answers
27 views

Getting CSRF 403 error with django server and nexjs client

I am sending requests to Django server from next.js but I am getting error :403 Forbidden (CSRF cookie not set.), even after sending the csrf token. I am running both Django server and next.js locally....
2k18_EC_157's user avatar
0 votes
1 answer
2k views

DLL load failed while importing _rust: The specified procedure could not be found

I am trying to hit an API that is of POST type, it generates access and refresh tokens which can be used to access other APIs. It takes the username and password in the body, which we generate while ...
Kalash Bhagwat's user avatar
0 votes
0 answers
11 views

TypeError at /api/register-application/

I was trying to deploy my system, as everything was working easily on localhost:8000 but when i deploy same code on the server then with the domainname api i cannot post any data with same function ...
Shuseel Maharjan's user avatar
1 vote
1 answer
58 views

How to return the error in JSON format instead of HTML in REST framework?

I want to make an error handler exception to return the error 404 instead of this html. how can i do this ? i tried the following code but it didn't work for me from rest_framework.views import ...
Mohamed Mohsen's user avatar
0 votes
1 answer
57 views

Django REST Authentication credentials were not provided

I'm developing an API using Django Rest Framework. but when i'm trying to access the console gives me this error: @api_view(['GET']) @authentication_classes([TokenAuthentication]) @permission_classes([...
Gal's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
174