mirror of
https://github.com/django/django.git
synced 2025-06-16 00:49:12 +00:00
magic-removal: Negligible change to 'set' import
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
97bcca5d29
commit
28023a0adc
@ -6,8 +6,8 @@ from django.core.exceptions import ImproperlyConfigured
|
|||||||
import os, re, sys, textwrap
|
import os, re, sys, textwrap
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
#HACK: for Python2.3
|
# For Python 2.3
|
||||||
if not hasattr(__builtins__,'set'):
|
if not hasattr(__builtins__, 'set'):
|
||||||
from sets import Set as set
|
from sets import Set as set
|
||||||
|
|
||||||
MODULE_TEMPLATE = ''' {%% if perms.%(app)s.%(addperm)s or perms.%(app)s.%(changeperm)s %%}
|
MODULE_TEMPLATE = ''' {%% if perms.%(app)s.%(addperm)s or perms.%(app)s.%(changeperm)s %%}
|
||||||
|
@ -14,8 +14,8 @@ import re
|
|||||||
import types
|
import types
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
#HACK: for Python2.3
|
# For Python 2.3
|
||||||
if not hasattr(__builtins__,'set'):
|
if not hasattr(__builtins__, 'set'):
|
||||||
from sets import Set as set
|
from sets import Set as set
|
||||||
|
|
||||||
# Calculate the module_name using a poor-man's pluralization.
|
# Calculate the module_name using a poor-man's pluralization.
|
||||||
@ -346,7 +346,6 @@ class Model(object):
|
|||||||
(backend.quote_name(cls._meta.db_table), backend.quote_name(cls._meta.pk.column)),
|
(backend.quote_name(cls._meta.db_table), backend.quote_name(cls._meta.pk.column)),
|
||||||
[pk_val])
|
[pk_val])
|
||||||
|
|
||||||
|
|
||||||
setattr(self, cls._meta.pk.attname, None)
|
setattr(self, cls._meta.pk.attname, None)
|
||||||
for f in cls._meta.fields:
|
for f in cls._meta.fields:
|
||||||
if isinstance(f, FileField) and getattr(self, f.attname):
|
if isinstance(f, FileField) and getattr(self, f.attname):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user