Code Monkey home page Code Monkey logo

barbeque's People

Contributors

deluge avatar entequak avatar lenarother avatar randomknowledge avatar stephrdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

barbeque's Issues

Add cropping with gravity

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'

Template-Tag `hashed_staticfile`

We need the templatetag {% hashed_staticfile 'path/to/static/file.css' %} to get the path to a staticfile including cachebuster.

Test Helper to init session in TestClient

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

Anylink CmsPageLink extension is not using site domain

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.

Command classes should have a flag to ignore stderr

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)

exporter error

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

django-cms compatibility issue

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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.