Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#16719 closed New feature (needsinfo)

Support for symlinking to whole app directories for staticfiles

Reported by: mitar Owned by: nobody
Component: contrib.staticfiles Version: 1.3
Severity: Normal Keywords:
Cc: mmitar@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be useful to support also symlinking whole (top) app static directories and not just every and each file, with collectstatic manage command. In this way it would not be necessary to rerun the manage command every time you add some files to the app.

Change History (2)

comment:1 Changed 4 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to needsinfo
  • Status changed from new to closed

I'm having a hard time understanding how this could work.

Let's say I have two apps, foo and bar, and the following directory structure:

bar/
    models.py
    static/
        css/
            bar.css
        js/
            foobar.js
    views.py
foo/
    models.py
    static/
        css/
            foo.css
        js/
            foobar.js
    views.py
manage.py
settings.py
urls.py

The expected result of collectstatic is:

static/
    css/
        bar.css
        foo.css
    js/
        foobar.js # from foo or bar, depending on the order in INSTALLED_APPS

How do you achieve this result with symlinks to directories only?

comment:2 Changed 4 years ago by mitar

Hm, you are right. ;-)

Note: See TracTickets for help on using tickets.
Back to Top