moccu / barbeque Goto Github PK
View Code? Open in Web Editor NEWCollection of tiny helpers and tools to make live easier.
License: BSD 3-Clause "New" or "Revised" License
Collection of tiny helpers and tools to make live easier.
License: BSD 3-Clause "New" or "Revised" License
barbeque.compressor.UglifyJSSourcemapCompressor
imports compressor.utils.stringformat
which has been removed from Compressor in version 2.0 (see django-compressor/django-compressor@53d3911 )
Instead of enabling cropping through the template tag {% ultimatethumb 'sourceset' image '320x400,400x500' crop=True %}
by setting crop=True
we need to optionally pass the gravitiy as string. See https://www.imagemagick.org/script/command-line-options.php#gravity for the possible values. The mapping could be the following:
crop=True
---> gravity='Center'
crop='C'
---> gravity='Center'
crop='N'
---> gravity='North'
crop='NW'
---> gravity='NorthWest'
crop='NE'
---> gravity='NorthEast'
crop='W'
---> gravity='West'
crop='E'
---> gravity='East'
crop='S'
---> gravity='South'
crop='SW'
---> gravity='SouthWest'
crop='SE'
---> gravity='SouthEast'
But I think we also need to support the imagemagick default values. So a full mapping can look like this:
crop=True
---> gravity='Center'
crop='C'
---> gravity='Center'
crop='N'
---> gravity='North'
crop='NW'
---> gravity='NorthWest'
crop='NE'
---> gravity='NorthEast'
crop='W'
---> gravity='West'
crop='E'
---> gravity='East'
crop='S'
---> gravity='South'
crop='SW'
---> gravity='SouthWest'
crop='SE'
---> gravity='SouthEast'
crop='Center'
---> gravity='Center'
crop='North'
---> gravity='North'
crop='NorthWest'
---> gravity='NorthWest'
crop='NorthEast'
---> gravity='NorthEast'
crop='West'
---> gravity='West'
crop='East'
---> gravity='East'
crop='South'
---> gravity='South'
crop='SouthWest'
---> gravity='SouthWest'
crop='SouthEast'
---> gravity='SouthEast'
Request for a templatetag to store the blocktrans value in a template context variable.
The mixin should not use visible_fields method, instead it should iterate over fields manually.
[field for field in self.fields.values() if not field.widget.is_hidden]
Please mention the dependency on openpyxl in the documentaion:
https://barbeque.readthedocs.io/en/latest/exporter.html
We need the templatetag {% hashed_staticfile 'path/to/static/file.css' %}
to get the path to a staticfile including cachebuster.
from django.conf import settings
from django.utils.importlib import import_module
def init_session(client, **kwargs):
engine = import_module(settings.SESSION_ENGINE)
store = engine.SessionStore()
store.update(kwargs)
store.save()
client.cookies[settings.SESSION_COOKIE_NAME] = store.session_key
return store
Using string.split leads to errors if an argument includes spaces.
Hi,
the CmsPageLink extension provides two additional fields: page, and anchor. One can use page the have more domains, but the resulting link is created based on the current domain and not the chosen page domain.
Some shell commands may return something on stderr which is not a real error. We need a flag to configure if output on stderr leads to CommandExecutionError or not. (fail_silently ignores both stderr and return code)
Hi!
When using action_export_factory for exporting xlsx one get:
module 'openpyxl.cell' has no attribute 'get_column_letter'
This is because of compatibility with the current version of openpyxl. barbeque requirements for exporter does not specify the version:
[exporter]
openpyxl
Error: The element label must not appear as a descendant of the label element.
https://github.com/moccu/barbeque/blob/master/barbeque/templates/barbeque/forms/row/default.html#L23
Replacing the first label for this widget in the row template with a div should solve this issue.
Currently, the default implementation returns something else.
Django~=1.11
django-cms~=3.4
django-anylink~=1.0
barbeque~=1.8
File "/Users/magdalenar/.virtualenvs/cookiecutter-legacy/lib/python3.5/site-packages/barbeque/anylink.py", line 5, in <module>
from cms.utils import get_cms_setting
ImportError: cannot import name 'get_cms_setting'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.