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

Files Not Found (dupe of #699) #763

Open
millerthegorilla opened this issue Dec 19, 2021 · 7 comments
Open

Files Not Found (dupe of #699) #763

millerthegorilla opened this issue Dec 19, 2021 · 7 comments
Labels
awaiting response bug Bug confirmed or can be reproduced

Comments

@millerthegorilla
Copy link

Hi, I am using django-pipeline with django 3.2. Although the assets are being minified and output to the correct location, the template tag generated script tag wrapped location is generating a 404.

After reading #699 I edited the pipeline/finders.py file to always return a call to the superclass, and the 404 errors disappeared.

Is there something I am misconfiguring (I copied the docs word for word)?

@Pyvonix
Copy link

Pyvonix commented Jan 6, 2022

Hi @millerthegorilla,

To be able to help you would it be possible to provide:

  • django-pipeline configuration in your settings.py
  • the tag(s) generated in your template
  • your directory listing of your static folder(s)

@millerthegorilla
Copy link
Author

Hi, I hope this is ok.

django-pipeline configuration in your settings.py

#django-pipeline
STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'pipeline.finders.PipelineFinder',
)

PIPELINE = {
    'PIPELINE_ENABLED': True,
    'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
    'JAVASCRIPT': {
        'django_artisan_carousel': {
            'source_filenames': (
              'django_artisan/js/carousel.js',
            ),
            'output_filename': 'django_artisan/js/carousel_min.js',
        },
        'django_artisan_image_loader': {
            'source_filenames': (
                'django_artisan/js/imageLoader.js',
            ),
            'output_filename': 'django_artisan/js/image_loader_min.js',
        },
        'django_forum': {
            'source_filenames': (
              'django_forum/js/*.js',
            ),
            'output_filename': 'js/django_forum.js',
        }
    }
}

the tag(s) generated in your template

<script type="text/javascript" src="/static/django_artisan/js/carousel_min.js" charset="utf-8"></script>

your directory listing of your static folder(s)

ls django_artisan/js
anchor.4c8e394e5e92.js    carousel.js                   imageLoader.1a8ddea2a496.js       image_loader_min.js
anchor.js                 carousel_min.f06309f5d68d.js  imageLoader.js                    profileUpdate.18e570e6bd98.js
carousel.a4a95be6644f.js  carousel_min.js               image_loader_min.775c48e9342f.js  profileUpdate.js

Thanks.

@millerthegorilla
Copy link
Author

@TheBuky can you suggest what I should do next? I have just bumped all my pip dependencies to the latest as I test my project with django-4.0 and I am having to use a fork of django-pipeline because of this issue. I would much rather use the jazzband than my fork.

@millerthegorilla
Copy link
Author

I can confirm that the fix for #699 works for me.

millerthegorilla referenced this issue in maykinmedia/django-pipeline Jun 8, 2022
@Pyvonix
Copy link

Pyvonix commented Aug 6, 2022

Sorry @millerthegorilla, I'm comeback after a while.

So you remove the not line 16 inside pipeline/finders.py? (I have to get back entirely in the code to understand and see if there are no edge effects)
Can we try to create a use case and his related unit test to be sure that kind of problem will not appear again?

@Pyvonix Pyvonix added the bug Bug confirmed or can be reproduced label Aug 6, 2022
@millerthegorilla
Copy link
Author

Thanks for getting back to me. I will check the code either today or tomorrow and confirm that I still have the same issue.

@millerthegorilla
Copy link
Author

Had a quick peek, and I am still using the form, but it looks like a direct copy of the jazzband repo, so I will look more closely when I am next at the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response bug Bug confirmed or can be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants