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

No static file generated by django-pipeline #814

Open
ychenbioinfo opened this issue Jul 2, 2024 · 1 comment
Open

No static file generated by django-pipeline #814

ychenbioinfo opened this issue Jul 2, 2024 · 1 comment

Comments

@ychenbioinfo
Copy link

Hi,
I am having issues using Django-pipeline in my project. I am using Django 5.0.6 with Python 3.12.4. Here are my settings for django-pipeline

STATIC_URL = 'static/'

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, "static")
]

STATIC_ROOT = os.path.join(BASE_DIR, 'static_final')

STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'pipeline.finders.PipelineFinder',
)

PIPELINE = {
    'PIPELINE_ENABLED': True,
    'JAVASCRIPT': {
        'js_files': {
            'source_filenames': (
              'static/js/marula-main.js'
            ),
            'output_filename': 'js/main.js',
        }
    },
    'YUGLIFY_BINARY': os.path.join(BASE_DIR, 'node_modules/.bin/yuglify')
}

And I used it in the scripts.html

{% load static %}
{% load pipeline %}

<!-- Bootstrap core JavaScript-->
<script src="{% static 'vendor/jquery/jquery.min.js' %}"></script>
<script src="{% static 'vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>

<!-- Core plugin JavaScript-->
<script src="{% static 'vendor/jquery-easing/jquery.easing.min.js' %}"></script>

<!-- Custom scripts for all pages-->
{% javascript 'js_files' %}

And there is no main.js file generated, and I got "GET /static/js/main.js HTTP/1.1" 404.

Thanks for the help in advance.

Alvin

@chrisspen
Copy link

I'm having this issue too. Everything's being collected into my project's ./static folder, but they're just simply copied from the app folders. None of the compressed/collected files are being generated.

Started happening after I upgraded to Django 5, so might be a bug related to that.

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

2 participants