Whitespace cleanup.

* Removed trailing whitespace.
* Added newline to EOF if missing.
* Removed blank lines at EOF.
* Removed some stray tabs.
This commit is contained in:
Tim Graham 2013-10-10 16:42:30 -04:00
parent ca874b2fe6
commit 1dae4ac177
173 changed files with 602 additions and 678 deletions

View File

@ -4,10 +4,10 @@ All rights reserved.
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, 1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.

View File

@ -7,4 +7,3 @@ import sys
from lib2to3.main import main from lib2to3.main import main
sys.exit(main("django.utils.2to3_fixes")) sys.exit(main("django.utils.2to3_fixes"))

View File

@ -32,6 +32,6 @@ def gather_stats(p):
os.unlink(os.path.join(p, f)) os.unlink(os.path.join(p, f))
for (path, prof) in profiles.items(): for (path, prof) in profiles.items():
prof.dump_stats(os.path.join(p, "%s.agg.prof" % path)) prof.dump_stats(os.path.join(p, "%s.agg.prof" % path))
if __name__ == '__main__': if __name__ == '__main__':
gather_stats(sys.argv[1]) gather_stats(sys.argv[1])

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F، Y' DATE_FORMAT = 'j F، Y'
TIME_FORMAT = 'g:i:s A' TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT = # DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = 'd/m/Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' DATE_FORMAT = 'd F Y'
TIME_FORMAT = 'H:i:s' TIME_FORMAT = 'H:i:s'
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = 'd.m.Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = ' ' # Non-breaking space THOUSAND_SEPARATOR = ' ' # Non-breaking space
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F, Y' DATE_FORMAT = 'j F, Y'
TIME_FORMAT = 'g:i:s A' TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT = # DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M, Y' SHORT_DATE_FORMAT = 'j M, Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -11,14 +11,14 @@ DATETIME_FORMAT = 'j. N. Y. G:i T'
YEAR_MONTH_FORMAT = 'F Y.' YEAR_MONTH_FORMAT = 'F Y.'
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'Y M j' SHORT_DATE_FORMAT = 'Y M j'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -31,4 +31,3 @@ DATETIME_INPUT_FORMATS = (
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' DATE_FORMAT = 'd F Y'
TIME_FORMAT = 'g:i:s A' TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
# MONTH_DAY_FORMAT = # MONTH_DAY_FORMAT =
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = 'j M Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
# DECIMAL_SEPARATOR = # DECIMAL_SEPARATOR =
# THOUSAND_SEPARATOR = # THOUSAND_SEPARATOR =
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd E Y' DATE_FORMAT = 'd E Y'
TIME_FORMAT = 'g:i:s A' TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT = # DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'd M Y' SHORT_DATE_FORMAT = 'd M Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -41,4 +41,3 @@ DATETIME_INPUT_FORMATS = (
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -40,4 +40,3 @@ DATETIME_INPUT_FORMATS = (
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -31,4 +31,3 @@ DATETIME_INPUT_FORMATS = (
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -10,10 +10,10 @@ YEAR_MONTH_FORMAT = r'F \d\e Y'
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r'j \d\e F'
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601 FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
DATE_INPUT_FORMATS = ( DATE_INPUT_FORMATS = (
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06' '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
'%Y%m%d', # '20061025' '%Y%m%d', # '20061025'
) )
DATETIME_INPUT_FORMATS = ( DATETIME_INPUT_FORMATS = (
@ -27,4 +27,3 @@ DATETIME_INPUT_FORMATS = (
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'G:i:s' TIME_FORMAT = 'G:i:s'
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = 'd.m.Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = ' ' # Non-breaking space THOUSAND_SEPARATOR = ' ' # Non-breaking space
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'Yeko M\re\n d\a' DATE_FORMAT = r'Yeko M\re\n d\a'
TIME_FORMAT = 'H:i:s' TIME_FORMAT = 'H:i:s'
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
# MONTH_DAY_FORMAT = # MONTH_DAY_FORMAT =
SHORT_DATE_FORMAT = 'Y M j' SHORT_DATE_FORMAT = 'Y M j'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -12,13 +12,13 @@ YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'Y/n/j' SHORT_DATE_FORMAT = 'Y/n/j'
SHORT_DATETIME_FORMAT = 'Y/n/j، G:i:s' SHORT_DATETIME_FORMAT = 'Y/n/j، G:i:s'
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -11,14 +11,14 @@ DATETIME_FORMAT = r'j. E Y \k\e\l\l\o G.i.s'
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'j.n.Y' SHORT_DATE_FORMAT = 'j.n.Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = ' ' # Non-breaking space THOUSAND_SEPARATOR = ' ' # Non-breaking space
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -5,20 +5,20 @@ from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
# DATE_FORMAT = # DATE_FORMAT =
# TIME_FORMAT = # TIME_FORMAT =
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
# MONTH_DAY_FORMAT = # MONTH_DAY_FORMAT =
# SHORT_DATE_FORMAT = # SHORT_DATE_FORMAT =
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
# DECIMAL_SEPARATOR = # DECIMAL_SEPARATOR =
# THOUSAND_SEPARATOR = # THOUSAND_SEPARATOR =
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'H:i:s' TIME_FORMAT = 'H:i:s'
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = 'j M Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -16,9 +16,9 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -12,13 +12,13 @@ YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j בF' MONTH_DAY_FORMAT = 'j בF'
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i:s' SHORT_DATETIME_FORMAT = 'd/m/Y H:i:s'
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'g:i:s A' TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'd-m-Y' SHORT_DATE_FORMAT = 'd-m-Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y' DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i:s' TIME_FORMAT = 'H:i:s'
# DATETIME_FORMAT = # DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'j.n.Y' SHORT_DATE_FORMAT = 'j.n.Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -12,13 +12,13 @@ YEAR_MONTH_FORMAT = 'Y年n月'
MONTH_DAY_FORMAT = 'n月j日' MONTH_DAY_FORMAT = 'n月j日'
SHORT_DATE_FORMAT = 'Y/m/d' SHORT_DATE_FORMAT = 'Y/m/d'
SHORT_DATETIME_FORMAT = 'Y/m/d G:i:s' SHORT_DATETIME_FORMAT = 'Y/m/d G:i:s'
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -8,17 +8,17 @@ from __future__ import unicode_literals
DATE_FORMAT = 'j ខែ F ឆ្នាំ Y' DATE_FORMAT = 'j ខែ F ឆ្នាំ Y'
TIME_FORMAT = 'G:i:s' TIME_FORMAT = 'G:i:s'
DATETIME_FORMAT = 'j ខែ F ឆ្នាំ Y, G:i:s' DATETIME_FORMAT = 'j ខែ F ឆ្នាំ Y, G:i:s'
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = 'j M Y'
SHORT_DATETIME_FORMAT = 'j M Y, G:i:s' SHORT_DATETIME_FORMAT = 'j M Y, G:i:s'
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'h:i:s A' TIME_FORMAT = 'h:i:s A'
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = 'j M Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
# DECIMAL_SEPARATOR = # DECIMAL_SEPARATOR =
# THOUSAND_SEPARATOR = # THOUSAND_SEPARATOR =
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -41,4 +41,3 @@ DATETIME_INPUT_FORMATS = (
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -12,13 +12,13 @@ YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = 'd.m.Y'
SHORT_DATETIME_FORMAT = 'd.m.Y, H:i:s' SHORT_DATETIME_FORMAT = 'd.m.Y, H:i:s'
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' DATE_FORMAT = 'd F Y'
TIME_FORMAT = 'g.i.s.A' TIME_FORMAT = 'g.i.s.A'
# DATETIME_FORMAT = # DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'Y-m-d' SHORT_DATE_FORMAT = 'Y-m-d'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F, Y' DATE_FORMAT = 'j F, Y'
TIME_FORMAT = 'g:i:s A' TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M, Y' SHORT_DATE_FORMAT = 'j M, Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
# DECIMAL_SEPARATOR = # DECIMAL_SEPARATOR =
# THOUSAND_SEPARATOR = # THOUSAND_SEPARATOR =
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -7,18 +7,18 @@ from __future__ import unicode_literals
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'g:i:s A' TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = 'j M Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
# DECIMAL_SEPARATOR = # DECIMAL_SEPARATOR =
# THOUSAND_SEPARATOR = # THOUSAND_SEPARATOR =
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -12,13 +12,13 @@ YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = 'j M Y'
SHORT_DATETIME_FORMAT = 'j M Y, G:i:s' SHORT_DATETIME_FORMAT = 'j M Y, G:i:s'
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ','
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -12,14 +12,14 @@ DATETIME_FORMAT = 'j E Y р. H:i:s'
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = 'j M Y'
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = ' ' THOUSAND_SEPARATOR = ' '
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -12,13 +12,13 @@ YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'd-m-Y' SHORT_DATE_FORMAT = 'd-m-Y'
SHORT_DATETIME_FORMAT = 'H:i:s d-m-Y' SHORT_DATETIME_FORMAT = 'H:i:s d-m-Y'
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -5,20 +5,20 @@ from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
# DATE_FORMAT = # DATE_FORMAT =
# TIME_FORMAT = # TIME_FORMAT =
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
# MONTH_DAY_FORMAT = # MONTH_DAY_FORMAT =
# SHORT_DATE_FORMAT = # SHORT_DATE_FORMAT =
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
# DECIMAL_SEPARATOR = # DECIMAL_SEPARATOR =
# THOUSAND_SEPARATOR = # THOUSAND_SEPARATOR =
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -5,20 +5,20 @@ from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
# DATE_FORMAT = # DATE_FORMAT =
# TIME_FORMAT = # TIME_FORMAT =
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
# MONTH_DAY_FORMAT = # MONTH_DAY_FORMAT =
# SHORT_DATE_FORMAT = # SHORT_DATE_FORMAT =
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
# DECIMAL_SEPARATOR = # DECIMAL_SEPARATOR =
# THOUSAND_SEPARATOR = # THOUSAND_SEPARATOR =
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -61,4 +61,3 @@ def url(regex, view, kwargs=None, name=None, prefix=''):
if prefix: if prefix:
view = prefix + '.' + view view = prefix + '.' + view
return RegexURLPattern(regex, view, kwargs, name) return RegexURLPattern(regex, view, kwargs, name)

View File

@ -13,7 +13,7 @@ function html_unescape(text) {
// IE doesn't accept periods or dashes in the window name, but the element IDs // IE doesn't accept periods or dashes in the window name, but the element IDs
// we use to generate popup window names may contain them, therefore we map them // we use to generate popup window names may contain them, therefore we map them
// to allowed characters in a reversible way so that we can locate the correct // to allowed characters in a reversible way so that we can locate the correct
// element when the popup window is dismissed. // element when the popup window is dismissed.
function id_to_windowname(text) { function id_to_windowname(text) {
text = text.replace(/\./g, '__dot__'); text = text.replace(/\./g, '__dot__');

View File

@ -1,31 +1,31 @@
[ [
{ {
"pk": 1, "pk": 1,
"model": "auth.group", "model": "auth.group",
"fields": { "fields": {
"name": "my_group", "name": "my_group",
"permissions": [] "permissions": []
} }
}, },
{ {
"pk": 1, "pk": 1,
"model": "auth.user", "model": "auth.user",
"fields": { "fields": {
"username": "my_username", "username": "my_username",
"first_name": "", "first_name": "",
"last_name": "", "last_name": "",
"is_active": true, "is_active": true,
"is_superuser": true, "is_superuser": true,
"is_staff": true, "is_staff": true,
"last_login": "2012-01-13 00:14:00", "last_login": "2012-01-13 00:14:00",
"groups": [ "groups": [
[ [
"my_group" "my_group"
] ]
], ],
"user_permissions": [], "user_permissions": [],
"password": "pbkdf2_sha256$10000$LUyhxJjuLwXF$f6Zbpnx1L5dPze8m0itBaHMDyZ/n6JyhuavQy2RrBIM=", "password": "pbkdf2_sha256$10000$LUyhxJjuLwXF$f6Zbpnx1L5dPze8m0itBaHMDyZ/n6JyhuavQy2RrBIM=",
"email": "email@example.com", "email": "email@example.com",
"date_joined": "2012-01-13 00:14:00" "date_joined": "2012-01-13 00:14:00"
} }
} }

View File

@ -1,29 +1,29 @@
[ [
{ {
"pk": 1, "pk": 1,
"model": "auth.group", "model": "auth.group",
"fields": { "fields": {
"name": "my_group", "name": "my_group",
"permissions": [] "permissions": []
} }
}, },
{ {
"pk": 1, "pk": 1,
"model": "auth.user", "model": "auth.user",
"fields": { "fields": {
"username": "my_username", "username": "my_username",
"first_name": "", "first_name": "",
"last_name": "", "last_name": "",
"is_active": true, "is_active": true,
"is_superuser": true, "is_superuser": true,
"is_staff": true, "is_staff": true,
"last_login": "2012-01-13 00:14:00", "last_login": "2012-01-13 00:14:00",
"groups": [ "groups": [
1 1
], ],
"user_permissions": [], "user_permissions": [],
"password": "pbkdf2_sha256$10000$LUyhxJjuLwXF$f6Zbpnx1L5dPze8m0itBaHMDyZ/n6JyhuavQy2RrBIM=", "password": "pbkdf2_sha256$10000$LUyhxJjuLwXF$f6Zbpnx1L5dPze8m0itBaHMDyZ/n6JyhuavQy2RrBIM=",
"email": "email@example.com", "email": "email@example.com",
"date_joined": "2012-01-13 00:14:00" "date_joined": "2012-01-13 00:14:00"
} }
} }

View File

@ -501,4 +501,3 @@ class CryptPasswordHasher(BasePasswordHasher):
(_('salt'), salt), (_('salt'), salt),
(_('hash'), mask_hash(data, show=3)), (_('hash'), mask_hash(data, show=3)),
]) ])

View File

@ -112,7 +112,7 @@ class AuthContextProcessorTests(TestCase):
self.assertContains(response, "Has auth permissions") self.assertContains(response, "Has auth permissions")
self.assertContains(response, "Has auth.add_permission permissions") self.assertContains(response, "Has auth.add_permission permissions")
self.assertNotContains(response, "nonexisting") self.assertNotContains(response, "nonexisting")
def test_perm_in_perms_attrs(self): def test_perm_in_perms_attrs(self):
u = User.objects.create_user(username='normal', password='secret') u = User.objects.create_user(username='normal', password='secret')
u.user_permissions.add( u.user_permissions.add(

View File

@ -334,7 +334,7 @@ class Moderator(object):
moderation_class = self._registry[model] moderation_class = self._registry[model]
# Comment will be disallowed outright (HTTP 403 response) # Comment will be disallowed outright (HTTP 403 response)
if not moderation_class.allow(comment, content_object, request): if not moderation_class.allow(comment, content_object, request):
return False return False
if moderation_class.moderate(comment, content_object, request): if moderation_class.moderate(comment, content_object, request):

View File

@ -96,4 +96,3 @@ class FlatpageAdminFormTests(TestCase):
self.assertEqual( self.assertEqual(
f.errors, f.errors,
{'sites': [translation.ugettext('This field is required.')]}) {'sites': [translation.ugettext('This field is required.')]})

View File

@ -154,5 +154,3 @@ class FlatpageMiddlewareAppendSlashTests(TestCase):
response = self.client.get('/') response = self.client.get('/')
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertContains(response, "<p>Root</p>") self.assertContains(response, "<p>Root</p>")

View File

@ -133,4 +133,3 @@ class FlatpageTemplateTagTests(TestCase):
"{% load flatpages %}{% get_flatpages for user as flatpages asdf%}") "{% load flatpages %}{% get_flatpages for user as flatpages asdf%}")
self.assertRaises(TemplateSyntaxError, render, self.assertRaises(TemplateSyntaxError, render,
"{% load flatpages %}{% get_flatpages prefix for user as flatpages asdf%}") "{% load flatpages %}{% get_flatpages prefix for user as flatpages asdf%}")

View File

@ -5,4 +5,3 @@ urlpatterns = patterns('',
(r'^flatpage_root', include('django.contrib.flatpages.urls')), (r'^flatpage_root', include('django.contrib.flatpages.urls')),
(r'^accounts/', include('django.contrib.auth.urls')), (r'^accounts/', include('django.contrib.auth.urls')),
) )

View File

@ -49,4 +49,3 @@ class SessionContactWizard(ContactWizard):
class CookieContactWizard(ContactWizard): class CookieContactWizard(ContactWizard):
storage_name = 'django.contrib.formtools.wizard.storage.cookie.CookieStorage' storage_name = 'django.contrib.formtools.wizard.storage.cookie.CookieStorage'

View File

@ -15,4 +15,3 @@ class TestLoadStorage(TestCase):
'django.contrib.formtools.wizard.storage.idontexist.IDontExistStorage', 'wizard1') 'django.contrib.formtools.wizard.storage.idontexist.IDontExistStorage', 'wizard1')
self.assertRaises(MissingStorage, get_storage, self.assertRaises(MissingStorage, get_storage,
'django.contrib.formtools.wizard.storage.base.IDontExistStorage', 'wizard1') 'django.contrib.formtools.wizard.storage.base.IDontExistStorage', 'wizard1')

View File

@ -63,4 +63,3 @@ class SessionContactWizard(ContactWizard):
class CookieContactWizard(ContactWizard): class CookieContactWizard(ContactWizard):
storage_name = 'django.contrib.formtools.wizard.storage.cookie.CookieStorage' storage_name = 'django.contrib.formtools.wizard.storage.cookie.CookieStorage'

View File

@ -2,4 +2,3 @@ from django.db.backends.sqlite3.client import DatabaseClient
class SpatiaLiteClient(DatabaseClient): class SpatiaLiteClient(DatabaseClient):
executable_name = 'spatialite' executable_name = 'spatialite'

View File

@ -21,7 +21,7 @@ class DistanceField(BaseField):
class GeomField(BaseField): class GeomField(BaseField):
""" """
Wrapper for Geometry values. It is a lightweight alternative to Wrapper for Geometry values. It is a lightweight alternative to
using GeometryField (which requires an SQL query upon instantiation). using GeometryField (which requires an SQL query upon instantiation).
""" """
pass pass

View File

@ -64,7 +64,7 @@ class GeoFeedMixin(object):
# Getting the lower-case geometry type. # Getting the lower-case geometry type.
gtype = str(geom.geom_type).lower() gtype = str(geom.geom_type).lower()
if gtype == 'point': if gtype == 'point':
self.add_georss_point(handler, geom.coords, w3c_geo=w3c_geo) self.add_georss_point(handler, geom.coords, w3c_geo=w3c_geo)
else: else:
if w3c_geo: raise ValueError('W3C Geo only supports Point geometries.') if w3c_geo: raise ValueError('W3C Geo only supports Point geometries.')
# For formatting consistent w/the GeoRSS simple standard: # For formatting consistent w/the GeoRSS simple standard:

View File

@ -52,4 +52,3 @@ try:
except ImportError: except ImportError:
# No ctypes, but don't raise an exception. # No ctypes, but don't raise an exception.
pass pass

View File

@ -33,4 +33,3 @@ class GDALBase(object):
raise TypeError('Incompatible pointer type') raise TypeError('Incompatible pointer type')
ptr = property(_get_ptr, _set_ptr) ptr = property(_get_ptr, _set_ptr)

View File

@ -36,7 +36,7 @@ class Envelope(object):
The initialization function may take an OGREnvelope structure, 4-element The initialization function may take an OGREnvelope structure, 4-element
tuple or list, or 4 individual arguments. tuple or list, or 4 individual arguments.
""" """
if len(args) == 1: if len(args) == 1:
if isinstance(args[0], OGREnvelope): if isinstance(args[0], OGREnvelope):
# OGREnvelope (a ctypes Structure) was passed in. # OGREnvelope (a ctypes Structure) was passed in.
@ -87,48 +87,48 @@ class Envelope(object):
self._envelope.MinY = seq[1] self._envelope.MinY = seq[1]
self._envelope.MaxX = seq[2] self._envelope.MaxX = seq[2]
self._envelope.MaxY = seq[3] self._envelope.MaxY = seq[3]
def expand_to_include(self, *args): def expand_to_include(self, *args):
""" """
Modifies the envelope to expand to include the boundaries of Modifies the envelope to expand to include the boundaries of
the passed-in 2-tuple (a point), 4-tuple (an extent) or the passed-in 2-tuple (a point), 4-tuple (an extent) or
envelope. envelope.
""" """
# We provide a number of different signatures for this method, # We provide a number of different signatures for this method,
# and the logic here is all about converting them into a # and the logic here is all about converting them into a
# 4-tuple single parameter which does the actual work of # 4-tuple single parameter which does the actual work of
# expanding the envelope. # expanding the envelope.
if len(args) == 1: if len(args) == 1:
if isinstance(args[0], Envelope): if isinstance(args[0], Envelope):
return self.expand_to_include(args[0].tuple) return self.expand_to_include(args[0].tuple)
elif hasattr(args[0], 'x') and hasattr(args[0], 'y'): elif hasattr(args[0], 'x') and hasattr(args[0], 'y'):
return self.expand_to_include(args[0].x, args[0].y, args[0].x, args[0].y) return self.expand_to_include(args[0].x, args[0].y, args[0].x, args[0].y)
elif isinstance(args[0], (tuple, list)): elif isinstance(args[0], (tuple, list)):
# A tuple was passed in. # A tuple was passed in.
if len(args[0]) == 2: if len(args[0]) == 2:
return self.expand_to_include((args[0][0], args[0][1], args[0][0], args[0][1])) return self.expand_to_include((args[0][0], args[0][1], args[0][0], args[0][1]))
elif len(args[0]) == 4: elif len(args[0]) == 4:
(minx, miny, maxx, maxy) = args[0] (minx, miny, maxx, maxy) = args[0]
if minx < self._envelope.MinX: if minx < self._envelope.MinX:
self._envelope.MinX = minx self._envelope.MinX = minx
if miny < self._envelope.MinY: if miny < self._envelope.MinY:
self._envelope.MinY = miny self._envelope.MinY = miny
if maxx > self._envelope.MaxX: if maxx > self._envelope.MaxX:
self._envelope.MaxX = maxx self._envelope.MaxX = maxx
if maxy > self._envelope.MaxY: if maxy > self._envelope.MaxY:
self._envelope.MaxY = maxy self._envelope.MaxY = maxy
else: else:
raise OGRException('Incorrect number of tuple elements (%d).' % len(args[0])) raise OGRException('Incorrect number of tuple elements (%d).' % len(args[0]))
else: else:
raise TypeError('Incorrect type of argument: %s' % str(type(args[0]))) raise TypeError('Incorrect type of argument: %s' % str(type(args[0])))
elif len(args) == 2: elif len(args) == 2:
# An x and an y parameter were passed in # An x and an y parameter were passed in
return self.expand_to_include((args[0], args[1], args[0], args[1])) return self.expand_to_include((args[0], args[1], args[0], args[1]))
elif len(args) == 4: elif len(args) == 4:
# Individual parameters passed in. # Individual parameters passed in.
return self.expand_to_include(args) return self.expand_to_include(args)
else: else:
raise OGRException('Incorrect number (%d) of arguments.' % len(args[0])) raise OGRException('Incorrect number (%d) of arguments.' % len(args[0]))
@property @property
def min_x(self): def min_x(self):

View File

@ -32,7 +32,7 @@ OGRERR_NONE = 0
def check_err(code): def check_err(code):
"Checks the given OGRERR, and raises an exception where appropriate." "Checks the given OGRERR, and raises an exception where appropriate."
if code == OGRERR_NONE: if code == OGRERR_NONE:
return return
elif code in OGRERR_DICT: elif code in OGRERR_DICT:

View File

@ -1,6 +1,6 @@
""" """
This module houses the ctypes function prototypes for OGR DataSource This module houses the ctypes function prototypes for OGR DataSource
related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*,
OGR_Fld_* routines are relevant here. OGR_Fld_* routines are relevant here.
""" """
from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER

View File

@ -77,7 +77,7 @@ def string_output(func, argtypes, offset=-1, str_result=False, decoding=None):
""" """
Generates a ctypes prototype for the given function with the Generates a ctypes prototype for the given function with the
given argument types that returns a string from a GDAL pointer. given argument types that returns a string from a GDAL pointer.
The `const` flag indicates whether the allocated pointer should The `const` flag indicates whether the allocated pointer should
be freed via the GDAL library routine VSIFree -- but only applies be freed via the GDAL library routine VSIFree -- but only applies
only when `str_result` is True. only when `str_result` is True.
""" """
@ -114,7 +114,7 @@ def void_output(func, argtypes, errcheck=True):
func.errcheck = check_errcode func.errcheck = check_errcode
else: else:
func.restype = None func.restype = None
return func return func
def voidptr_output(func, argtypes): def voidptr_output(func, argtypes):

View File

@ -34,7 +34,7 @@ to_kml = string_output(lgdal.OGR_G_ExportToKML, [c_void_p, c_char_p], str_result
getx = pnt_func(lgdal.OGR_G_GetX) getx = pnt_func(lgdal.OGR_G_GetX)
gety = pnt_func(lgdal.OGR_G_GetY) gety = pnt_func(lgdal.OGR_G_GetY)
getz = pnt_func(lgdal.OGR_G_GetZ) getz = pnt_func(lgdal.OGR_G_GetZ)
# Geometry creation routines. # Geometry creation routines.
from_wkb = geom_output(lgdal.OGR_G_CreateFromWkb, [c_char_p, c_void_p, POINTER(c_void_p), c_int], offset=-2) from_wkb = geom_output(lgdal.OGR_G_CreateFromWkb, [c_char_p, c_void_p, POINTER(c_void_p), c_int], offset=-2)
from_wkt = geom_output(lgdal.OGR_G_CreateFromWkt, [POINTER(c_char_p), c_void_p, POINTER(c_void_p)], offset=-1) from_wkt = geom_output(lgdal.OGR_G_CreateFromWkt, [POINTER(c_char_p), c_void_p, POINTER(c_void_p)], offset=-1)
@ -95,4 +95,3 @@ geom_transform_to = void_output(lgdal.OGR_G_TransformTo, [c_void_p, c_void_p])
# For retrieving the envelope of the geometry. # For retrieving the envelope of the geometry.
get_envelope = env_func(lgdal.OGR_G_GetEnvelope, [c_void_p, POINTER(OGREnvelope)]) get_envelope = env_func(lgdal.OGR_G_GetEnvelope, [c_void_p, POINTER(OGREnvelope)])

View File

@ -1,6 +1,6 @@
""" """
The GeoDjango GEOS module. Please consult the GeoDjango documentation The GeoDjango GEOS module. Please consult the GeoDjango documentation
for more details: for more details:
http://geodjango.org/docs/geos.html http://geodjango.org/docs/geos.html
""" """
try: try:

View File

@ -15,6 +15,6 @@ class GEOSIndexError(GEOSException, KeyError):
an Exception is raised. Fixes ticket #4740. an Exception is raised. Fixes ticket #4740.
""" """
# "If, during the method lookup, a method raises an exception, the exception # "If, during the method lookup, a method raises an exception, the exception
# will be propagated, unless the exception has an attribute # will be propagated, unless the exception has an attribute
# `silent_variable_failure` whose value is True." -- Django template docs. # `silent_variable_failure` whose value is True." -- Django template docs.
silent_variable_failure = True silent_variable_failure = True

View File

@ -16,5 +16,3 @@ class WKTReader(_WKTReader):
def read(self, wkt): def read(self, wkt):
"Returns a GEOSGeometry for the given WKT string." "Returns a GEOSGeometry for the given WKT string."
return GEOSGeometry(super(WKTReader, self).read(wkt)) return GEOSGeometry(super(WKTReader, self).read(wkt))

View File

@ -3,7 +3,7 @@
topological operations on geometries. topological operations on geometries.
""" """
__all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull', __all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull',
'geos_difference', 'geos_envelope', 'geos_intersection', 'geos_difference', 'geos_envelope', 'geos_intersection',
'geos_linemerge', 'geos_pointonsurface', 'geos_preservesimplify', 'geos_linemerge', 'geos_pointonsurface', 'geos_preservesimplify',
'geos_simplify', 'geos_symdifference', 'geos_union', 'geos_relate'] 'geos_simplify', 'geos_symdifference', 'geos_union', 'geos_relate']

View File

@ -30,20 +30,20 @@
{{ google.style }} => "<style>{{ google.vml_css }}</style>" {{ google.style }} => "<style>{{ google.vml_css }}</style>"
Explanation: Explanation:
- The `xhtml` property provides the correct XML namespace needed for - The `xhtml` property provides the correct XML namespace needed for
Google Maps to operate in IE using XHTML. Google Maps on IE uses Google Maps to operate in IE using XHTML. Google Maps on IE uses
VML to draw polylines. Returns, by default: VML to draw polylines. Returns, by default:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
- The `style` property provides the correct style tag for the CSS - The `style` property provides the correct style tag for the CSS
properties required by Google Maps on IE: properties required by Google Maps on IE:
<style type="text/css">v\:* {behavior:url(#default#VML);}</style> <style type="text/css">v\:* {behavior:url(#default#VML);}</style>
- The `scripts` property provides the necessary <script> tags for - The `scripts` property provides the necessary <script> tags for
including the Google Maps javascript, as well as including the including the Google Maps javascript, as well as including the
generated javascript. generated javascript.
- The `body` property provides the correct attributes for the - The `body` property provides the correct attributes for the
body tag to load the generated javascript. By default, returns: body tag to load the generated javascript. By default, returns:
<body onload="gmap_load()" onunload="GUnload()"> <body onload="gmap_load()" onunload="GUnload()">

View File

@ -21,7 +21,7 @@ def render_to_kml(*args, **kwargs):
def render_to_kmz(*args, **kwargs): def render_to_kmz(*args, **kwargs):
""" """
Compresses the KML content and returns as KMZ (using the correct Compresses the KML content and returns as KMZ (using the correct
MIME type). MIME type).
""" """
return HttpResponse(compress_kml(loader.render_to_string(*args, **kwargs)), return HttpResponse(compress_kml(loader.render_to_string(*args, **kwargs)),

View File

@ -1,4 +1,3 @@
# Geo-enabled Sitemap classes. # Geo-enabled Sitemap classes.
from django.contrib.gis.sitemaps.georss import GeoRSSSitemap from django.contrib.gis.sitemaps.georss import GeoRSSSitemap
from django.contrib.gis.sitemaps.kml import KMLSitemap, KMZSitemap from django.contrib.gis.sitemaps.kml import KMLSitemap, KMZSitemap

View File

@ -50,4 +50,3 @@ class GeoRSSSitemap(Sitemap):
def location(self, obj): def location(self, obj):
return urlresolvers.reverse('django.contrib.gis.views.feed', args=(obj,)) return urlresolvers.reverse('django.contrib.gis.views.feed', args=(obj,))

View File

@ -13,7 +13,7 @@ class KMLSitemap(Sitemap):
# If no locations specified, then we try to build for # If no locations specified, then we try to build for
# every model in installed applications. # every model in installed applications.
self.locations = self._build_kml_sources(locations) self.locations = self._build_kml_sources(locations)
def _build_kml_sources(self, sources): def _build_kml_sources(self, sources):
""" """
Goes through the given sources and returns a 3-tuple of Goes through the given sources and returns a 3-tuple of
@ -33,7 +33,7 @@ class KMLSitemap(Sitemap):
source._meta.model_name, source._meta.model_name,
field.name)) field.name))
elif isinstance(source, (list, tuple)): elif isinstance(source, (list, tuple)):
if len(source) != 3: if len(source) != 3:
raise ValueError('Must specify a 3-tuple of (app_label, module_name, field_name).') raise ValueError('Must specify a 3-tuple of (app_label, module_name, field_name).')
kml_sources.append(source) kml_sources.append(source)
else: else:
@ -54,7 +54,7 @@ class KMLSitemap(Sitemap):
def location(self, obj): def location(self, obj):
return urlresolvers.reverse('django.contrib.gis.sitemaps.views.%s' % self.geo_format, return urlresolvers.reverse('django.contrib.gis.sitemaps.views.%s' % self.geo_format,
kwargs={'label' : obj[0], kwargs={'label' : obj[0],
'model' : obj[1], 'model' : obj[1],
'field_name': obj[2], 'field_name': obj[2],
} }

View File

@ -5,11 +5,11 @@
#{{ id }}_map .aligned label { float:inherit; } #{{ id }}_map .aligned label { float:inherit; }
#{{ id }}_admin_map { position: relative; vertical-align: top; float: {{ LANGUAGE_BIDI|yesno:"right,left" }}; } #{{ id }}_admin_map { position: relative; vertical-align: top; float: {{ LANGUAGE_BIDI|yesno:"right,left" }}; }
{% if not display_wkt %}#{{ id }} { display: none; }{% endif %} {% if not display_wkt %}#{{ id }} { display: none; }{% endif %}
.olControlEditingToolbar .olControlModifyFeatureItemActive { .olControlEditingToolbar .olControlModifyFeatureItemActive {
background-image: url("{% static "admin/img/gis/move_vertex_on.png" %}"); background-image: url("{% static "admin/img/gis/move_vertex_on.png" %}");
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.olControlEditingToolbar .olControlModifyFeatureItemInactive { .olControlEditingToolbar .olControlModifyFeatureItemInactive {
background-image: url("{% static "admin/img/gis/move_vertex_off.png" %}"); background-image: url("{% static "admin/img/gis/move_vertex_off.png" %}");
background-repeat: no-repeat; background-repeat: no-repeat;
} }

File diff suppressed because one or more lines are too long

View File

@ -1,65 +1,65 @@
[ [
{ {
"pk": 1, "pk": 1,
"model": "geogapp.city", "model": "geogapp.city",
"fields": { "fields": {
"name": "Houston", "name": "Houston",
"point": "POINT (-95.363151 29.763374)" "point": "POINT (-95.363151 29.763374)"
} }
}, },
{ {
"pk": 2, "pk": 2,
"model": "geogapp.city", "model": "geogapp.city",
"fields": { "fields": {
"name": "Dallas", "name": "Dallas",
"point": "POINT (-96.801611 32.782057)" "point": "POINT (-96.801611 32.782057)"
} }
}, },
{ {
"pk": 3, "pk": 3,
"model": "geogapp.city", "model": "geogapp.city",
"fields": { "fields": {
"name": "Oklahoma City", "name": "Oklahoma City",
"point": "POINT (-97.521157 34.464642)" "point": "POINT (-97.521157 34.464642)"
} }
}, },
{ {
"pk": 4, "pk": 4,
"model": "geogapp.city", "model": "geogapp.city",
"fields": { "fields": {
"name": "Wellington", "name": "Wellington",
"point": "POINT (174.783117 -41.315268)" "point": "POINT (174.783117 -41.315268)"
} }
}, },
{ {
"pk": 5, "pk": 5,
"model": "geogapp.city", "model": "geogapp.city",
"fields": { "fields": {
"name": "Pueblo", "name": "Pueblo",
"point": "POINT (-104.609252 38.255001)" "point": "POINT (-104.609252 38.255001)"
} }
}, },
{ {
"pk": 6, "pk": 6,
"model": "geogapp.city", "model": "geogapp.city",
"fields": { "fields": {
"name": "Lawrence", "name": "Lawrence",
"point": "POINT (-95.235060 38.971823)" "point": "POINT (-95.235060 38.971823)"
} }
}, },
{ {
"pk": 7, "pk": 7,
"model": "geogapp.city", "model": "geogapp.city",
"fields": { "fields": {
"name": "Chicago", "name": "Chicago",
"point": "POINT (-87.650175 41.850385)" "point": "POINT (-87.650175 41.850385)"
} }
}, },
{ {
"pk": 8, "pk": 8,
"model": "geogapp.city", "model": "geogapp.city",
"fields": { "fields": {
"name": "Victoria", "name": "Victoria",
"point": "POINT (-123.305196 48.462611)" "point": "POINT (-123.305196 48.462611)"
} }
}, },

View File

@ -40,7 +40,7 @@ class CityBase(models.Model):
class ICity1(CityBase): class ICity1(CityBase):
dt = models.DateField() dt = models.DateField()
class ICity2(ICity1): class ICity2(ICity1):
dt_time = models.DateTimeField(auto_now=True) dt_time = models.DateTimeField(auto_now=True)

View File

@ -1,11 +1,11 @@
from django.contrib import admin from django.contrib import admin
from django.contrib.redirects.models import Redirect from django.contrib.redirects.models import Redirect
class RedirectAdmin(admin.ModelAdmin): class RedirectAdmin(admin.ModelAdmin):
list_display = ('old_path', 'new_path') list_display = ('old_path', 'new_path')
list_filter = ('site',) list_filter = ('site',)
search_fields = ('old_path', 'new_path') search_fields = ('old_path', 'new_path')
radio_fields = {'site': admin.VERTICAL} radio_fields = {'site': admin.VERTICAL}
admin.site.register(Redirect, RedirectAdmin) admin.site.register(Redirect, RedirectAdmin)

View File

@ -11,4 +11,3 @@ class Command(BaseCommand):
else: else:
sitemap_url = None sitemap_url = None
ping_google(sitemap_url=sitemap_url) ping_google(sitemap_url=sitemap_url)

View File

@ -1 +1 @@
# This file intentionally left blank # This file intentionally left blank

View File

@ -6,4 +6,4 @@ class SiteAdmin(admin.ModelAdmin):
list_display = ('domain', 'name') list_display = ('domain', 'name')
search_fields = ('domain', 'name') search_fields = ('domain', 'name')
admin.site.register(Site, SiteAdmin) admin.site.register(Site, SiteAdmin)

View File

@ -8,15 +8,15 @@ class CurrentSiteManager(models.Manager):
super(CurrentSiteManager, self).__init__() super(CurrentSiteManager, self).__init__()
self.__field_name = field_name self.__field_name = field_name
self.__is_validated = False self.__is_validated = False
def _validate_field_name(self): def _validate_field_name(self):
field_names = self.model._meta.get_all_field_names() field_names = self.model._meta.get_all_field_names()
# If a custom name is provided, make sure the field exists on the model # If a custom name is provided, make sure the field exists on the model
if self.__field_name is not None and self.__field_name not in field_names: if self.__field_name is not None and self.__field_name not in field_names:
raise ValueError("%s couldn't find a field named %s in %s." % \ raise ValueError("%s couldn't find a field named %s in %s." % \
(self.__class__.__name__, self.__field_name, self.model._meta.object_name)) (self.__class__.__name__, self.__field_name, self.model._meta.object_name))
# Otherwise, see if there is a field called either 'site' or 'sites' # Otherwise, see if there is a field called either 'site' or 'sites'
else: else:
for potential_name in ['site', 'sites']: for potential_name in ['site', 'sites']:
@ -24,7 +24,7 @@ class CurrentSiteManager(models.Manager):
self.__field_name = potential_name self.__field_name = potential_name
self.__is_validated = True self.__is_validated = True
break break
# Now do a type check on the field (FK or M2M only) # Now do a type check on the field (FK or M2M only)
try: try:
field = self.model._meta.get_field(self.__field_name) field = self.model._meta.get_field(self.__field_name)
@ -34,7 +34,7 @@ class CurrentSiteManager(models.Manager):
raise ValueError("%s couldn't find a field named %s in %s." % \ raise ValueError("%s couldn't find a field named %s in %s." % \
(self.__class__.__name__, self.__field_name, self.model._meta.object_name)) (self.__class__.__name__, self.__field_name, self.model._meta.object_name))
self.__is_validated = True self.__is_validated = True
def get_queryset(self): def get_queryset(self):
if not self.__is_validated: if not self.__is_validated:
self._validate_field_name() self._validate_field_name()

View File

@ -57,4 +57,3 @@ class EmailBackend(ConsoleEmailBackend):
self.stream.close() self.stream.close()
finally: finally:
self.stream = None self.stream = None

View File

@ -20,4 +20,3 @@ class Command(AppCommand):
def handle_app(self, app, **options): def handle_app(self, app, **options):
return '\n'.join(sql_destroy_indexes(app, self.style, connections[options.get('database')])) return '\n'.join(sql_destroy_indexes(app, self.style, connections[options.get('database')]))

View File

@ -109,4 +109,3 @@ class DjangoJSONEncoder(json.JSONEncoder):
# Older, deprecated class name (for backwards compatibility purposes). # Older, deprecated class name (for backwards compatibility purposes).
DateTimeAwareJSONEncoder = DjangoJSONEncoder DateTimeAwareJSONEncoder = DjangoJSONEncoder

View File

@ -6,4 +6,4 @@ See license.txt for original license.
Heavily modified for Django's purposes. Heavily modified for Django's purposes.
""" """
from django.dispatch.dispatcher import Signal, receiver from django.dispatch.dispatcher import Signal, receiver

View File

@ -179,4 +179,3 @@ def main(main_func, args=None, kwargs=None):
wrapped_main_func = check_errors(main_func) wrapped_main_func = check_errors(main_func)
reloader(wrapped_main_func, args, kwargs) reloader(wrapped_main_func, args, kwargs)

View File

@ -339,4 +339,3 @@ def flatten_result(source):
for i in range(len(result)): for i in range(len(result)):
result[i] += piece result[i] += piece
return result, result_args return result, result_args

View File

@ -135,4 +135,3 @@ def mark_for_escaping(s):
if isinstance(s, (six.text_type, Promise)): if isinstance(s, (six.text_type, Promise)):
return EscapeText(s) return EscapeText(s)
return EscapeBytes(bytes(s)) return EscapeBytes(bytes(s))

View File

@ -60,4 +60,3 @@ def get_language_from_request(request, check_path=False):
def get_language_from_path(request, supported=None): def get_language_from_path(request, supported=None):
return None return None

View File

@ -163,4 +163,3 @@ def etag(etag_func):
def last_modified(last_modified_func): def last_modified(last_modified_func):
return condition(last_modified_func=last_modified_func) return condition(last_modified_func=last_modified_func)

View File

@ -1,7 +1,7 @@
The documentation in this tree is in plain text files and can be viewed using The documentation in this tree is in plain text files and can be viewed using
any text file viewer. any text file viewer.
It uses ReST (reStructuredText) [1], and the Sphinx documentation system [2]. It uses ReST (reStructuredText) [1], and the Sphinx documentation system [2].
This allows it to be built into other forms for easier viewing and browsing. This allows it to be built into other forms for easier viewing and browsing.
To create an HTML version of the docs: To create an HTML version of the docs:

View File

@ -26,7 +26,7 @@ ROLES = (
"term", "term",
"tfilter", "tfilter",
"ttag", "ttag",
# special # special
"skip" "skip"
) )
@ -40,39 +40,39 @@ ALWAYS_SKIP = [
def fixliterals(fname): def fixliterals(fname):
with open(fname) as fp: with open(fname) as fp:
data = fp.read() data = fp.read()
last = 0 last = 0
new = [] new = []
storage = shelve.open("/tmp/literals_to_xref.shelve") storage = shelve.open("/tmp/literals_to_xref.shelve")
lastvalues = storage.get("lastvalues", {}) lastvalues = storage.get("lastvalues", {})
for m in refre.finditer(data): for m in refre.finditer(data):
new.append(data[last:m.start()]) new.append(data[last:m.start()])
last = m.end() last = m.end()
line_start = data.rfind("\n", 0, m.start()) line_start = data.rfind("\n", 0, m.start())
line_end = data.find("\n", m.end()) line_end = data.find("\n", m.end())
prev_start = data.rfind("\n", 0, line_start) prev_start = data.rfind("\n", 0, line_start)
next_end = data.find("\n", line_end + 1) next_end = data.find("\n", line_end + 1)
# Skip always-skip stuff # Skip always-skip stuff
if m.group(1) in ALWAYS_SKIP: if m.group(1) in ALWAYS_SKIP:
new.append(m.group(0)) new.append(m.group(0))
continue continue
# skip when the next line is a title # skip when the next line is a title
next_line = data[m.end():next_end].strip() next_line = data[m.end():next_end].strip()
if next_line[0] in "!-/:-@[-`{-~" and all(c == next_line[0] for c in next_line): if next_line[0] in "!-/:-@[-`{-~" and all(c == next_line[0] for c in next_line):
new.append(m.group(0)) new.append(m.group(0))
continue continue
sys.stdout.write("\n"+"-"*80+"\n") sys.stdout.write("\n"+"-"*80+"\n")
sys.stdout.write(data[prev_start+1:m.start()]) sys.stdout.write(data[prev_start+1:m.start()])
sys.stdout.write(colorize(m.group(0), fg="red")) sys.stdout.write(colorize(m.group(0), fg="red"))
sys.stdout.write(data[m.end():next_end]) sys.stdout.write(data[m.end():next_end])
sys.stdout.write("\n\n") sys.stdout.write("\n\n")
replace_type = None replace_type = None
while replace_type is None: while replace_type is None:
replace_type = raw_input( replace_type = raw_input(
@ -80,34 +80,34 @@ def fixliterals(fname):
).strip().lower() ).strip().lower()
if replace_type and replace_type not in ROLES: if replace_type and replace_type not in ROLES:
replace_type = None replace_type = None
if replace_type == "": if replace_type == "":
new.append(m.group(0)) new.append(m.group(0))
continue continue
if replace_type == "skip": if replace_type == "skip":
new.append(m.group(0)) new.append(m.group(0))
ALWAYS_SKIP.append(m.group(1)) ALWAYS_SKIP.append(m.group(1))
continue continue
default = lastvalues.get(m.group(1), m.group(1)) default = lastvalues.get(m.group(1), m.group(1))
if default.endswith("()") and replace_type in ("class", "func", "meth"): if default.endswith("()") and replace_type in ("class", "func", "meth"):
default = default[:-2] default = default[:-2]
replace_value = raw_input( replace_value = raw_input(
colorize("Text <target> [", fg="yellow") + default + colorize("]: ", fg="yellow") colorize("Text <target> [", fg="yellow") + default + colorize("]: ", fg="yellow")
).strip() ).strip()
if not replace_value: if not replace_value:
replace_value = default replace_value = default
new.append(":%s:`%s`" % (replace_type, replace_value)) new.append(":%s:`%s`" % (replace_type, replace_value))
lastvalues[m.group(1)] = replace_value lastvalues[m.group(1)] = replace_value
new.append(data[last:]) new.append(data[last:])
with open(fname, "w") as fp: with open(fname, "w") as fp:
fp.write("".join(new)) fp.write("".join(new))
storage["lastvalues"] = lastvalues storage["lastvalues"] = lastvalues
storage.close() storage.close()
# #
# The following is taken from django.utils.termcolors and is copied here to # The following is taken from django.utils.termcolors and is copied here to
# avoid the dependency. # avoid the dependency.

View File

@ -2,13 +2,13 @@
{%- macro secondnav() %} {%- macro secondnav() %}
{%- if prev %} {%- if prev %}
&laquo; <a href="{{ prev.link|e }}" title="{{ prev.title|e }}">previous</a> &laquo; <a href="{{ prev.link|e }}" title="{{ prev.title|e }}">previous</a>
{{ reldelim2 }} {{ reldelim2 }}
{%- endif %} {%- endif %}
{%- if parents %} {%- if parents %}
<a href="{{ parents.0.link|e }}" title="{{ parents.0.title|e }}" accesskey="U">up</a> <a href="{{ parents.0.link|e }}" title="{{ parents.0.title|e }}" accesskey="U">up</a>
{%- else %} {%- else %}
<a title="{{ docstitle }}" href="{{ pathto('index') }}" accesskey="U">up</a> <a title="{{ docstitle }}" href="{{ pathto('index') }}" accesskey="U">up</a>
{%- endif %} {%- endif %}
{%- if next %} {%- if next %}
{{ reldelim2 }} {{ reldelim2 }}
@ -65,13 +65,13 @@
</div> </div>
<div class="nav">{{ secondnav() }}</div> <div class="nav">{{ secondnav() }}</div>
</div> </div>
<div id="bd"> <div id="bd">
<div id="yui-main"> <div id="yui-main">
<div class="yui-b"> <div class="yui-b">
<div class="yui-g" id="{{ pagename|replace('/', '-') }}"> <div class="yui-g" id="{{ pagename|replace('/', '-') }}">
{% block body %}{% endblock %} {% block body %}{% endblock %}
</div> </div>
</div> </div>
</div> </div>
{% block sidebarwrapper %} {% block sidebarwrapper %}
@ -82,11 +82,11 @@
<h3>Last update:</h3> <h3>Last update:</h3>
<p class="topless">{{ last_updated }}</p> <p class="topless">{{ last_updated }}</p>
{%- endif %} {%- endif %}
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
</div> </div>
<div id="ft"> <div id="ft">
<div class="nav">{{ secondnav() }}</div> <div class="nav">{{ secondnav() }}</div>
</div> </div>
@ -113,7 +113,7 @@
<ul><li>{{ title }}</li></ul> <ul><li>{{ title }}</li></ul>
{% for p in parents %}</li></ul>{% endfor %} {% for p in parents %}</li></ul>{% endfor %}
</li> </li>
</ul> </ul>
{% endblock %} {% endblock %}
{# Empty some default blocks out #} {# Empty some default blocks out #}

View File

@ -4,7 +4,7 @@ Django FAQ
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
general general
install install
usage usage

View File

@ -175,7 +175,7 @@ This means the ticket has an associated
:doc:`patch<writing-code/submitting-patches>`. These will be reviewed :doc:`patch<writing-code/submitting-patches>`. These will be reviewed
to see if the patch is "good". to see if the patch is "good".
The following three fields (Needs documentation, Needs tests, The following three fields (Needs documentation, Needs tests,
Patch needs improvement) apply only if a patch has been supplied. Patch needs improvement) apply only if a patch has been supplied.
Needs documentation Needs documentation

View File

@ -67,7 +67,7 @@ as possible.
The `discussion of DRY on the Portland Pattern Repository`__ The `discussion of DRY on the Portland Pattern Repository`__
__ http://c2.com/cgi/wiki?DontRepeatYourself __ http://c2.com/cgi/wiki?DontRepeatYourself
.. _explicit-is-better-than-implicit: .. _explicit-is-better-than-implicit:
Explicit is better than implicit Explicit is better than implicit

View File

@ -6,7 +6,7 @@ your kitchen with the scissors, batteries, duct tape, and other junk.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
api-stability api-stability
design-philosophies design-philosophies
distributions distributions

View File

@ -9,7 +9,7 @@ GeoDjango Forms API
.. versionadded:: 1.6 .. versionadded:: 1.6
GeoDjango provides some specialized form fields and widgets in order to visually GeoDjango provides some specialized form fields and widgets in order to visually
display and edit geolocalized data on a map. By default, they use display and edit geolocalized data on a map. By default, they use
`OpenLayers`_-powered maps, with a base WMS layer provided by `Metacarta`_. `OpenLayers`_-powered maps, with a base WMS layer provided by `Metacarta`_.

View File

@ -139,7 +139,7 @@ A related object set can be replaced in bulk with one operation by assigning a
new iterable of objects to it:: new iterable of objects to it::
>>> new_list = [obj1, obj2, obj3] >>> new_list = [obj1, obj2, obj3]
>>> e.related_set = new_list >>> e.related_set = new_list
If the foreign key relationship has ``null=True``, then the related manager If the foreign key relationship has ``null=True``, then the related manager
will first call ``clear()`` to disassociate any existing objects in the related will first call ``clear()`` to disassociate any existing objects in the related

View File

@ -56,7 +56,7 @@ Split ``CacheMiddleware``
into and reading from the cache) separately, offering additional into and reading from the cache) separately, offering additional
flexibility for situations where combining these functions into a flexibility for situations where combining these functions into a
single middleware posed problems. Full details, including updated single middleware posed problems. Full details, including updated
notes on appropriate use, are in notes on appropriate use, are in
:doc:`the caching documentation </topics/cache>`. :doc:`the caching documentation </topics/cache>`.
Removal of deprecated features Removal of deprecated features

View File

@ -100,7 +100,7 @@ interested in helping out with Django's development, feel free to join the
discussions there. discussions there.
Django's online documentation also includes pointers on how to contribute to Django's online documentation also includes pointers on how to contribute to
Django: Django:
* :doc:`How to contribute to Django </internals/contributing/index>` * :doc:`How to contribute to Django </internals/contributing/index>`

Some files were not shown because too many files have changed in this diff Show More