Skip to content

Instantly share code, notes, and snippets.

View grobertson's full-sized avatar

Grant Robertson grobertson

View GitHub Profile
def get_social_history(self):
return self.social_histories.values()
def article_social_history(request, slug, section_slug):
article = DDArticle.published_objects.get(primary_section__slug=section_slug, slug=slug)
h = article.get_social_history()
history = []
for record in h:
for k, v in record.items():
if hasattr(v, 'isoformat'):
record[k] = v.isoformat()
history.append(record)
{% block content %}
<div class="overview_layout">
<div class="side">
{% include "includes/searchbox.html" %}
{% include "includes/facebook_like_box.html" %}
{% include "includes/twitter_subscribe_right.html" %}
{# TODO: Handle margin issue in CSS #}
<div style="height: 10px; padding: 0; margin: 0; "></div>
{% include "includes/right_sidebar_ads.html" %}
{% include "articles/recommendation/related_articles.html" %}
git config --global github.password