torchbox/wagtail — pull request #28 by spapas (2014-02-11 08:22:09+00:00)
Title: Fixes for embedly

This PR contains two fixes for embedly integration:

a. When the user was trying to embed something and ``EMBEDLY_KEY`` was not set a 500 error would be thrown in the ajax call so no error would be presented to the user. The PR adds a check to warn the user when he tries to add an embed without the ``EMBEDLY_KEY``. This addresses issue #26.

b. After that I tried to embedding some things but found out that the return object of ``oembed = client.oembed(...)`` did not an object-like interface for its attributes but a dictionary like one. So, ``oembed.error`` (and similarly ``oembed.url``, ``oembed.type``, etc) was throwing an exception. This was changed to dictionary-like access.