I need your help with understanding try-except python/Django. so I have this function: def submit_dept_head_application(request, application_id): cv = request.F
I created a magzine model in django. But their are more than three authors of a magzine. I have written below code for three authors. If I write the code of two
I have done this before and may be it did work properly that time but now suddenly it's not working as it's expected to be. The viewset.py: class ProfileView
Problem: I cannot get images to appear on my template plant_detail.html. I think I'm calling on variables incorrectly, but not sure what to change. Context: I c
I am struggling to create the correct prefetch behavior in Django. Here is the outline of the problem: Each Account has DailyQuotes, updated daily at different
I want to get url by name specified in urls.py. Like {% url 'some_name' %} in template, but in Python. My urls.py: urlpatterns = [ ... path('admin_secti
If this form submits as invalid, I want to override the htmx and do a HttpRedirectResponse that refreshes the full page instead of just changing the div, #super
When running the vercel command in Ubuntu terminal: Error! Command failed: python3.6 /tmp/2de7da56/get-pip.py --user ERROR: This script does not work on Pyth
I'm trying to add search bar in my application but I don't know how to query a database to gives the things that user's search for. I want when user search for
so i make this app in which you can make products. And those products have an image that was saved in a file while i was using this app localy. I deployed my ap
ImportError: cannot import name 'url' from 'django.conf.urls' (/home/chams/pfe_project/CarApp/venv/lib/python3.8/site-packages/django/conf/urls/_init_.py) I can
I have the below model. Departments, users. Users are assigned to a department. How can I restrict the access of templates based on the department_name of a use
I have a model with multiple fields. I want to make an importer (possibly with the django import-export library) that only takes two fields and with that calcul
I’ve been trying to deploy a django application with postgresql db on aws elastic beanstalk and i ran into many issues that i surfed and solved. Now the a
My project is named main, and when I runserver I get this error.Anybody have any clue how to fix this error. Page not found (404) Request Method: GET Request UR
here is my django project's urls.py from django.urls import path from .import views from django.conf import settings from django.conf.urls import static urlpa
I have Django app which should consume Kafka messages and handle it with my handlers and existing models. I use https://kafka-python.readthedocs.io/en/master/us
Imagine there are a model and a view: class Task(models.Model): title = models.CharField(...) message = models.TextField(...) performer = models.For
I'm beginner and the project works perfectly locally , but when I deploy on Heroku I get a blank page. I also connected my Heroku to GitHub and and I made a bui
I need a custom section of application on admin site. It must not consider any model (proxy, unmanaged, etc), without template overriding, just a "phantom" appl