This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

emencia-django-social-aggregator

This app is an aggregator of social network.

A command script will recover data from social network/external site from Aggregator info that you specified into admin. It will stock them into database, like Ressource and you could manage them into admin. You could regroup Ressource by Feed and return them into JSON or HTML view.

Optionally you can use it as a plugin for django-cms if installed.

Since version 0.3, the DjangoCMS 2.x and Django<1.6 has been dropped. A djangocms_2 branch has been opened to maintain 0.2.x version serie if needed.

Install

In your settings.INSTALLED_APPS :

'taggit',
'filebrowser',
'socialaggregator',

And some django-filebrowser-no-grappelli basic settings (see its documentation for more details) :

FILEBROWSER_VERSIONS_BASEDIR = '_uploads_versions'

FILEBROWSER_MAX_UPLOAD_SIZE = 10*1024*1024 # 10 Mb

FILEBROWSER_NORMALIZE_FILENAME = True

Then import basic settings in your settings file :

from socialaggregator.settings import *

Usage

As a view

First, add this row in your urls.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=json

Also there is a view to display all resssources from all feeds :

/socialaggregator/

The default template use in these views comes from settings.EDSA_PLUGIN_TEMPLATE.

As a templatetag

The tag syntax is the following :

{% ressource_by_feed slug template_name %}

Where :

  • slug argument is a String containing the slug feed;
  • template_name is a String containing the template path to use, default to settings.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 plugin

Just 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 from settings.EDSA_PLUGIN_TEMPLATE to display the feed ressources, change it in your project to use your own HTML layout.

Unified content datas

Because feeds can contains ressources from many social networks, a method get_unified_render exist on the Ressource model. The method use formatter loaded from the setting RESSOURCE_FORMATTER if defined, else it will load the default formatter socialaggregator.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.

Changelog

0.3.2

  • Fix dependancies in setup.py;

0.3.2

  • Replace django-filer usage in profit of django-filebrowser;
  • Replace previous migration (0016) to suit this change;

0.3

  • Drop support for DjangoCMS 2.x and Django<1.6 in profit of DjangoCMS 3.x and Django>=1.6;
  • Use django-filer to manage image fields in models;
  • Make the app menu in the cms toolbar;

0.2.9

  • Improved admin view for Feeds and Aggregators models;

0.2.8

  • Add in Ressource model some display options (background_color and new_page);

0.2.3

  • Add ressource_by_feed template tag to display ressources from specified feed without any pagination;
  • Add EDSA_VIEW_TEMPLATE, EDSA_TAG_TEMPLATE, EDSA_PLUGIN_TEMPLATE settings and use them in view, tag and plugin;
  • Some cleaning on the default template for views;

0.2.2

  • Add Sphinx documentation in docs/;

0.2.1

  • Add new method on Ressource model to get unified content data;

0.2

  • Add optional django-cms plugin to display feed ressources, little changes on default view template;

0.1.dev

  • Initial release. Alpha version
Release History

Release History

0.3.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.9.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
emencia-django-socialaggregator-0.3.3.tar.gz (33.8 kB) Copy SHA256 Checksum SHA256 Source Oct 26, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting