Skip to content

Instantly share code, notes, and snippets.

View ulope's full-sized avatar

Ulrich Petri ulope

View GitHub Profile
/*
Script: FormValidator.German.js
Date messages for German.
Contributors:
- Frank Rossi
- Ulrich Petri
License:
MIT-style license.
/*
Script: Date.German.js
Date messages for German.
Contributors:
- Frank Rossi
- Ulrich Petri
License:
MIT-style license.
From 7dfa5fb595c1de9fb2cf419c672e44d3620d33be Mon Sep 17 00:00:00 2001
From: Ulrich Petri <u.petri@diefirma.de>
Date: Fri, 30 Oct 2009 16:38:57 +0100
Subject: [PATCH] "Fixed" CMS_FLAT_URLS
---
cms/views.py | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/cms/views.py b/cms/views.py
========================================================================
BYTE UNIX Benchmarks (Version 5.1.2)
System: eq4: GNU/Linux
OS: GNU/Linux -- 2.6.28-15-server -- #49-Ubuntu SMP Tue Aug 18 20:09:37 UTC 2009
Machine: x86_64 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (5346.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 1: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (5346.6 bogomips)
simplejson
-e svn+http://code.djangoproject.com/svn/django/trunk/#egg=django
-e hg+http://bitbucket.org/andrewgodwin/south/#egg=south
-e hg+http://bitbucket.org/offline/django-annoying/#egg=django-annoying
-e git+git://github.com/robhudson/django-debug-toolbar.git#egg=django-debug-toolbar
-e git+git://github.com/dcramer/django-devserver.git#egg=django-devserver
-e git+git://github.com/ulope/django-extensions.git#egg=django-extensions
-e git+git://github.com/ulope/django-reversetag.git#egg=django-reversetag
diff --git a/docs/custom_plugins.rst b/docs/custom_plugins.rst
index 31ba3c5..d3ee68e 100644
--- a/docs/custom_plugins.rst
+++ b/docs/custom_plugins.rst
@@ -254,7 +254,8 @@ In your yourapp.cms_plugin_processors.py::
This plugin processor wraps each plugin's output in a colored box if it is in the "main" placeholder.
'''
if placeholder.slot != 'main' \ # Plugins not in the main placeholder should remain unchanged
- or instance._render_meta.text_enabled: # Plugins embedded in Text should remain unchanged in order not to break output
+ or (instance._render_meta.text_enabled # Plugins embedded in Text should remain unchanged in order not to break output
@ulope
ulope / Google search domain ranking
Created February 18, 2011 19:22
This is an attemt to make the code from http://blog.jgc.org/2011/02/how-could-i-have-coded-this-better.html a bit more pythonic
#!/usr/bin/env python
import csv
import sys
from BeautifulSoup import BeautifulSoup
import urllib, urllib2
from urlparse import urlparse
from collections import defaultdict
__doc__ = """
Script to perform Google searches and extract the domain names of
@ulope
ulope / gist:1017687
Created June 9, 2011 20:41
django #15552 patch v1
From cccb047c79211bfa3f89760a206009f706168728 Mon Sep 17 00:00:00 2001
From: Ulrich Petri <ulo@ulo.pe>
Date: Thu, 9 Jun 2011 22:38:33 +0200
Subject: [PATCH] Refactored settings.LOGIN_URL, LOGIN_REDIRECT_URL to use the logic from django.shortcuts.redirect (i.e. allow view names in LOGIN_URL, et. al.)
---
django/contrib/auth/decorators.py | 5 ++-
django/contrib/auth/tests/decorators.py | 2 +-
django/contrib/auth/views.py | 13 +++++---
django/shortcuts/__init__.py | 19 +----------
diff --git a/web/js/Renderer/Lightbox.js b/web/js/Renderer/Lightbox.js
index c9c2149..920f72a 100755
--- a/web/js/Renderer/Lightbox.js
+++ b/web/js/Renderer/Lightbox.js
@@ -139,7 +139,7 @@ XtLightbox.Renderer.Lightbox = new Class({
close: true
}, options);
this.empty();
- this.elTitle.set('text', options.title || '');
+ this.elTitle.set('html', options.title || '');
@ulope
ulope / gist:1189656
Created September 2, 2011 19:37 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Software Developer
Favorite Python project: too many to name
Favorite Conference: djangocon.(eu|us)
Python Experience Level: I talk python ;)