This file contains 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
diff --git a/admin.py b/admin.py | |
index b55e0cd..bbc08cd 100644 | |
--- a/admin.py | |
+++ b/admin.py | |
@@ -17,6 +17,8 @@ application = webapp.WSGIApplication([ | |
(config.url_prefix + '/admin/regenerate', handlers.RegenerateHandler), | |
(config.url_prefix + '/admin/post/delete/(\d+)', handlers.DeleteHandler), | |
(config.url_prefix + '/admin/post/preview/(\d+)', handlers.PreviewHandler), | |
+ | |
+ (config.url_prefix + '/admin/clear_cache', handlers.ClearHandler), |
This file contains 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
from clean_field import * |
This file contains 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
/** | |
* Provides the function 'uncollapse_all' that expands/uncollapses all | |
* unexpanded/uncollapsed fieldsets. | |
* | |
* Known to work with django 1.2<=, <=1.3.0a0. | |
*/ | |
django.jQuery(document).ready(function($) { | |
var e = $("fieldset.collapse a.collapse-toggle"); | |
// obtain the jquery click handler that toggles the groups; we assume |
This file contains 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
#!/bin/sh | |
BINDIR=/usr/local/bin/ | |
EXECDIR=/usr/local/libexec/git-core | |
X=.exe | |
GIT=$BINDIR/git$X | |
for p in $(ls -1 $EXECDIR); \ | |
do | |
p=$EXECDIR/$p # already contains the postfix $X | |
test $p -ef $GIT && \ |
This file contains 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
# | |
# Wraps Win32 vim, converting cygwin paths to windows ones; after saving this, | |
# you can setup the alias vim | |
# | |
# alias vim=~/vim-cyg | |
# | |
# and just type "vim path/to/file" instead of the full path to this script. | |
# | |
# Note: You can't set your EDITOR environment variable to the alias though. | |
# |
This file contains 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
; | |
; Runs '(proc)' over 'n' times of 'MAX_RUNS', display stats collected from | |
; '(time-apply)'. | |
; | |
; Sample session: | |
; > (define (factorial-iter n) | |
; (if (<= n 1) | |
; 1 | |
; (foldl * 1 (build-list n add1)))) | |
; > (benchmark 5 factorial-iter 100) |
This file contains 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
""" | |
Came up with this for satchmo's downloadable product migration, 0001_split. | |
""" | |
def db_table_exists(table, cursor=None): | |
try: | |
if not cursor: | |
from django.db import connection | |
cursor = connection.cursor() | |
if not cursor: | |
raise Exception |