How to collect Django static files with the same name?

PythonAnywhere

Three of my Django apps have static files with the same name app1/static/css/mycss.css, app2/static/css/mycss.css, app3/static/css/mycss.css. How do I collect them all to STATIC_ROOT since default behavior of DJango is to collect only the first one encountered among the same named static file?

e4c5

If you don't want the static files to be getting in each others way, give them their own name space by creating a suitable folder structure. Example

app1/static/css/app1/mycss.css
app2/static/css/app2/mycss.css

Alternatively if you want to combine all the CSS into one big CSS look into django-compressor

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Django and/or Apache: serve (static) files with a different name

From Dev

Is it ok to define static inline function with same name in different files?

From Dev

django-compressor writing new files in collect_static/CACHE on every request

From Dev

docker, nginx, django and how to serve static files

From Dev

How to fetch static CSS files with django on IIS?

From Dev

Dockerized Nginx and Django, how to serve static files

From Dev

How to solve 404 for static files with Django and Nginx?

From Dev

How to post Django static files in production

From Dev

How to serve the Django static files using ShimmerCat?

From Dev

How to solve 404 for static files with Django and Nginx?

From Dev

Dockerized Nginx and Django, how to serve static files

From Dev

How to configure static files in Django app for Heroku?

From Dev

How to configure lighttpd to serve django static files?

From Dev

How does collect static work?

From Dev

How to detect files with the same name but different extensions?

From Dev

how to remove files with the same name in clearcase

From Dev

How to detect files with the same name but different extensions?

From Dev

how to remove files with the same name in clearcase

From Dev

How to rename files with same name as parent folder

From Dev

Django Heroku collect static configuration error

From Dev

Collect variables with the same name pattern in VIM

From Dev

Django serving static files

From Dev

django not serving static files

From Dev

Django static files on heroku

From Dev

Static files on OpenShift Django

From Dev

Static files in Django 1.6

From Dev

Django Server Static files

From Dev

Django, trouble with static files

From Dev

Django: static files not found

Related Related

HotTag

Archive