Package: emencia-django-socialaggregator
emencia-django-social-aggregatorThis app is an aggregator of social network.A command script will recover data from social network/external site fromAggregatorinfo that you specified into admin. It will stock them into
database, likeRessourceand you could manage them into admin. You could
regroupRessourcebyFeedand return them into JSON or HTML view.Optionally you can use it as a plugin fordjango-cmsif installed.Since version0.3, theDjangoCMS 2.xandDjango<1.6has been dropped. Adjangocms_2branch has been opened to maintain0.2.xversion serie if needed.LinksDownload hisPyPi package;Clone it on hisGithub repository;Requiresdjango-taggit;twitter;python-instagram;facebook-sdk;feedparser;google-api-python-client;django-filebrowser-no-grappelli>= 3.5.6;InstallIn your settings.INSTALLED_APPS :'taggit',
'filebrowser',
'socialaggregator',And somedjango-filebrowser-no-grappellibasic settings (see its documentation for more details) :FILEBROWSER_VERSIONS_BASEDIR = '_uploads_versions'

FILEBROWSER_MAX_UPLOAD_SIZE = 10*1024*1024 # 10 Mb

FILEBROWSER_NORMALIZE_FILENAME = TrueThen import basic settings in your settings file :from socialaggregator.settings import *UsageAs a viewFirst, add this row in yoururls.py:url(r'^socialaggregator/', include('socialaggregator.urls')),Then you will access to your feed ressources list as a HTML page with an url like this :/socialaggregator/feed/sample/Or you can use the JSON version :/socialaggregator/feed/sample/?format=jsonAlso there is a view to displayallresssources from all feeds :/socialaggregator/The default template use in these views comes fromsettings.EDSA_PLUGIN_TEMPLATE.As a templatetagThe tag syntax is the following :{% ressource_by_feed slug template_name %}Where :slugargument is a String containing the slug feed;template_nameis a String containing the template path to use, default tosettings.EDSA_TAG_TEMPLATE;So for example, load the templatetag and use the tag giving it the feed slug to use to list its ressources :{% load socialaggregator_tags %}

<div class="row">
    {% ressource_by_feed 'parrot-apps-usa' %}
</div>As a django-cms pluginJust use the plugin named “Socialaggregator Feed Plugin” in your page with selecting the feed you want to list the ressources.The default used template path comes fromsettings.EDSA_PLUGIN_TEMPLATEto display the feed ressources, change it in your project to use your own HTML layout.Unified content datasBecause feeds can contains ressources from many social networks, a methodget_unified_renderexist on theRessourcemodel. The method use formatter loaded from the settingRESSOURCE_FORMATTERif defined, else it will load the default formattersocialaggregator.formatter.RessourceFormatterDefault.The default formatter return a dict with an unified data scheme, so you can use it in your template without to test if a field is filled or not, etc.. This is optionnal, you can still directly use the ressource instance and play with its fields. You can use it like so :{% for ressource_item in feed_ressources %}{% with ressource_item.get_unified_render as ressource %}
<li>
    {% if ressource.title %}<h2>{{ ressource.title }}</h2>{% endif %}
    {% if ressource.description %}<p>{{ ressource.description|safe|linebreaksbr }}</p>{% endif %}
</li>
{% endwith %}{% endfor %}Note that the formatter is not automatically applied, so the JSON view output still return ressource instances serialized.Changelog0.3.2Fix dependancies insetup.py;0.3.2Replacedjango-filerusage in profit ofdjango-filebrowser;Replace previous migration (0016) to suit this change;0.3Drop support forDjangoCMS 2.xandDjango<1.6in profit ofDjangoCMS 3.xandDjango>=1.6;Usedjango-filerto manage image fields in models;Make the app menu in the cms toolbar;0.2.9Improved admin view for Feeds and Aggregators models;0.2.8Add in Ressource model some display options (background_colorandnew_page);0.2.3Addressource_by_feedtemplate tag to display ressources from specified feed without any pagination;AddEDSA_VIEW_TEMPLATE,EDSA_TAG_TEMPLATE,EDSA_PLUGIN_TEMPLATEsettings and use them in view, tag and plugin;Some cleaning on the default template for views;0.2.2Add Sphinx documentation indocs/;0.2.1Add new method on Ressource model to get unified content data;0.2Add optional django-cms plugin to display feed ressources, little changes on default view template;0.1.devInitial release. Alpha version