Home > OS >  django collectstatic without db connection?
django collectstatic without db connection?

Time:10-19

while I am running python manage.py collectstatic --no-input I am getting a DB connection issue. i want to collect statics without a DB connection to dockerize my Django app. with DB connection it's working fine.

CodePudding user response:

manage.py does not require a DB connection to work, are you write any check condition for connection in your models.py file?

please if you can shear the full error and model

CodePudding user response:

Unfortunately there is no way to prevent collectstatic from trying to access the database. Using a dummy database in certain situations could solve your problem. If this doesn't help you will probably have to implement it yourself.

Because collectstatic does additional work based on the STATICFILES_STORAGE.

  • Related