Category "django"

django.core.exceptions.ImproperlyConfigured error

Here is the error message: django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'basicsiteApp' from '/Users/msa/trydjango/basicsite/ba

Cann't install django with error 'Non-zero exit code (2)'

When i create new django project in pycharm i have error enter image description here Help me please

Django cache real-time data with DRF filtering and sorting

I'm building a web app to manage a fleet of moving vehicles. Each vehicle has a set of fixed data (like their license plate), and another set of data that gets

FieldError at /teacher/8/. Cannot resolve keyword 'teacher' into field. Choices are: classroom, faculty, faculty_id, id, name

I reach the error in my django project when I was trying to display my view. The problem seems like related to the Course model but i honestly dont know where t

drf_yasg.generators: path component of api base URL http://localhost:8080/ is ignored; use FORCE_SCRIPT_NAME instead

I am using swagger (drf_yasg.generators) with Django and I get the following error message Error message is drf_yasg.generators: path component of api base UR

Django Rest-Framework search-fields wont work inside @action

I'm trying to use the search field offered by DRF inside of an action, but it seems to not work. I had a similar problem paginating inside of the action but fou

Django `LookupError: App 'accounts' doesn't have a 'User' model` causes AUTH_USER_MODEL fails with `accounts.User` has not been installed

I am trying to refactor an existing code base by creating new accounts app with new custom User model. When I try to do makemigrations, I get the following erro

Django form_valid method

In my form's view I wonder what if I don't add product_form.save method in the code below and what if I add that: def form_valid(self, form): product_fo

Django form_valid method

In my form's view I wonder what if I don't add product_form.save method in the code below and what if I add that: def form_valid(self, form): product_fo

django_elasticsearch_dsl -RequestError(400, 'search_phase_execution_exception', 'failed to create query: For input string: )

I am trying to search with Elasticsearch using django_elasticsearch_dsl and 'django_elasticsearch_dsl_drf',, but I get RequestError(400, 'search_phase_execution

Django / Create HTMl file from a form

In my Models.py class Scenes(models.Model): name = models.SlugField('Scene name', max_length=60,unique=True) description = models.TextField(blank=True)

Stuck in urls.py while migrating a website from Python 2 to Python 3

urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'html']) While running manage.py makemigrations, got this error and was stuck in this error

How to add Bearer {JWT} in swagger django?

when I authorize myself in Swagger UI, I have to write "Bearer {then I write JWT} here" How can I add the string "Bearer" automatically before the JWT token in

Problem to install django proyect in IIS server windows 2016

I need help with the following problem: raise RuntimeError('No Apache installation can be found. Set the ' RuntimeError: No Apache installation can be fou

How to Kill all Celery background proces

Killing all celery processes involves 'grep'ing on 'ps' command and run kill command on all PID. Greping on ps command results in showing up self process info o

error in migration with legacy database in Django

I'm working on creating a filter in django where the options displayed are coming from a new column in the database. It turns out that this column was created d

404 for static images and media in Django in Production Mode

I am beginner in Django I am trying to run my application on Debug=False mode to simulate the production environment, I have added all the static url, and roots

Django: user visits package selection

What is the difference between the following packages: django-visits 0.1.6 (released on Jun 16,2014) and django-user-visit 0.5.1 (released on Sep 29, 2021)? If

Django WebSocket connection to 'ws://127.0.0.1:8000/ws/chat/8_9/' failed:

I am doing a Django project in which I have added a live chat feature using Django channels. When I finished the messaging part I worked on other parts of the p

Django allauth Facebook and Google login

For normal signin/signup i'm using django's default singin/signup, but in facebook and google login i'm using django allauth, and to implement django allauth i