summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2012-10-06 18:40:58 -0300
committerRamiro Morales <cramm0@gmail.com>2012-10-06 18:40:58 -0300
commit2100da9dcdba7a8bc18f6180fd7e61640319b48a (patch)
tree9619385bcabee43cfe443de22e144ddfadc7b870 /django
parent69035b0b1c6e3bd4569070bf0f0c774def397f0d (diff)
Ensure we ignore __pycache__ PEP 3174 dirs in a few more places.
Diffstat (limited to 'django')
-rw-r--r--django/core/management/templates.py2
-rw-r--r--django/db/utils.py2
-rw-r--r--django/template/defaultfilters.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/django/core/management/templates.py b/django/core/management/templates.py
index aa65593e9c..d34a0deb7e 100644
--- a/django/core/management/templates.py
+++ b/django/core/management/templates.py
@@ -138,7 +138,7 @@ class TemplateCommand(BaseCommand):
os.mkdir(target_dir)
for dirname in dirs[:]:
- if dirname.startswith('.'):
+ if dirname.startswith('.') or dirname == '__pycache__':
dirs.remove(dirname)
for filename in files:
diff --git a/django/db/utils.py b/django/db/utils.py
index 0ce09bab70..b889cdf9ad 100644
--- a/django/db/utils.py
+++ b/django/db/utils.py
@@ -30,7 +30,7 @@ def load_backend(backend_name):
try:
available_backends = [f for f in os.listdir(backend_dir)
if os.path.isdir(os.path.join(backend_dir, f))
- and not f.startswith('.')]
+ and not (f.startswith('.') or f == '__pycache__')]
except EnvironmentError:
available_backends = []
full_notation = backend_name.startswith('django.db.backends.')
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index 1bfb627023..e15440f90e 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -96,7 +96,7 @@ def fix_ampersands_filter(value):
# Values for testing floatformat input against infinity and NaN representations,
# which differ across platforms and Python versions. Some (i.e. old Windows
# ones) are not recognized by Decimal but we want to return them unchanged vs.
-# returning an empty string as we do for completley invalid input. Note these
+# returning an empty string as we do for completely invalid input. Note these
# need to be built up from values that are not inf/nan, since inf/nan values do
# not reload properly from .pyc files on Windows prior to some level of Python 2.5
# (see Python Issue757815 and Issue1080440).