Django utils to render video and get the thumbnails
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
hooks
magicembed
.coverage
.gitignore
.travis.yml
AUTHORS
CHANGELOG.txt
DESCRIPTION
LICENSE
MANIFEST.in
Makefile
README.md
manage.py
requirements.txt
setup.cfg
setup.py
test_requirements.txt
tox.ini

README.md

PyPI version

Django Magic Embed

What is it?

Magic Embed is an easy and simple Django template tag and tool to embed video and get thumbnails from video providers.

Demo

You can see here the Magic Embed Demo

Screenshots

Submit Form Embed Video Thumbnail

Downloading

You can download it from PyPI

Embedly API key

If you want to use Embedly please create a new account and generate the key

When you have the API key, add this in your settings.py:

EMBEDLY_KEY='YourAwesomeAPIKey'

How to install it?

To get the latest stable release from PyPI

pip install django-magicembed

To get the latest commit from GitHub

pip install -e git+git://github.com/kronoscode/django-magicembed.git#egg=magicembed

If you have a requeriments list add this to your requeriments

  1. magicembed==(version)

  2. pip install -r requirements.txt

  3. add magicembed to INSTALLED_APPS

INSTALLED_APPS = (
  ...,
  'magicembed',
)

How to use

Before your tags/filters are available in your templates, load them by using

{% load magicembed_tags %}

Now if you need to embed a video, add this template tag to video url field

{{ video|magicembed:"width x height" }}

Or to get a thumbnail url

{{ video|magicthumbnail }}

Run magicembed test

If you want run test please set in the test_settings.py your Embedly Api Key correctly

In order to run the tests, simply execute tox. This will install two new environments (for Django 1.6 and Django 1.7) and run the tests against both environments.

How to contrib

If you want to contribute to this project, please perform the following steps

     # Fork this repository
     # Clone your fork
     mkvirtualenv -p python2.7 django-magicembed
     make develop

     git co -b feature_branch master
     # Implement your feature and tests
     git add . && git commit
     git push -u origin feature_branch
     # Send us a pull request for your feature branch

Licence

Licensed under MIT