Skip to content

No static file generated by django-pipeline #814

Open
@ychenbioinfo

Description

@ychenbioinfo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions