Skip to content

Instantly share code, notes, and snippets.

Thomas Gruner tomgruner

View GitHub Profile
tomgruner / gist:5ce8bb1f4c55d17b5b25
Created Jul 4, 2014
Migrate from django social auth to python social auth
View gist:5ce8bb1f4c55d17b5b25
from django.contrib.sessions.models import Session
for s in Session.objects.iterator():
session_dict = s.get_decoded()
if '_auth_user_backend' in session_dict.keys():
#New backend is social.backends.facebook.FacebookOAuth2
#Change from old backend
if session_dict['_auth_user_backend'] == 'social_auth.backends.facebook.FacebookBackend':
session_dict['_auth_user_backend'] = 'social.backends.facebook.FacebookOAuth2'
new_s =, session_dict, s.expire_date)
tomgruner / hello.conf
Created May 10, 2014
example supervisor conf for docker
View hello.conf
command = docker run --rm busybox /bin/sh -c "while true; do echo hello world; sleep 1; done"
autostart = true
autorestart = true
tomgruner / row_template.html
Created Aug 3, 2012
Tooltip Ellipsis inside backbone view render method
View row_template.html
<script id="componentTypeRowTpl" type="text/html">
<td>{{ name }}</td>
<td class="ellipsis_100">{{ description }}</td>
tomgruner /
Created Jan 11, 2012 — forked from uhop/
Adding Dojo's rich editor with minimal plugins to Django's Admin that shows the editor on click and hides on blur
# Example how to add rich editor capabilities to your models in admin.
from django.contrib.admin import site, ModelAdmin
import models
# we define our resources to add to admin pages
class CommonMedia:
js = (
You can’t perform that action at this time.