django-pipeline | Pipeline is an asset packaging library for Django | Build Tool library
kandi X-RAY | django-pipeline Summary
kandi X-RAY | django-pipeline Summary
Pipeline is an asset packaging library for Django.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Collect files from the source storage
- Delete a file from the storage
- Copy a file from source storage
- Return the modified time of the given path
- Compiles given files
- Check if infile is older than outfile
- Return a dict of all CSS files
- Returns the source files for the given media_packages
- Yields gzipped files
- Compress the original file
- List of available sources
- Render the CSS file
- Compile a Sass file
- Render javascript files
- Compile a source file
- Compile a STYLUS file
- Render a JavaScript package
- Render CSS for a package
- Render multiple JS files
- Compress a JS file
- Compile a file
- Get js files
- Compress css file
- Compress javascript files
- Render this node
- Concatenate CSS files
django-pipeline Key Features
django-pipeline Examples and Code Snippets
npm install -g rapydscript
'pipeline_rapydscript',
PIPELINE_COMPILERS = (
'pipeline_rapydscript.RapydScriptCompiler',
)
PIPELINE_RAPYD_SCRIPT_ARGUMENTS="--omit-baselib""
PIPELINE_COMPILERS = (
'pipeline_typescript.compilers.TypescriptCompiler',
)
import os
path = os.path.join("parent", "child")
from django.contrib.staticfiles.storage import
ManifestStaticFilesStorage from django.conf import settings
class KoganManifestStaticFilesStorage(ManifestStaticFilesStorage):
def read_manifest(self):
"""
Looks up stati
rm ~/.local/lib/python3.5/site-packages/[Package name].egg-link
SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.social_user',
'social_core.pipeline.user.get_username',
'socia
pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin --install-option="--without-c-extensions"
pip install django-compressor --upgrade
@import 'foundation-sites/scss/settings/_settings.scss';
@import 'foundation-sites/scss/foundation.scss';
@include foundation-everything;
Community Discussions
Trending Discussions on django-pipeline
QUESTION
Never worked with django-rq
, redis
. The problem should be solved easily, I think, but I do not know how.
When I start the server, I get this error ImportError: cannot import name get_failed_queue
I'm use Python 2.7
Full Traceback
...ANSWER
Answered 2019-Jun-13 at 03:05This happens because you use django-rq==2.0
that requires rq>=1.0
. The function get_failed_queue()
does not exist in rq==1.0 anymore, read the release notes to learn how to change your code to make it work again: https://github.com/rq/rq/releases/tag/v1.0
Otherwise, you can just downgrade to django-rq==1.3.1 and rq==0.13
QUESTION
I'm working on a Django project with some amount of front-end JavaScript code. I'm in the process of migrating the JavaScript packaging and minification from djanog-pipeline to webpack with django-webpack-loader.
django-webpack-loader works by running webpack separate from any Django processes to generate packed bundles. django-webpack-loader will then read a JSON file written by webpack-bundle-tracker and use the information to insert the correct paths into HTML templates.
This works flawlessly but there is one catch: Some of our unit tests will access the Django application using the integrated Django test client, which renders full HTML responses so that tests can inspect the generated result. Test may be run without any webpack-related setup having been done. So the packed bundles and JSON file may not exist. These are not necessary for the purpose of testing the frontend code, only the dynamically generated HTML is inspected. Having test fail just because someone forgot to run webpack leads to frustration.
Ideally, I would have django-webpack-loader just use dummy URLs in the inserted
ANSWER
Answered 2018-Feb-16 at 03:03You can patch the loader altogether to bypass anything that django-webpack-loader might do:
QUESTION
I have an issue with django-ckeditor
, I'm using it with django-pipeline
, everything it's ok when is run locally, but if DEBUG=False
the ckeditor.js used is the compressed one and fails.
This is the issue I get from the developer tools in chrome when I load the admin to render a field that use django-ckeditor
...ANSWER
Answered 2018-Oct-05 at 09:47You were on the right track as explained here: https://github.com/django-ckeditor/django-ckeditor/blob/master/README.rst#id2
You need to place JS assets in the right order in your Django template.
The following solved it for me:
QUESTION
I've been tasked with converting the static asset management for a Django project to webpack (it currently uses django pipeline).
I got the JavaScript done no problem, then moved onto the SASS files, using sass-loader, which to my horror seems to want to convert the CSS into JavaScript, which is apparently a thing these days.
Questions:
- Why would I want to do this?
- Is it worthwhile doing on a django project?
- What needs to change in the HTML templates for this to work?
- Are there any Django plugins which help with this?
EDIT:
Apparently it is css-loader
which converts .css to js not sass-loader
, but if I comment that out like below:
ANSWER
Answered 2018-Sep-12 at 07:50I believe it is css-loader
which converts .css
to js
not sass-loader
. Check first three lines in sass-loader readme.
I'm frontend developer so I can answer only for your first question:
Why convert
css
tojs
?you can use relative path (otherwise you have to keep in mind how your project will be structured after compilation).
you can import name of classes and attach hash to it. In such case you can reuse class names such
.box
.container
etc. without fear to mess something in your styles because in compiled version they would look like.box-h12f2
from one file and.box-aeg2
from another.- you can import values from your css to js. Some libraries can customize colors, but they do it inside js. Usually you want to have single source of truth, in order to change styles easily in one place for whole project.
try this config (with src/styles.scss file)
QUESTION
I'm migrating a project to python on docker for a better "facility" for development. Ut's a project that runs with python 2.7, Django 1.6.8 and several RPC dependencies
I find myself with a crash of the application with this stacktrace that I can't find the missing module (No module named coros).
I'm thinking it should either be an addiction problem related to a version that is not good or an addiction installed on the default bone but not on the docker bone. Do you have any ideas or suggestions to correct this problem?
My Dockerfile
...ANSWER
Answered 2018-Sep-04 at 13:35The traceback shows that zerorpc
0.4.4 is trying to import gevent.coreos
, which was removed in gevent 1.2.
Eventually, you want to upgrade zerorpc
to a newer version that doesn't try to import gevent.coreos
, but that may require further dependency/code changes.
A more minimal change would be to try installing gevent<1.2
instead.
QUESTION
I have recently added npm to my project in order to keep better track of my js dependencies. Previously I have just been git cloning to my static/vendor folder.
I've also added gulp , but have only got it doing hello world things right now. It seems simple enough - it can watch files, minify assets, compile Sass. Eventually I will probably switch to Webpack, but gulp is simple and working for now. I don't want to use django-compressor or django-pipeline.
So let's say I run npm install vis
to pull in visjs. It gets added to node_modules
and a record is added to package.json
dependencies.
A) Do I reference vis/dist right where it is in node_mods in my template scripts?
...ANSWER
Answered 2018-Jul-13 at 15:37STATICFILES_DIRS
tells Django where to find all the static assets (which will later be "collected" for a deployment, but we can ignore that for the moment). That setting will need to include wherever you have gulp
placing the processed assets, or you can have gulp put them into $BASE_DIR/static
to avoid changing your setting if you prefer.
From there, you should be using the static
templatetag
QUESTION
I'm trying to add a social media authentication to a website using Social-auth-app-django.
So I've created different apps for the most popular social media websites (Facebook, Twitter, Google+), and have set the callback url there.
But I'm coming across an error when I'm redirected back to the website from say Facebook:
...ANSWER
Answered 2017-Aug-06 at 14:43This error raises when trying to get a slice from a dict object. So, yes at the point of the last line of the traceback, pipelines
is a dict object when it is supposed to be a sequence which default value is sociel_core.pipeline.DEFAULT_AUTH_PIPELINE
unless your settings provides a PIPELINE
object.
Thus I suspect something probably in your settings module that messes this PIPELINE that should be a sequence (list, tuple, custom) and not a dict.
Hints: install ipython
and play with python manage.py shell
and inspect the followings.
QUESTION
I've followed django-pipeline docs and I am having an issue when collecting static, the console shows that the specified file is not found.
collectstatic works without djanog-pipeline. I also tried to add static file at the same level as manage.py
didn't make any difference...
Here's how my app tree is configured :
...ANSWER
Answered 2017-Aug-04 at 15:13I ended up using django-compressor and django-sass-processor. Which works like django-pipeline, I couldn't find the reason of this specific issue, but everything worked out with these other packages that does nearly the same thing as pipeline when combined.
If you have trouble installing django-compressor wiith pip try with these commands :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install django-pipeline
You can use django-pipeline like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page