Skip to content

Instantly share code, notes, and snippets.

@kellerkind
kellerkind / gist:c40e481daf40dd579d9875dacdfc9c8c
Created May 26, 2016 07:10
django-tables2 MultiLinkColumn Example
class MultiLinkColumn(Column):
def render(self, value):
s = ""
for m in Machine.objects.all():
s += '<a href="list/{}" />Edit {}</a><br/>'.format(m.id, m.id)
return format_html(s)
class MachineTable(tables.Table):
status = LinkColumn('edit', args=[A('pk')], empty_values=())
@kellerkind
kellerkind / mencoder_convert.py
Created November 11, 2012 22:07
Script to split files via mencoder or encode to avi from mpg4/mkv.
#!/usr/bin/python
'''
author: nochn_kellerkind
some magic from mencoder done in this script.
Examples of whats possible: http://www.wiki.csoft.at/index.php/MEncoder_Scripts
'''
import sys