Category "django"

PermissionError: [Errno 13] Permission denied: '/manage.py'

I am trying to run the following command in docker-composer, to start project with django-admin: docker-compose run app sh -c "django-admin startproject app ."

Django ckeditor is removing space around <a> tags

I'm using django-ckeditor with this config: 'enterMode': 2, 'forceEnterMode': 'true', 'basicEntities': 'false', 'fillE

Django deleting querysets with paging, not catching all parts of the set

I have a bit of a strange problem that I'm not quite able to explain. I have a django project with some old, stale objects lying around. For example, lets say

How to create short uuid with Django

I have a model and UUID as primary key field. UUID id is way too long. I'd like to have it short similar to YouTube. class Video(models.Model): id = models

Django EmailMessgae() Error: MIMEPart.__init__()

This is my views file: I have made a token file to generate a link and info file for details like EMAIL_HOST_USER and etc. current_site = get_current_s

"digitalocean" droplet password changing broke the website (502 Bad Gateway nginx/1.10.0 (Ubuntu))

I have changed the password of the digitalocean droplet then after that the website is not working at all and the api's for the mobile application is not workin

Getting "curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)"

I have a Django app which returns a large JSON while calling an API. The problem is when I'm requesting the data, the data itself is truncated which is crashing

Django: How to enforce UniqueConstraint with parent and child models

Say I have the following models: class ParentModel(models.Model): parent_field_1 = models.CharField(max_length=10) parent_field_2 = models.CharField(max

Why is request.user is anonymous in Django RedirectView?

There are a lot of questions similar to this one, but none quite capture the situation I am in. I am coding a Django/ React app and I have integrated with Spoti

when running tests in django and PostgreSQL DB can't create database

I'm having a problem with running unit tests in django while using ElephantSQL, when running command python manage.py runserver everything works just fine, I'm

Django - How do i check whether a date has expired inside filter condition

How do i check whether a date has expired or not with respect to today in filter condition. eg: task = Task.objects.filter(job=obj, status__in = ["in-progress"

How to pass request object from one serializer class to other serializer class in Django

I want to access userId of current logged-in user. for that i need to pass the request object from one serialiser to another. Here's my code class ThreadViewSer

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