Category "django"

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

Pytest hangs indefinitely running tests after Selenium image update

A day ago selenium updated their standalone-images (https://hub.docker.com/search?q=selenium&type=image) and at the same time selenium 4.0.0 was released on

Problem upgrading django 2.2.27 to 2.2.28 on Mac

I have a Django application that I'm trying to upgrade the django module from 2.2.27 to 2.2.28 to close a SQL injection attack vector. I'm running this on a rec

Images from database not displaying in Heroku Django after hosting

I have few images in my SQLite database which I will be changing from admin panel over a period of time. I have hosted the django app in heorku(free service). A

How to setup Django permissions to be specific to a certain model's instances?

Please consider a simple Django app containing a central model called Project. Other resources of this app are always tied to a specific Project. Exemplary code

Want to send extra data from BasePermission to Queryset in ModelVIewSet DRF

Here is My Seller Model which has User as OneToOneField #models.py . . class CompanyProfile(models.Model): user = models.OneToOneField(User, on_delete=mode

Django Admin Page not found when including MEDIA_ROOT setting

this is my first question so please point me to the right direction in case I miss something of importance ☺️ So my problem is the following: I'm c

Django: After updating a template, the changes are not reflected upon refreshing the page in the browser

I am testing a class based view in my Django application. I am currently in development, so I want to see changes in the browser as soon as I make any change in

How do I filter models from the Django admin sidebar while keeping them on their children's change page form?

I have a setup that looks like this: Because 'Charities' and 'Interventions' aren't meant to be edited except from the Evaluations and Max Impact Fund Grants p

What is wrong with this inkscape extension?

I am not a programmer. I used to use an inkscape extension that was designed to change the path in inkscape to Gcode. Recently this extension stopped working gi

Django uses untranslated strings instead of translations

I have a small Django application, which I tried to localize. In the urls.py I have urlpatterns += i18n_patterns( path('add_request/',AddRequest.as_view(),name=