diff --git a/README.md b/README.md index 4bb4288..a11de47 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,24 @@ django-instagram ================ -A Django application based on the python-instagram API. It -allows to use some template tags to display content from Instagram. +A Django application that allows to use some template tags to display content +from an Instagram public profile. Requirements ------------ * [Django >= 1.6](https://www.djangoproject.com/) -* [Python Instagram API](https://github.com/Instagram/python-instagram) +* [lxml](https://pypi.python.org/pypi/lxml/3.6.4) +* [requests](https://pypi.python.org/pypi/requests/2.11.1) +* [sorl-thumbnail](https://github.com/mariocesar/sorl-thumbnail) +* [Pillow](https://pypi.python.org/pypi/Pillow/3.3.1) Installation ------------ -Install django from your favourite linux packaging system if you can find it. -Or you can use pip for installing python packages that are -not listed in the package system of your distribution: +Install Django with your favourite Linux packaging system or you can use pip +for installing python packages, if Django is not an official package for +your distribution: Use pip to install Django Instagram: @@ -62,48 +65,30 @@ Usage ----- After you are done with this, you can use the tags who need user -access to Instagram, this tag will give you a context variable -called: 'recent_media', you can display the data contained in -the recent_media list like this: +access to Instagram, this tag will give you two context variables +called: + - profile: Contains the who scraped object. + - recent\_media: Contains the recent media, like 10 or 12 entries or so. + +You can display the data contained in recent_media list like this: ```html {% load instagram_client %} -{% instagram_recent_media count=6 %} +{% instagram_user_recent_media intel %}
{% for media in recent_media %}
- - - {{ media.caption.text }} + + + {{ media.caption }}
{% endfor %}
``` -To get Instagram popular media you don't need an access token -instead, so you can ignore the last configuration step above. - -```html -{% load instagram_client %} - -{% instagram_popular_media count=10 %} -
- {% for media in popular_media %} -
- - - {{ media.caption.text }} - -
- {% endfor %} -
-``` - -This tag will give you a context variable called: 'popular_media' - There are also two inclusion tags that includes an example of how to parse data from Instagram, you can also use them like this: @@ -112,10 +97,10 @@ this: {% load instagram_client %}

Instagram media wall

-{% instagram_recent_media_wall %} +{% instagram_recent_media_wall usename="intel" %}

Instagram sliding box

-{% instagram_recent_media_box %} +{% instagram_recent_media_box usename="intel" %} ``` Filters @@ -129,7 +114,7 @@ For standard size: ```html {% for media in recent_media %} ... - + ... {% endfor %} ``` @@ -139,7 +124,7 @@ For low resolution images: ```html {% for media in recent_media %} ... - + ... {% endfor %} ``` @@ -149,13 +134,13 @@ For thumbnail size: ```html {% for media in recent_media %} ... - + ... {% endfor %} ``` Releases -------- - +* 0.2.0 New scraping algorithm, removed Python Instagram. * 0.1.1 Numerous bug fixes, better documentation. * 0.1.0 Work in progress version. diff --git a/README.rst b/README.rst index bd35e7f..ebe3c2b 100644 --- a/README.rst +++ b/README.rst @@ -2,23 +2,26 @@ django-instagram ================ -A Django application based on the python-instagram API. It allows to use some -template tags to display content from Instagram. +A Django application that allows to use some template tags to display content +from an Instagram public profile. ------------ Requirements ------------ * `Django >= 1.6 `_ -* `Python Instagram API `_ +* `lxml `_ +* `requests `_ +* `sorl-thumbnail `_ +* `Pillow `_ ------------ Installation ------------ -Install django from your favourite linux packaging system if you can find it. -Or you can use pip for installing python packages that are -not listed in the package system of your distribution: +Install Django with your favourite linux packaging system or you can use pip +for installing python packages, if Django is not an official package for +your distribution: Use pip to install Django Instagram: @@ -66,48 +69,31 @@ Usage ----- After you are done with this, you can use the tags who need user -access to Instagram, this tag will give you a context variable -called: 'recent_media', you can display the data contained in -the recent_media list like this: +access to Instagram, this tag will give two context variables +called: + +- profile: +- recent_media: + +You can display the data contained in recent_media list like this: .. code-block:: html {% load instagram_client %} - {% instagram_recent_media count=6 %} + {% instagram_user_recent_media intel %}
{% for media in recent_media %} {% endfor %}
-To get Instagram popular media you don't need an access token -instead, so you can ignore the last configuration step above. - -.. code-block:: html - - {% load instagram_client %} - - {% instagram_popular_media count=10 %} -
- {% for media in popular_media %} - - {% endfor %} -
- -This tag will give you a context variable called: 'popular_media' - There are also two inclusion tags that includes an example of how to parse data from Instagram, you can also use them like this: @@ -117,10 +103,10 @@ this: {% load instagram_client %}

Instagram media wall

- {% instagram_recent_media_wall %} + {% instagram_recent_media_wall username="intel" %}

Instagram sliding box

- {% instagram_recent_media_box %} + {% instagram_recent_media_box username="intel" %} ------- Filters @@ -135,7 +121,7 @@ For standard size: {% for media in recent_media %} ... - + ... {% endfor %} @@ -145,7 +131,7 @@ For low resolution images: {% for media in recent_media %} ... - + ... {% endfor %} @@ -155,13 +141,13 @@ For thumbnail size: {% for media in recent_media %} ... - + ... {% endfor %} -------- Releases -------- - +* 0.2.0 New scraping algorithm, removed Python Instagram. * 0.1.1 Numerous bug fixes, better documentation. * 0.1.0 Work in progress version.