Skip to content

Commit 317bac8

Browse files
committed
Brute force fixes?
1 parent 15add62 commit 317bac8

File tree

1,217 files changed

+113627
-117131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,217 files changed

+113627
-117131
lines changed

LICENSE

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) Waldemar Kornewald, Thomas Wanschik, and all contributors.
1+
Copyright (c) Thomas Wanschik, Waldemar Kornewald, and all contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

app.yaml

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
application: my-django-nonrel
1+
application: ctst
22
version: 1
33
runtime: python
44
api_version: 1

django/__init__.py

100644100755
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
VERSION = (1, 3, 0, 'final', 0)
2-
3-
def get_version():
4-
version = '%s.%s' % (VERSION[0], VERSION[1])
5-
if VERSION[2]:
6-
version = '%s.%s' % (version, VERSION[2])
7-
if VERSION[3:] == ('alpha', 0):
8-
version = '%s pre-alpha' % version
9-
else:
10-
if VERSION[3] != 'final':
11-
version = '%s %s %s' % (version, VERSION[3], VERSION[4])
12-
from django.utils.version import get_svn_revision
13-
svn_rev = get_svn_revision()
14-
if svn_rev != u'SVN-unknown':
15-
version = "%s %s" % (version, svn_rev)
16-
return version
1+
VERSION = (1, 3, 0, 'alpha', 1)
2+
3+
def get_version():
4+
version = '%s.%s' % (VERSION[0], VERSION[1])
5+
if VERSION[2]:
6+
version = '%s.%s' % (version, VERSION[2])
7+
if VERSION[3:] == ('alpha', 0):
8+
version = '%s pre-alpha' % version
9+
else:
10+
if VERSION[3] != 'final':
11+
version = '%s %s %s' % (version, VERSION[3], VERSION[4])
12+
from django.utils.version import get_svn_revision
13+
svn_rev = get_svn_revision()
14+
if svn_rev != u'SVN-unknown':
15+
version = "%s %s" % (version, svn_rev)
16+
return version

django/bin/__init__.py

100644100755
File mode changed.

django/bin/daily_cleanup.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#!/usr/bin/env python
2-
3-
"""
4-
Daily cleanup job.
5-
6-
Can be run as a cronjob to clean out old data from the database (only expired
7-
sessions at the moment).
8-
"""
9-
10-
from django.core import management
11-
12-
if __name__ == "__main__":
13-
management.call_command('cleanup')
1+
#!/usr/bin/env python
2+
3+
"""
4+
Daily cleanup job.
5+
6+
Can be run as a cronjob to clean out old data from the database (only expired
7+
sessions at the moment).
8+
"""
9+
10+
from django.core import management
11+
12+
if __name__ == "__main__":
13+
management.call_command('cleanup')

django/bin/django-admin.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/usr/bin/env python
2-
from django.core import management
3-
4-
if __name__ == "__main__":
5-
management.execute_from_command_line()
1+
#!/usr/bin/env python
2+
from django.core import management
3+
4+
if __name__ == "__main__":
5+
management.execute_from_command_line()

django/bin/profiling/__init__.py

100644100755
File mode changed.

django/bin/profiling/gather_profile_stats.py

100644100755
Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
#!/usr/bin/env python
2-
3-
"""
4-
gather_profile_stats.py /path/to/dir/of/profiles
5-
6-
Note that the aggregated profiles must be read with pstats.Stats, not
7-
hotshot.stats (the formats are incompatible)
8-
"""
9-
10-
from hotshot import stats
11-
import pstats
12-
import sys, os
13-
14-
def gather_stats(p):
15-
profiles = {}
16-
for f in os.listdir(p):
17-
if f.endswith('.agg.prof'):
18-
path = f[:-9]
19-
prof = pstats.Stats(os.path.join(p, f))
20-
elif f.endswith('.prof'):
21-
bits = f.split('.')
22-
path = ".".join(bits[:-3])
23-
prof = stats.load(os.path.join(p, f))
24-
else:
25-
continue
26-
print "Processing %s" % f
27-
if path in profiles:
28-
profiles[path].add(prof)
29-
else:
30-
profiles[path] = prof
31-
os.unlink(os.path.join(p, f))
32-
for (path, prof) in profiles.items():
33-
prof.dump_stats(os.path.join(p, "%s.agg.prof" % path))
34-
35-
if __name__ == '__main__':
36-
gather_stats(sys.argv[1])
1+
#!/usr/bin/env python
2+
3+
"""
4+
gather_profile_stats.py /path/to/dir/of/profiles
5+
6+
Note that the aggregated profiles must be read with pstats.Stats, not
7+
hotshot.stats (the formats are incompatible)
8+
"""
9+
10+
from hotshot import stats
11+
import pstats
12+
import sys, os
13+
14+
def gather_stats(p):
15+
profiles = {}
16+
for f in os.listdir(p):
17+
if f.endswith('.agg.prof'):
18+
path = f[:-9]
19+
prof = pstats.Stats(os.path.join(p, f))
20+
elif f.endswith('.prof'):
21+
bits = f.split('.')
22+
path = ".".join(bits[:-3])
23+
prof = stats.load(os.path.join(p, f))
24+
else:
25+
continue
26+
print "Processing %s" % f
27+
if path in profiles:
28+
profiles[path].add(prof)
29+
else:
30+
profiles[path] = prof
31+
os.unlink(os.path.join(p, f))
32+
for (path, prof) in profiles.items():
33+
prof.dump_stats(os.path.join(p, "%s.agg.prof" % path))
34+
35+
if __name__ == '__main__':
36+
gather_stats(sys.argv[1])

django/bin/unique-messages.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
#!/usr/bin/env python
2-
3-
import os
4-
import sys
5-
6-
def unique_messages():
7-
basedir = None
8-
9-
if os.path.isdir(os.path.join('conf', 'locale')):
10-
basedir = os.path.abspath(os.path.join('conf', 'locale'))
11-
elif os.path.isdir('locale'):
12-
basedir = os.path.abspath('locale')
13-
else:
14-
print "this script should be run from the django svn tree or your project or app tree"
15-
sys.exit(1)
16-
17-
for (dirpath, dirnames, filenames) in os.walk(basedir):
18-
for f in filenames:
19-
if f.endswith('.po'):
20-
sys.stderr.write('processing file %s in %s\n' % (f, dirpath))
21-
pf = os.path.splitext(os.path.join(dirpath, f))[0]
22-
cmd = 'msguniq "%s.po"' % pf
23-
stdout = os.popen(cmd)
24-
msg = stdout.read()
25-
open('%s.po' % pf, 'w').write(msg)
26-
27-
if __name__ == "__main__":
28-
unique_messages()
1+
#!/usr/bin/env python
2+
3+
import os
4+
import sys
5+
6+
def unique_messages():
7+
basedir = None
8+
9+
if os.path.isdir(os.path.join('conf', 'locale')):
10+
basedir = os.path.abspath(os.path.join('conf', 'locale'))
11+
elif os.path.isdir('locale'):
12+
basedir = os.path.abspath('locale')
13+
else:
14+
print "this script should be run from the django svn tree or your project or app tree"
15+
sys.exit(1)
16+
17+
for (dirpath, dirnames, filenames) in os.walk(basedir):
18+
for f in filenames:
19+
if f.endswith('.po'):
20+
sys.stderr.write('processing file %s in %s\n' % (f, dirpath))
21+
pf = os.path.splitext(os.path.join(dirpath, f))[0]
22+
cmd = 'msguniq "%s.po"' % pf
23+
stdout = os.popen(cmd)
24+
msg = stdout.read()
25+
open('%s.po' % pf, 'w').write(msg)
26+
27+
if __name__ == "__main__":
28+
unique_messages()

0 commit comments

Comments
 (0)