This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Cross Fade Any Element | |
Version 0.01 | |
By Yuji Tomita | |
February 10, 2012. | |
*/ | |
(function( $ ){ | |
$.fn.crossFadeTo = function( fadeToElement, speed, options) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Find Exact M2M - Match | |
========= | |
Find an exact m2m match for a model. | |
Just did for fun in response to a stackoverflow question for a data importing issue.... | |
By Yuji Tomita | |
2/24/2011 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ModelAdmin(admin.ModelAdmin) | |
""" | |
Refrain from prolonged exposure. | |
""" | |
def render_change_form(self, request, context, *args, **kwargs): | |
def get_queryset(original_func): | |
import inspect, itertools | |
def wrapped_func(): | |
if inspect.stack()[1][3] == '__iter__': | |
return itertools.repeat(None) |
NewerOlder