Category "django"

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

How to get the param PK in django restframework permission?

I have this permission in Django that look like this: class PermissionName(BasePermission): def has_object_permission(self, request, view, obj):

Wagtail/Django: How to pass a Page model object as a default value for a streamfield block?

How can I pass the user selected value for background_color object that is in my PostPage Page class as the default value for another ColorField that's within m

Django profile picture does not upload

This question was asked I don't know how much but it doesn't give my answers The app I was gonna make is a little blog webapp from a tutorial (for some training

Directly send money from my Stripe account to my customers bank accounts

I'm looking for functionality to make direct payments to my Stripe Customers bank accounts without Stripe Connect. Is it actually possible to do? Do I have to u

I am making a website using django and tailwind css. But in Cpanel I am getting this command error of Node Js path. Any suggestions what I can do?

CommandError: It looks like node.js and/or npm is not installed or cannot be found. Visit https://nodejs.org to download and install node.js for your system. If

Model object attribute not change without assign to variable

I try here to change title but this not work. but when assign object to variable, change works. I need any one explain why it work when I assign object to va

Is there a switch to store the Wagtail RichTextBlock content to database in UTF-8?

I am new in Django and Wagtail. I developed a website app using Django 4.0 and Wagtail 2.16.1. I found Django models.CharField by default stores content to data

Django / How to evaluate a django variable inside a bracket expression?

In my html file I need to define a variable for a js file. <script> var gltf_home = "{% static '/3d/ {{ scene.GltfFileToLoad }} ' %}"; </script> w

Why do i have to restart the Django server every time I make some changes in views?

I am new to Django and every time I make a change in veiws.py or urls.py I have to run python manange.py run server. This is hectic as for every small change I

ModuleNotFoundError: No module named '_tkinter' Heroku

I am trying to deploy a webapp using Heroku and it get deployed but it gives internal server error when I try to open it. The complete log as from heroku logs -

Django SQL Server studio backend doesn't support altering from/to AutoField

Please help me I tried to connect to the database The connection was successful and the rules were lifted, but I have this problem raise NotImplementedError("t

Unable to import djstripe.models to views.py

All the migrations have been successful and all the models and tables have been imported successfully by running below command: python3 manage.py djstripe_sync_

How can I add tailwind css to an existing django app

I already have a Django project with many apps and one of them is demo_app. I have some views and templates added to the demo app but I want to start using tail

Djongo migrate models cons

Its's nice to see mongodb is connected with django but doesn't support completely. I explain why so because when you install any third party packages to your pr