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
iff --git a/contrib/comments/views/comments.py b/contrib/comments/views/comments.py | |
index 3279543..d991f0a 100644 | |
--- a/contrib/comments/views/comments.py | |
+++ b/contrib/comments/views/comments.py | |
@@ -87,6 +87,10 @@ def post_comment(request, next=None): | |
# Otherwise create the comment | |
comment = form.get_comment_object() | |
comment.ip_address = request.META.get("REMOTE_ADDR", None) | |
+ | |
+ if ',' in comment.ip_address: |
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/contrib/admin/views/main.py b/contrib/admin/views/main.py | |
index 1051648..7c7385d 100644 | |
--- a/contrib/admin/views/main.py | |
+++ b/contrib/admin/views/main.py | |
@@ -62,7 +62,7 @@ class ChangeList(object): | |
if ERROR_FLAG in self.params: | |
del self.params[ERROR_FLAG] | |
- self.order_field, self.order_type = self.get_ordering() | |
+ self.order_field, self.order_type = self.get_order_field_and_type() |
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
/** | |
* Ubiquity commands to search mininova.org or thepiratebay.org | |
*/ | |
var TorrentUbiquity = {}; | |
TorrentUbiquity.MCM = { | |
'ANIME' : '1', | |
'BOOKS' : '2', | |
'GAMES' : '3', | |
'MOVIES' : '4', | |
'MUSIC' : '5', |
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 | |
num=21 # 3 weeks | |
for h in albert; do | |
date=`date +%Y%m%d-%H%M%S` | |
dir=/home/backup/$h.d | |
manifest=$dir/manifest | |
# Find the most recent backup | |
touch $manifest |
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
def comment_saved_handler(sender, instance, created, **kwargs): | |
""" | |
Signal handler to populated comment count fields. | |
Bound to 'comment_count' field, should probably be checking for a field annotation in the model. | |
""" | |
if 'comment_count' in [f.name for f in instance.content_object._meta.fields]: | |
instance.content_object.count = instance.content_object.comments.count() | |
instance.content_object.save() | |
from django.contrib.comments.models import Comment |
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 03573a3876a39de5766082c3557b03e3e7134009 Mon Sep 17 00:00:00 2001 | |
From: Travis Cline <[email protected]> | |
Date: Fri, 10 Apr 2009 15:13:35 -0500 | |
Subject: [PATCH] added memoization of get_models for performance | |
--- | |
django/db/models/loading.py | 3 +++ | |
1 files changed, 3 insertions(+), 0 deletions(-) | |
diff --git a/django/db/models/loading.py b/django/db/models/loading.py |
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
--- modules/open-vm/modules/linux/vmhgfs/page.c.orig 2008-11-18 00:02:20.000000000 -0800 | |
+++ modules/open-vm/modules/linux/vmhgfs/page.c 2009-04-21 05:49:16.161729489 -0700 | |
@@ -62,6 +62,15 @@ | |
struct page *page, | |
unsigned pageFrom, | |
unsigned pageTo); | |
+static void HgfsDoWriteBegin(struct page *page, | |
+ unsigned pageFrom, | |
+ unsigned pageTo); | |
+static int HgfsDoWriteEnd(struct file *file, |
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/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py | |
index 9312eab..719a57d 100644 | |
--- a/django/contrib/admin/helpers.py | |
+++ b/django/contrib/admin/helpers.py | |
@@ -111,6 +111,7 @@ class InlineAdminFormSet(object): | |
def __iter__(self): | |
for form, original in zip(self.formset.initial_forms, self.formset.get_queryset()): | |
+ print original | |
yield InlineAdminForm(self.formset, form, self.fieldsets, self.opts.prepopulated_fields, original) |
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
def rf_handler(sender, **kwargs): | |
import guppy | |
heapy = guppy.hpy() | |
h = heapy.heap() | |
print h | |
print h.byrcs | |
print 'xxxxxxxxxxx' | |
print h[0].byrcs | |
print h[1].byrcs |
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
def isinteger(n): | |
return n == int(n) | |
def divisors(n): | |
result = [] | |
for x in xrange(1, n+1): | |
if isinteger(n / (x + 0.0)): | |
result.append(x) | |
return result |
OlderNewer