mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 01:03:11 +00:00
A Django content management system focused on flexibility and user experience
This is a first version of Wagtail wit support for image processing backends. A first refactoring of image processing code has been done, moving the image processing code to the wagtailimages/backends package and changing models.py (more specifically, the process_image method of Filter model) to use the code there. The backends package contains the __init__.py module which defines the get_image_backend method that will get the correct image backend based on the passe parameer (or default if not parameer is passed) and the WAGTAILIMAGES_BACKENDS option. The code is copie with small modifications from similar code in wagtailsearch/backends package. Concerning the backends, a BaseImageBackend is defined in the base module. This interface defines a number of methods that the backends inheriting from it should implement. The only methods that need to be implemented is open_image, save_image, resize and crop_to_centre. The other methods are more or less the same (if the image object provides a size attribute). The two backends, wand_backend and pillow_backend provide implementations for Pillow and Wand. Both seem to be working but Wand needs some more testing. To be able to wand, we have to install Wand + ImageMagick. Follow the instructions here: http://docs.wand-py.org/en/0.3.5/guide/install.html. Things to do next: a. Check again the API that BaseImageBackend exposes -- it's not very intuitive and some things should be more DRY b. Find out a method of choosing the backend from the outside world - we may have an Image class that we want to render with Wand and another class that we want to render with Pillow. c. Assert that crop_to_centre method works fine also. d. Check resize filters of Wand (Imagemagick) e. Make tests pass with both Pillow and Wand backends |
||
|---|---|---|
| .tx | ||
| docs | ||
| scripts/install | ||
| wagtail | ||
| .coveragerc | ||
| .gitignore | ||
| .travis.yml | ||
| CHANGELOG.txt | ||
| CONTRIBUTORS.rst | ||
| LICENSE | ||
| Makefile | ||
| MANIFEST.in | ||
| README.rst | ||
| requirements-dev.txt | ||
| runtests.py | ||
| setup.py | ||
.. image:: https://travis-ci.org/torchbox/wagtail.png?branch=master
:target: https://travis-ci.org/torchbox/wagtail
.. image:: https://coveralls.io/repos/torchbox/wagtail/badge.png?branch=master
:target: https://coveralls.io/r/torchbox/wagtail?branch=master
.. image:: https://pypip.in/v/wagtail/badge.png
:target: https://crate.io/packages/wagtail/
Wagtail CMS
===========
.. image:: http://i.imgur.com/4pbWQ35.png
Wagtail is a Django content management system built originally for the `Royal College of Art <http://www.rca.ac.uk/>`_ and focused on flexibility and user experience. Its features include:
* A fast, attractive editor interface
* Complete control over design with standard Django templates
* Configure content types through standard Django models
* Tightly integrated search (with an `Elasticsearch <http://www.elasticsearch.org/>`_ backend for production)
* Strong document and image management
* Wide support for embedded content
* Simple, configurable permissions
* Support for tree-based content organisation
* Optional preview->submit->approve workflow
* Fast out of the box. `Varnish <https://www.varnish-cache.org/>`_-friendly if you need it
* Tests! But not enough; we're working hard to improve this
Find out more at `wagtail.io <http://wagtail.io/>`_. Documentation is at `wagtail.readthedocs.org <http://wagtail.readthedocs.org/>`_.
Got a question? Ask it on our `Google Group <https://groups.google.com/forum/#!forum/wagtail>`_.
Getting started
~~~~~~~~~~~~~~~
To get you up and running quickly, we've provided a demonstration site with all the configuration in place, at `github.com/torchbox/wagtaildemo <https://github.com/torchbox/wagtaildemo/>`_; see the `README <https://github.com/torchbox/wagtaildemo/blob/master/README.md>`_ for installation instructions. `Serafeim Papastefanos <https://github.com/spapas>`_ has written a `tutorial <http://spapas.github.io/2014/02/13/wagtail-tutorial/>`_ with all the steps to build a simple Wagtail site from scratch.
Contributing
~~~~~~~~~~~~
If you're a Python or Django developer, fork the repo and get stuck in! Send us a useful pull request and we'll post you a `t-shirt <https://twitter.com/WagtailCMS/status/432166799464210432/photo/1>`_. Our immediate priorities are better docs, more tests, internationalisation and localisation.