Skip to content

Instantly share code, notes, and snippets.

View RoelWKramer's full-sized avatar

Roel Kramer RoelWKramer

View GitHub Profile
@RoelWKramer
RoelWKramer / gist:5024841
Created February 24, 2013 18:00
admin_views/tests.py -> in class: AdminViewBasicTest
def testAfterAddMessageContainsChangeLink(self):
"""
Tests if the message after saving an object contains link to object.
"""
post_data = {
"name": "Another Section",
# inline data
"article_set-TOTAL_FORMS": "3",
"article_set-INITIAL_FORMS": "0",
from django import forms
image = object # pseudo voor de goede syntax hilighting
class Images(object):
''' Dit wordt het magische images object, dat de form afspeurt naar de form
fields die van het type ImageField (of andere naam) zijn. '''
pass
/*
* Roel Kramer - contact@roelkramer.nl
*/
(function($) {
$.fn.append_target_template = function(options) {
var settings = {
'url' : '/default.tpl.html',
'template_id' : 'template'
};