question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

move css/js files into static/unicorn/ folder

See original GitHub issue

I recently discovered as I deployed a project using Unicorn that manage.py collectstatic puts the static files of Unicorn into global css and js folder within static/ (meaning the configured static files directory of Django). Django itself (e.g. the admin app) uses a structure similar to the recommended templates examples in the tutorial: use the app name as namespace. Unicorn e.g. has a few svg/oval.svg[.gz] files which get copied into static/svg/oval.svg. Same with js files. If any app uses another “utils.js” file, I suppose Django gets a problem…

This could be easily solved by putting files into an 'unicorn/namespace folder withinstatic/`

This would make bigger installations easier. What do you say about that, @adamghill ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
adamghillcommented, Jul 10, 2021

Makes sense and works for me. I’ll update it to be unicorn. 👍

0reactions
nerdoccommented, Jul 10, 2021

Ah, OK. But if so. uses Unicorn AND names his own app ‘unicorn’, that:s either intended to use the same namespace, or by mistake IMHO. Unicorn by definition uses that namespace 😃 In your case, couldn’t it be a possible solution to name your app <something>_unicorn?

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS file not working unless I move the whole folder/project to ...
I have a basic webpage/JavaScript example and the CSS doesn't apply to the project unless I move the entire project from (approx 5 ......
Read more >
3.4 Move Your Code to .html, .css, .js files - E-education.psu.edu
When building apps, a convention that many developers follow is to create a folder on the web server for their site/app and into...
Read more >
Static Files with Express HTML, CSS, JavaScript #2 - YouTube
Interested in supporting this channel? Please use this link https://bit.ly/2Lfuf46Node.js: ...
Read more >
Problem with HTML Template pages breaking when they are ...
I moved some html files that were created from the Daylight HTML Template pages to a new folder​ in Manage Files and it...
Read more >
CSSJS folder gets too big - WordPress.org
... I need to purge caches manually every second day otherwise the cssjs folder ... I checked your site, didn't see any new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found