Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOAD_PATH equivalent and separation of assets #7

Open
fgimian opened this issue Jan 15, 2013 · 0 comments
Open

LOAD_PATH equivalent and separation of assets #7

fgimian opened this issue Jan 15, 2013 · 0 comments

Comments

@fgimian
Copy link

fgimian commented Jan 15, 2013

Hello there,

I have noticed a problem and limitation with django-assets which I'm hoping you can help me with.

Limitation: I would like to store my assets in an "assets" directory and generate output in the usual STATIC_ROOT directory. With flask-assets, this could be done by using the ASSETS_LOAD_PATH config item, is there a way to do this with Django?

Problem: The collectstatic command also collects the original asset source code into my final static directory. Django Compressor uses the following workaround to prevent this:

from compressor.utils import staticfiles
from compressor.storage import CompressorFileStorage


class CompressorFinder(staticfiles.finders.BaseStorageFinder):
    """
    A staticfiles finder that looks in COMPRESS_ROOT
    for compressed files, to be used during development
    with staticfiles development file server or during
    deployment.
    """
    storage = CompressorFileStorage

    def list(self, ignore_patterns):
        return []

An empty list is returned for the list command.

Please let me know your thoughts :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant