Questions tagged [django-pipeline]

An asset packaging library for Django

Django Pipeline is an asset packaging library for Django, providing both CSS and JavaScript concatenation and compression, built-in JavaScript template support, and optional data-URI image and font embedding.

110 questions
3
votes
0 answers

Django functional test: selenium 'live_server_url' doesn't load static files

I'm using django-pipeline for loading static files. Strange thing is that StaticLiveServerTestCase's live_server_url can not load static files correctly. Here is part of code: class ProductSetupTestCase(TestCase): @classmethod def…
user3595632
  • 5,380
  • 10
  • 55
  • 111
3
votes
0 answers

How can I deal with image file with django-pipeline?

I use django-pipeline to deal with css, javascript files in my Django projects. But I wonder how I could deal with image files using django-pipeline. There is no manual for image in docs. Should I use Django built-in {% load staticfiles%} for…
user3595632
  • 5,380
  • 10
  • 55
  • 111
3
votes
1 answer

How to call django-pipeline compressor with jinja2 templates

I wish to compress the JS and CSS in my Jinja2 based Python project for Google App engine. I have installed django-pipeline, and added it to my project path. Some of the documentation is not clear to me. Particularly Jinja2 usage. For Django…
intotecho
  • 4,925
  • 3
  • 39
  • 54
3
votes
1 answer

Django-pipeline 'compressed' is not a valid tag library: ImportError raised loading pipeline.templatetags.compressed: No module named conf

I'm getting this error and I have no clue why suddenly I'm having issue with django-pipeline. I'm running the project under a virtualenv and I've tried to create a new one with the basic app required to see if it would fix it but I always get this…
Yannick
  • 3,553
  • 9
  • 43
  • 60
3
votes
1 answer

Is there a way to prevent django-pipeline from creating new jsx files every time it compiles react.js code?

I currently have the PyReact JSX compiler installed using django-pipeline. Whenever I run collectstatic on my files, rather than overwriting a prior version of my react .jsx and compiled .js files, it creates a new version in the same folder. Is…
YPCrumble
  • 26,610
  • 23
  • 107
  • 172
3
votes
2 answers

Django pipeline doesn't load assets

I've followed this tutorial to make a sample project. The structure of the files is: - mysite - mysite - __init__.py - settings.py - urls.py - wsgi.py - polls - migrations - templates …
masoud
  • 55,379
  • 16
  • 141
  • 208
3
votes
2 answers

Django-pipeline is not been able to access a file. Access Denied Error

I am using Django-pipeline for asset minification and compression but there seems to be an error when I try to run ./manage collectstatic I get the following error.. django.core.exceptions.SuspiciousFileOperation: Attempted access to…
Mahammad Adil Azeem
  • 9,112
  • 13
  • 57
  • 84
3
votes
2 answers

Django Pipeline compiler not working

I'm trying to get django-pipeline working locally on Windows. When I run collecstatic or runserver and go to the site, I get the following error: NotADirectoryError at / [WinError 267] The directory name is invalid On the site it happens when {%…
Tom Carrick
  • 6,349
  • 13
  • 54
  • 78
3
votes
1 answer

django pipeline breaks admin when DEBUG=False

here is the settings for css PIPELINE_CSS = { 'base': { 'source_filenames': ( 'scss/core.scss', ), 'output_filename': 'css/min.css', }, 'ie8': { 'source_filenames': ( …
James Lin
  • 25,028
  • 36
  • 133
  • 233
3
votes
2 answers

Strange Issue When Minifying CSS via django-pipeline

I'm using django-pipeline to minify my CSS. Everything minifies correctly until I use PipelineCachedStorage so I can get the versioned, cache-busting filenames. I get the following error: ValueError: The file 'img/glyphicons-halflings.png' could not…
threejeez
  • 2,314
  • 6
  • 30
  • 51
3
votes
1 answer

Django pipeline generates empty files

I've got several apps in my django project and I'm using pipeline to compress files and all works fine, but I have an app called "mypage" for which every file generated after calling collectstatic is empty! (if I copy a file from mypage/static into…
daveoncode
  • 18,900
  • 15
  • 104
  • 159
3
votes
1 answer

Assigning Backbone templates using Django pipeline similar to Rails JST?

I'm building a large scale Backbone Marionette app on top of Django utilizing the Django asset pipeline to compile all of the assets. Right now, I am saving my Handlebars templates as JS strings in the app object like so: App.Templates.Header =…
Will Hitchcock
  • 4,648
  • 3
  • 22
  • 32
2
votes
2 answers

How to install Node Packages for an Elastic Beanstalk Python 3.7 Project Running on 64bit Amazon Linux 2?

I am using a Django package named django-pipeline to compress js and css files. When I deploy my project, I run Django's collectstatic command, from .ebextensions folder: 01_django.config: container_commands: ... 07_collectstatic: …
2
votes
1 answer

How do I point to Node in a dockerized Django project using django-pipeline?

I'm trying to add django-pipeline to a dockerized Django 3.1 project. However, when I run collectstatic I receive the following error: pipeline.exceptions.CompressorError: b'/usr/bin/env: \xe2\x80\x98node\xe2\x80\x99: No such file or…
Nathan_James
  • 139
  • 2
  • 9
2
votes
0 answers

404 on django pipeline staticfiles when using multiple deployments with different app versions

I have two different websites that run the same app but they may differ a bit in their versions. The problem I am encountering is when I deploy one site, if the version hash changes, the other site breaks as well. It looks to me like the hashes are…
wonton
  • 7,568
  • 9
  • 56
  • 93