Category "django"

Django constraints when removing columns in manual migrations

Django silently removes constraints when removing columns, then arbitrarily chooses to include them in migrations. I've encountered an odd bug(?) in Django in o

Django + Postgres: OperationalError FATAL: sorry, too many clients already (as a result of a deliberate attack)

There are many similar questions on Stackoverflow but they do not address my particular case. The problem is that there are deliberate attacks on the website wi

Django get_next_by_date conditions not rendering properly in template

I have a model named "Manga". In this model I have manytomanyfield object called chapters with this model. class Chapter(models.Model): chapter=models.Integ

I need to apply the values_list() function to queryset after filtering

Following is my View Class: from apps.embla_services.filters import RentPostFilters from django_filters import rest_framework as filters from apps.embla_service

Django get_next_by_date conditions not rendering properly in template

I have a model named "Manga". In this model I have manytomanyfield object called chapters with this model. class Chapter(models.Model): chapter=models.Integ

I need to apply the values_list() function to queryset after filtering

Following is my View Class: from apps.embla_services.filters import RentPostFilters from django_filters import rest_framework as filters from apps.embla_service

Why I am getting "Not Implemented Error: Database objects do not implement truth value testing or bool()." while running makemigration cmd in django

I am trying to connect Django with MongoDB using Djongo. I have changed the Database parameter but I am getting this error Not Implemented Error: Database objec

Django Authorization Checking in URL having wild card pattern

I am trying to implement permission checking mechanism in URLs for a request using wildcard techniques, rather than implement permission checking on each views.

how to show success message without refreshing the page in django

I have a template called basket whenever I want to update the product quantity it works fine but the success message doesn't show until I refresh the page view

Element added to DOM has HTML / SVG attributes, but not the corresponding JS properties

I am using HTMX with Django to render a page which is basically an SVG with a lot of sticky notes () that you can move around on the page, like you might use fo

Django allauth return Account Inactive page after login

I am new to programming and I don't fully understand how allauth work and what exactly to do. I have an application where the user is inactive after signing up

Wagtail Custom Translatable Menu

I am new to wagtail and i am working with a custom menu. I set up a custom menu class and use a tag to display the menu-items in the templates. This works fine,

Update django model objects from editable dash data-table

I want to update my models by an editable plotly dash-table (populated by a dataframe, himself populated by sqlconnection with models) in Django but I don't kno

How can i submit a form with logged in user as default?

After you sign up, you are prompted to the login page, and after you login, you are redirected to another page that contains a form used for gathering additiona

download to csv the result of a search in Django

I am trying to download a CSV from the result of a search, as an option. Meaning that the user should be able to do a search and view the result in a template,

Django: How to filter model with multiple whitespaces?

I have a model with char field with values like this: "Justin Roseman" (one single whitespace betwen words) "Justin Roseman" (two whitespaces betwen words) " J

Python zipfile.ZipFile zips a corrupt file

I have a Django view which users can call to zip files at my local server. It uses zipfile.ZipFile to compresses multiple files into a single zip as follows: wi

Django Heroku Migrate Error(?): "You have 21 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s)"

So I'm working on hosting a project and on my Heroku dashboard it says it's live, but every time I try to access it I get a 500 Server Error, even when trying t

django project does not write to file and there is no error, the file does not appear

I'm trying to write to a file and django doesn't do it. There is no error of any kind but the file does not appear. Using the process monitor I don't see any at

Hovering over Morris Chart is not working as expected

Hovering is not working for my chart, any suggestions as to what it could be? This is a django template with the Morris Chart within. I've got Morris Chart work