Apologies since this might not be the best way to word the question nor is this a coding question per say. I get the general process of creating a staff user wi
I have a Django website in production and a while back I successfully hosted my static files using Whitenoise so I could use them in production. Now a few month
I want to pass some arguments to DRF Serializer class from Viewset, so for I have tried this: class OneZeroSerializer(rest_serializer.ModelSerializer): de
I have a class based view as: class ClassBasedView(GenericAPIView): @swagger_auto_schema(responses={201: 'Created'}) @authorize(myCustomPermission)
How can you solve a 502 error? I believe whats causing the 502 error is a nested loop that contains heavy calculations. It would take up to 2 minutes for it t
In my admin.py of my admin dashboard app I added this following code: class MyAdminSite(admin.AdminSite): def index(self, request, extra_context=None):
I am using the UserCreationForm for user registration in my Django web app. When the user fills in the detail (username, password, confirm_password) and submits
I am running a django app and I want to import a third-party stylesheet from my node_modules. But my django app is looking in the wrong directory and throws a 4
I am developing an application which the frontend is an AngularJS API that makes requests to the backend API developed in Django Rest Framework. The frontend
Factory_boy uses fake-factory (Faker) to generate random values, I would like to generate some random values in my Django tests using Faker directly. Factory_bo
I was making a web app using Django. I was using Django 3.0.7 for the sake. Then I upgraded to Django 3.1.1. When I reinstalled Django 3.0.7 I am unable to open
While trying to return a query-set using generic views, I get an error TypeError: init() got an unexpected keyword argument 'many' I am unable to underst
Python Version 2.7 Django Version 1.9.7 I have created a Django app on heroku. I can't get the heroku server to migrate properly. In the past I have done all
I have installed GDAL in a virtual environement with the following commands: $ brew install gdal $ pip3 install gdal When trying a python manage.py makemigrati
How can I change the title for Django admin specfic model? Automatically it write "Select to change"... I am try each from this options but do nothing: admi
How can I change the title for Django admin specfic model? Automatically it write "Select to change"... I am try each from this options but do nothing: admi
I have a code as follows: from django.utils.timezone import get_current_timezone, make_aware make_aware(some_datetime, get_current_timezone()) The make_awar
i cant force django to translate strings, choosen language from request is correct, but i have no translated strings. maybe here could be problem: when i run s
Models: class CrewMember(models.Model): DEPARTMENT_CHOICES = [ ("deck", "Deck"), ("engineering", "Engineering"), ("interior", "Inte
I am using Django 3.2 I have written a standalone app social that has models defined like this: from abc import abstractmethod class ActionableModel: # Th