Commit graph

4112 commits

Author SHA1 Message Date
Serafeim Papastefanos
4cc53eb4c9 Refactor backend names to pillow and wand
This uses absolute_import and refactors the backend names to pillow &
wand. It changes tests to use these names and also modified the test
runner to not pass any parameters concerning the image backends since the
defaults are enough for tests. It also fixes a minor bug that was occured
when the image file had already been read (multiple renditions in a single
page)
2014-03-12 14:41:26 +02:00
Serafeim Papastefanos
a72a67d50c Remove image backends config from runtests.py
It is not needed since Pillow is the default and get_backend works with
full package name.
2014-03-12 14:11:13 +02:00
Serafeim Papastefanos
9eba6d9a3a Split tests to use Pillow and Wand backend 2014-03-12 12:39:44 +02:00
Serafeim Papastefanos
7911d46054 Remove not needed image_ops.py 2014-03-12 12:22:12 +02:00
Neal Todd
d3adc33453 Back to pip wand
Travis VM can't find the python-wand apt-package. But the VM does include ImageMagick automatically so see if this is enough or whether libmagickwand-dev apt package is needed for any other dependencies.
2014-03-12 10:17:40 +00:00
Neal Todd
66c35c1cca Apt installs do need to run with sudo 2014-03-12 10:06:34 +00:00
Neal Todd
8573dde60e Use python-wand apt package for testing
which includes all dependencies (e.g. ImageMagick)
2014-03-12 09:56:27 +00:00
Neal Todd
3c6f76af5e Bumping Django version to 1.6.2 and adding Wand package 2014-03-12 09:45:45 +00:00
Serafeim Papastefanos
2dd75ec601 Fix minor error with runtests.py 2014-03-12 10:16:05 +02:00
Serafeim Papastefanos
fca4ad2056 Make pillow the default backend 2014-03-11 23:07:10 +02:00
Serafeim Papastefanos
37b37a0707 Add tests for backends 2014-03-11 21:54:27 +02:00
Serafeim Papastefanos
8aeed6a16e Allow configurable image backend 2014-03-11 21:53:50 +02:00
Serafeim Papastefanos
1fe4f08866 Add test configuration for image backends 2014-03-11 21:49:10 +02:00
Serafeim Papastefanos
db65b22d5a Fix minor bug with crop 2014-03-11 19:49:01 +02:00
Tom Dyson
dc2147013a auto doc builder notes 2014-03-11 17:39:13 +00:00
Tom Dyson
71c78a53d6 Roadmap update and auto doc builder 2014-03-11 17:39:13 +00:00
Matt Westcott
7b7e1dfe17 prepare to release 0.2 2014-03-11 16:40:04 +00:00
Matt Westcott
affec1ea59 Merge branch 'master' of github.com:torchbox/wagtail 2014-03-11 13:06:50 +00:00
Matt Westcott
4c80816e82 Add rfosterslo as contributor 2014-03-11 13:06:26 +00:00
Matt Westcott
99887a83a2 Merge branch 'bpcp-fix' of https://github.com/rfosterslo/wagtail into rfosterslo-bpcp-fix 2014-03-11 13:01:23 +00:00
Tom Dyson
62d5e658d1 OS X installation instructions 2014-03-11 12:11:47 +00:00
Matt Westcott
7e6401dc2c Merge branch 'master' of github.com:torchbox/wagtail 2014-03-11 11:28:34 +00:00
Matt Westcott
126de02ede repair collateral damage from a hail of bullet points 2014-03-11 11:28:21 +00:00
Matt Westcott
80622c73d0 Specify Django 1.6 only in requirements (1.7 is going to require compatibility fixes) 2014-03-11 11:26:48 +00:00
Tom Dyson
9a08829e49 Roadmap page in docs 2014-03-11 11:20:26 +00:00
Tom Dyson
c67c51c5fc Better docs docs
Link to online rst editor.
2014-03-11 11:01:04 +00:00
Matt Westcott
b6dddc256e Merge pull request #137 from spapas/master
Add new translations & remove some stale message.mo files
2014-03-11 10:26:09 +00:00
Tom Dyson
8609361ed4 Docs docs
How to author and build Wagtail docs
2014-03-11 10:10:04 +00:00
Serafeim Papastefanos
11400e3df7 Add image processing backends
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
2014-03-11 00:21:00 +02:00
Serafeim Papastefanos
24b0712fc1 Use unidecode to improve image filenames (fix#136)
Image filenames containing non ascii characters would be translated to a
series of underscores (____.png). To fix this, we use the unidecoe library
(which we also add to the required packages for Wagtail) which translates
each unicode character to an ascii equivalent.

For more info on how unidecode works please check @Evgeny's answer at this
question:

http://stackoverflow.com/questions/702337/how-to-make-django-slugify-work-properly-with-unicode-strings
2014-03-10 17:17:57 +02:00
Serafeim Papastefanos
e50b0fc0bb Add new translations 2014-03-10 12:33:09 +02:00
Serafeim Papastefanos
eea23674bf Remove not needed messages.mo files from tree 2014-03-10 12:21:04 +02:00
rfosterslo
2c79a3db25 Fixed BasePageChooserPanel.render_js()
Addresses the "ForeignKey null=False" issue; new instances were throwing an exception, which prevented the edit handler from rendering the proper JavaScript in _editor_js.html.
2014-03-07 16:20:00 -08:00
Matt Westcott
7688763aa2 Merge branch 'master' of github.com:torchbox/wagtail 2014-03-07 17:27:13 +00:00
Matt Westcott
5e7571486b added changelog entry for 0.2 2014-03-07 17:27:07 +00:00
Dave Cranwell
9bc41a7b01 added icons to all interfaces where possible 2014-03-07 16:52:04 +00:00
Dave Cranwell
462ed39837 subtle usability updates and icons etc 2014-03-07 15:41:17 +00:00
Dave Cranwell
a2a06c116a Merge branch 'sass' 2014-03-07 12:28:54 +00:00
Dave Cranwell
e3e69638ae auto-focus on search boxes. activity spinner added 2014-03-07 12:27:34 +00:00
Dave Cranwell
9d5de6185a Merge branch 'sass' of github.com:torchbox/wagtail into sass 2014-03-07 11:22:58 +00:00
Tom Dyson
f1680169d4 Updated install docs
referencing Debian and Ubuntu one-liners and removing Less / npm
2014-03-06 16:30:33 +00:00
Tom Dyson
5df8eb5680 Ubuntu install now works on 13.04
Since removal of npm dependency.
2014-03-06 15:50:05 +00:00
Matt Westcott
0526428c1d Merge branch 'sass' 2014-03-06 14:20:08 +00:00
Matt Westcott
e5e3f000ad Remove all reference to less/npm in docs and install scripts 2014-03-05 20:05:26 +00:00
Matt Westcott
f8fae0d968 specify django-libsass as a dependency 2014-03-05 20:02:54 +00:00
Matt Westcott
f6645d4c5b Merge branch 'master' into sass 2014-03-05 19:53:27 +00:00
Neal Todd
cff1980891 Updating init.d script link now that it's in the repo. 2014-03-05 14:10:06 +00:00
Neal Todd
a19459e1b2 Updated ubuntu and adapted debian install scripts for Wagtail production configuration instance on a fresh box. Accompanying uwsgi init.d script for debian. npm/less to be removed and init.d script location to be updated. 2014-03-05 13:58:39 +00:00
Tom Dyson
5ef4f0b07a Updated Ubuntu version for installation script 2014-03-04 22:24:59 +00:00
Dave Cranwell
7cdd021ffd Merge branch 'master' into sass 2014-03-04 17:41:55 +00:00