Category "django"

Django s3: 403 Access Denied, and generating URLs

I wish to allow registered users of a Django app to upload and view files to an s3 bucket. With the help of the first commenters on this question and this answe

How to search and filter on multiple related models?

I am creating an search and filter system in which user can type and search related courses and institutions. This is my model structure: Model Structure: I

Django - Create downloadable Excel file using Pandas & Class Based View

I'm relatively new to Django and have been looking for a way to export my DataFrame to Excel using Pandas and CBV. I have found this code: from django.http impo

Django drf simple-jwt authentication"detail": "No active account found with the given credentials"

I am implementing user authentication with django-rest_framework_simple-jwt with custom user, My models.py: class UserManager(BaseUserManager): def create

What does "IntegrityError. NOT NULL constraint failed: blog_comment.post_id " stands for?

I've added a Comment model to my application, but when the form is submitted, this error pops: NOT NULL constraint failed: blog_comment.post_id Here's models

How to easily debug Redis and Django/Gunicorn when developing using Docker?

I'm not referring to more sophisticated debugging techniques, but how to get access to the same kind of error messages that are normally directed to terminal ta

psycopg2 installing error in cPanel while hosting Django Website with PostgreSQL

Collecting psycopg2 Using cached psycopg2-2.9.3.tar.gz (380 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup

google.maps.event.addDomListener() is deprecated, use the standard addEventListener() method instead : Google Place autocomplete Error

I am trying to add Google place auto suggest, I copied the code from the developer's website to try it out but got the error : google.maps.event.addDomListener

How to fix "InternalError: variable not found in subplan target list"

I have a legacy Django project (django-1.1.29) and some tests in pytest (pytest-4.3.0), all running inside Docker. The database is PostgreSQL 10 and is a docker

Testing Django FileResponse

I have a Django view that returns a file. The FileResponse is built for that purpose. However, I do not understand how to test this. Right now I use the HttpRe

Django REST: Files\Images Uploading

Im want to upload an image using Vue.js and Django-rest. And have few problems with it. Im trying to use put request (as in docs) and FileUploadParser for it,

Custom SRID in Django-Leaflet

I'm having trouble specifying a custom SRID with django-leaflet. The documentation on projections isn't very detailed, and mentions only briefly: By defaul

Passing django.core.mail.EmailMultiAlternatives instance as async_task with Django-Q

An E-mail template is build-up and send weekly to more than 2000 email recipients (bcc). I must run it as background since it takes few minutes to get rendering

How to display Foreign key Data in Django view page?

i have relation between Project and ProjectFloorPlan, and i want to display ProjectFloorPlan data in my template. Please let me know how i can display the Forei

How to display Foreign key Data in Django view page?

i have relation between Project and ProjectFloorPlan, and i want to display ProjectFloorPlan data in my template. Please let me know how i can display the Forei

Django Horizontal Scroll on Top of Changelist

I have the same problem as depicted here by mozman2: "In my Django changelist there are lots of columns that means there is a scrollbar at the bottom of the lis

Hide Django logo/name in header Django admin tool

I want to hide/change the name displayed in the header bar, the label that I want to change is "DJANGO" word as the next image shows"

Django CheckboxSelectMultiple not displaying in ModelForm

I'm trying to use CheckboxSelectMultiple in a form, instead of the SelectMultiple default. I tried two different ways to make it display as checkboxes, but they

Date Picker does not shown up

I am new to frontend development. Normally I do backend and infra. During the daytime I heard from the frontend-angular guys talking on datepicker widget a lot.

How to resolve AssertionError: .accepted_renderer not set on Response in django and ajax

While I am calling Django url in ajax, getting below error AssertionError: .accepted_renderer not set on Response. This is my code: function download(){