diff --git a/CHANGES.rst b/CHANGES.rst new file mode 100644 index 0000000..e95742f --- /dev/null +++ b/CHANGES.rst @@ -0,0 +1,7 @@ +Changes +******* + +0.1 +----- + +- Initial release diff --git a/README.md b/README.md deleted file mode 120000 index 100b938..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -README \ No newline at end of file diff --git a/README b/README.rst similarity index 72% rename from README rename to README.rst index 9efb393..fa886a3 100644 --- a/README +++ b/README.rst @@ -5,43 +5,59 @@ Django app for easy embeding YouTube and Vimeo videos. Installation ------------- +************ + +:: pip install django-embed-video +Add ``embed_video`` to ``INSTALLED_APPS`` in your Django settings. + Examples ---------- +******** -### Template examples +Template examples +----------------- First you have to load the `embed_video_tags` template tags in your template: +:: + {% load embed_video_tags %} Simple embeding of video: +:: + {% video item.video as video %} {{ video|embed:'small' }} {% endvideo %} -Default sizes are `tiny` (420x315), `small` (480x360), `medium` (640x480), -`large` (960x720) and `huge` (1280x960). You can set your own size: +Default sizes are ``tiny`` (420x315), ``small`` (480x360), ``medium`` (640x480), +``large`` (960x720) and ``huge`` (1280x960). You can set your own size: + +:: {{ video|embed:'800x600' }} Usage of variables: +:: + {% video item.video as video %} URL: {{ video.url }} Thumbnail: {{ video.thumbnail }} {% endvideo %} -### Model examples +Model examples +--------------- Using the EmbedVideoField you provide validation of correct URL. +:: + from django.db import models from embed_video.fields import EmbedVideoField @@ -50,7 +66,7 @@ Using the EmbedVideoField you provide validation of correct URL. TODO ------ +***** - provide AdminEmbedVideoMixin - Vimeo thumbnail diff --git a/setup.py b/setup.py index 69e0cd5..cff29c2 100644 --- a/setup.py +++ b/setup.py @@ -1,22 +1,23 @@ -import os - from setuptools import setup, find_packages +README = open('README.rst').read() +CHANGES = open('CHANGES.rst').read() + setup( - name = 'django-embed-video', - packages = find_packages(), - version = '0.0.1', - author = 'Juda Kaleta', - author_email = 'juda.kaleta@gmail.com', - url = '', - description = 'Django template tags for YouTube and Vimeo', - long_description = open('README').read(), - classifiers = [ + name='django-embed-video', + packages=find_packages(), + version='0.1.0', + author='Juda Kaleta', + author_email='juda.kaleta@gmail.com', + url='https://github.com/yetty/django-embed-video', + description='Django template tags for YouTube and Vimeo', + long_description='\n\n'.join([README, CHANGES]), + classifiers=[ 'Framework :: Django', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', - 'Topis :: Internet :: WWW/HTTP', + 'Topic :: Internet :: WWW/HTTP', ], - keywords = ['youtube', 'vimeo', 'video'], - test_suite = 'embed_video.tests.tests', + keywords=['youtube', 'vimeo', 'video'], + test_suite='embed_video.tests.tests', )