Category "django"

Django SASS processor does not update CSS files in production

I am using django-sass-processor (https://github.com/jrief/django-sass-processor) in order to generate .css from .scss files. The css wiles were generated on th

Create an account from django-admin

In my CRM, the owner of the company gives the first password and email for new employees. Employee can change them later (I don't need to show them in admin, wh

Django update bootstrap modal not updating untill refresh

Django bootstrap modal form works when i create new data gets populated and pop up closes automatically without refresh but when updating success message appear

MySQL 8.0.27 not accepting django check constraints

I have seen a 2 years old similar question to this but the question did not specify the MySQL version and there is no answers to the question. I'm use the djang

no such file libmariadb.3.dylib error when importing MySQLdb on mac M1

I migrated my data to M1 Monterey MacOS from intel macmini. I was happy to use django and mariadb until I installed a package using homebrew. I installed homebr

Pyscript in Django application

I am wondering if we could use pyscript on HTML pages inside a Django project. I'd tried to use it but unfortunately, it doesn't work. this is the code : <he

Trying to hide django secret key, but getting error when deploying in PythonAnywhere

I'm trying to deploy a django project. I hid the secret key putting it in a file called .env and added it to .gitignore, so I have django's secret key only loca

How do I preserve search result in Django pagination

I am new to Django and I have develop form with Country and State field from the Profile Model. If I search for country and a particular state, I want a list of

How to request to Gunicorn and respond with Daphne? Using Django channels, Nginx, Gunicorn, Daphne

I'm facing a strange issue in deploying Django app with Nginx, Daphne and Gunicorn. As of now, I have successfully deployed my Django app. My HTTP requests are

Django Migration from Github actions

Hello I have a database in Google Cloud Platform and I am trying to figure out how to run a django migration from github actions once I have deployed my app to

Django converting isoformat string datetime to tuple and rising error

I'm trying to update two datetimefields for the Skill entity in my db. I'm sure I'm passing an isoformat datetime string. When creating instead of updating ever

Trying to Upload database file using python requests and sending to django API

Hi I have a database file. I want to send this database file via python requests post method to my django server and store this database file somewhere in my se

Django Github CI cannot connect to mysql 'db'

Issue When trying to setup a Github action to test a Django project automatically, we ran into an issue with the django.yml setup. Whenever we ran the .yml, we

Django Github CI cannot connect to mysql 'db'

Issue When trying to setup a Github action to test a Django project automatically, we ran into an issue with the django.yml setup. Whenever we ran the .yml, we

In Python how can I overwrite the class attribute of an inherited class, where that attribute is itself an instance of a model?

As in the title, I have a base class ListView, with a Serializer attribute that needs overwriting. For each of my django models I create a child ListView class

Intercept specific function invocations using parent/child classes?

I am writing a framework that allows us to intercept certain function invocations so that we can manage them(enforce timeouts and retries, persist return

Django multiple distinct values queryset for SQLDB

I'm trying to get a list of results that have distinct x and y values, but I also want to return color along with them. Since I'm using an SQLDB I'm not allowed

API view returning { "detail": "Not found." },

class User(models.Model): user_id = models.CharField(max_length=255, unique=True) mobile = models.CharField(max_length=12) first_name = models.CharF

Custom field with special constrains in DRF serializer

I'm trying to add a custom field with some special constrains in DRF serializer. Following are 2 sample models: class ModelA(models.Model): field1 = models.

How to remove extra puncuation marks during saving forms data in django?

when ever i add data to the form i got extra puncuation marks in the value as shown in the image. for example - name = xyz while saving i get name = ('xyz',) Th