1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

gis: Merged revisions 7526,7534-7539 via svnmerge from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Justin Bronn 2008-05-18 18:27:22 +00:00
parent c3f48762fc
commit 5fd838c4dc
9 changed files with 614 additions and 564 deletions

View File

@ -11,6 +11,10 @@ gettext_noop = lambda s: s
DEBUG = False DEBUG = False
TEMPLATE_DEBUG = False TEMPLATE_DEBUG = False
# True if BaseHandler.get_response() should propagate raw exceptions
# rather than catching them. This is useful under some testing siutations,
# and should never be used on a live site.
DEBUG_PROPAGATE_EXCEPTIONS = False
# Whether to use the "Etag" header. This saves bandwidth but slows down performance. # Whether to use the "Etag" header. This saves bandwidth but slows down performance.
USE_ETAGS = False USE_ETAGS = False

View File

@ -5,8 +5,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Django\n" "Project-Id-Version: Django\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-04-25 00:18+0200\n" "POT-Creation-Date: 2007-02-15 00:00+0200\n"
"PO-Revision-Date: 2008-03-29 01:37+0100\n" "PO-Revision-Date: 2008-05-14 11:15+0200\n"
"Last-Translator: Django Catalan Group <django-cat@googlegroups.com>\n" "Last-Translator: Django Catalan Group <django-cat@googlegroups.com>\n"
"Language-Team: Catalan <ca@li.org>\n" "Language-Team: Catalan <ca@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -409,8 +409,8 @@ msgid ""
"Are you sure you want to delete the %(object_name)s \"%(escaped_object)s\"? " "Are you sure you want to delete the %(object_name)s \"%(escaped_object)s\"? "
"All of the following related items will be deleted:" "All of the following related items will be deleted:"
msgstr "" msgstr ""
"Esteu segurs de voler esborrar els/les %(object_name)s \"%(escaped_object)s\"? " "Esteu segurs de voler esborrar els/les %(object_name)s \"%(escaped_object)s"
"S'esborraran els següents elements relacionats:" "\"? S'esborraran els següents elements relacionats:"
#: contrib/admin/templates/admin/delete_confirmation.html:25 #: contrib/admin/templates/admin/delete_confirmation.html:25
msgid "Yes, I'm sure" msgid "Yes, I'm sure"
@ -546,8 +546,8 @@ msgid ""
"First, enter a username and password. Then, you'll be able to edit more user " "First, enter a username and password. Then, you'll be able to edit more user "
"options." "options."
msgstr "" msgstr ""
"Primer, entreu un usuari i una contrasenya. Després podreu editar més opcions " "Primer, entreu un usuari i una contrasenya. Després podreu editar més "
"de l'usuari." "opcions de l'usuari."
#: contrib/admin/templates/admin/auth/user/add_form.html:12 #: contrib/admin/templates/admin/auth/user/add_form.html:12
msgid "Username" msgid "Username"
@ -599,8 +599,8 @@ msgstr ""
"Ara podeu escollir el 'bookmarklet' des de qualsevol pàgina del lloc.\n" "Ara podeu escollir el 'bookmarklet' des de qualsevol pàgina del lloc.\n"
"Observeu que alguns d'aquests 'bookmarklets' precisen que estigui veient\n" "Observeu que alguns d'aquests 'bookmarklets' precisen que estigui veient\n"
"el lloc des de un ordinador senyalat com a \"intern\" (parleu\n" "el lloc des de un ordinador senyalat com a \"intern\" (parleu\n"
"amb el vostre administrador de sistemes si no esteu segurs de la condició del " "amb el vostre administrador de sistemes si no esteu segurs de la condició "
"vostre).</p>\n" "del vostre).</p>\n"
#: contrib/admin/templates/admin_doc/bookmarklets.html:18 #: contrib/admin/templates/admin_doc/bookmarklets.html:18
msgid "Documentation for this page" msgid "Documentation for this page"
@ -826,8 +826,8 @@ msgid ""
"cookies, reload this page, and try again." "cookies, reload this page, and try again."
msgstr "" msgstr ""
"Sembla ser que el vostre navegador no està configurat per acceptar " "Sembla ser que el vostre navegador no està configurat per acceptar "
"'cookies' (galetes). Si us plau, habiliteu les 'cookies', recarregueu aquesta " "'cookies' (galetes). Si us plau, habiliteu les 'cookies', recarregueu "
"pàgina i proveu-ho de nou. " "aquesta pàgina i proveu-ho de nou. "
#: contrib/admin/views/decorators.py:90 #: contrib/admin/views/decorators.py:90
msgid "Usernames cannot contain the '@' character." msgid "Usernames cannot contain the '@' character."
@ -837,7 +837,8 @@ msgstr "Els noms d'usuari no poden contenir el caracter '@'."
#, python-format #, python-format
msgid "Your e-mail address is not your username. Try '%s' instead." msgid "Your e-mail address is not your username. Try '%s' instead."
msgstr "" msgstr ""
"La vostra adreça de correu no és el vostre nom d'usuari. Provi '%s' en tot cas." "La vostra adreça de correu no és el vostre nom d'usuari. Provi '%s' en tot "
"cas."
#: contrib/admin/views/doc.py:48 contrib/admin/views/doc.py:50 #: contrib/admin/views/doc.py:48 contrib/admin/views/doc.py:50
#: contrib/admin/views/doc.py:52 #: contrib/admin/views/doc.py:52
@ -1070,7 +1071,7 @@ msgstr "Seleccioneu %s"
msgid "Select %s to change" msgid "Select %s to change"
msgstr "Seleccioneu %s per modificar" msgstr "Seleccioneu %s per modificar"
#: contrib/admin/views/main.py:784 #: contrib/admin/views/main.py:765
msgid "Database error" msgid "Database error"
msgstr "Error de base de dades" msgstr "Error de base de dades"
@ -1099,8 +1100,8 @@ msgid ""
"That e-mail address doesn't have an associated user account. Are you sure " "That e-mail address doesn't have an associated user account. Are you sure "
"you've registered?" "you've registered?"
msgstr "" msgstr ""
"Aquesta adreça de correu no té associada cap compte d'usuari. Esteu segurs de " "Aquesta adreça de correu no té associada cap compte d'usuari. Esteu segurs "
"que s'ha registrat?" "de que s'ha registrat?"
#: contrib/auth/forms.py:107 #: contrib/auth/forms.py:107
#, python-format #, python-format
@ -1173,8 +1174,8 @@ msgid ""
"Use '[algo]$[salt]$[hexdigest]' or use the <a href=\"password/\">change " "Use '[algo]$[salt]$[hexdigest]' or use the <a href=\"password/\">change "
"password form</a>." "password form</a>."
msgstr "" msgstr ""
"Utilitzeu '[algo]$[salt]$[hexdigest]' o el <a href=\"password/\">formulari de " "Utilitzeu '[algo]$[salt]$[hexdigest]' o el <a href=\"password/\">formulari "
"canvi de contrasenya</a>." "de canvi de contrasenya</a>."
#: contrib/auth/models.py:136 #: contrib/auth/models.py:136
msgid "staff status" msgid "staff status"
@ -1189,12 +1190,11 @@ msgid "active"
msgstr "actiu" msgstr "actiu"
#: contrib/auth/models.py:137 #: contrib/auth/models.py:137
#, fuzzy
msgid "" msgid ""
"Designates whether this user should be treated as active. Unselect this " "Designates whether this user should be treated as active. Unselect this "
"instead of deleting accounts." "instead of deleting accounts."
msgstr "" msgstr ""
"Designa si aquest usuari ha de ser tractat com a actiu. Desekeccioneu-ho " "Designa si aquest usuari ha de ser tractat com a actiu. Deseleccioneu-ho "
"enlloc d'esborrar comptes d'usuari." "enlloc d'esborrar comptes d'usuari."
#: contrib/auth/models.py:138 #: contrib/auth/models.py:138
@ -1327,8 +1327,8 @@ msgid ""
"Check this box if the comment is inappropriate. A \"This comment has been " "Check this box if the comment is inappropriate. A \"This comment has been "
"removed\" message will be displayed instead." "removed\" message will be displayed instead."
msgstr "" msgstr ""
"Marqueu aquesta caixa si el comentari no és apropiat. En lloc seu es mostrarà " "Marqueu aquesta caixa si el comentari no és apropiat. En lloc seu es "
"\"Aquest comentari ha estat eliminat\" " "mostrarà \"Aquest comentari ha estat eliminat\" "
#: contrib/comments/models.py:96 #: contrib/comments/models.py:96
msgid "comments" msgid "comments"
@ -1572,8 +1572,8 @@ msgstr "tipus de continguts"
msgid "" msgid ""
"Example: '/about/contact/'. Make sure to have leading and trailing slashes." "Example: '/about/contact/'. Make sure to have leading and trailing slashes."
msgstr "" msgstr ""
"Exemple: '/about/contact/'. Assegureu-vos de posar les barres al principi i al " "Exemple: '/about/contact/'. Assegureu-vos de posar les barres al principi i "
"final." "al final."
#: contrib/flatpages/models.py:10 #: contrib/flatpages/models.py:10
msgid "title" msgid "title"
@ -1617,7 +1617,7 @@ msgstr "pàgines estàtiques"
#: contrib/flatpages/models.py:27 #: contrib/flatpages/models.py:27
msgid "Advanced options" msgid "Advanced options"
msgstr "" msgstr "Opcions avançades"
#: contrib/humanize/templatetags/humanize.py:19 #: contrib/humanize/templatetags/humanize.py:19
msgid "th" msgid "th"
@ -2254,8 +2254,8 @@ msgid ""
"Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or " "Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or "
"9XXXXXXXX." "9XXXXXXXX."
msgstr "" msgstr ""
"Introduïu un número de telèfon vàlid en un dels formats 6XXXXXXXX, " "Introduïu un número de telèfon vàlid en un dels formats 6XXXXXXXX, 8XXXXXXXX "
"8XXXXXXXX o 9XXXXXXXX." "o 9XXXXXXXX."
#: contrib/localflavor/es/forms.py:66 #: contrib/localflavor/es/forms.py:66
msgid "Please enter a valid NIF, NIE, or CIF." msgid "Please enter a valid NIF, NIE, or CIF."
@ -3628,7 +3628,7 @@ msgstr "L'any ha de ser posterior al 1900"
msgid "Invalid date: %s" msgid "Invalid date: %s"
msgstr "Data invàlida: %s" msgstr "Data invàlida: %s"
#: core/validators.py:156 db/models/fields/__init__.py:527 #: core/validators.py:156 db/models/fields/__init__.py:548
msgid "Enter a valid date in YYYY-MM-DD format." msgid "Enter a valid date in YYYY-MM-DD format."
msgstr "Introduïu una data vàlida en el forma AAAA-MM-DD." msgstr "Introduïu una data vàlida en el forma AAAA-MM-DD."
@ -3636,7 +3636,7 @@ msgstr "Introduïu una data vàlida en el forma AAAA-MM-DD."
msgid "Enter a valid time in HH:MM format." msgid "Enter a valid time in HH:MM format."
msgstr "Introduïu una hora vàlida en el format HH:MM." msgstr "Introduïu una hora vàlida en el format HH:MM."
#: core/validators.py:165 db/models/fields/__init__.py:604 #: core/validators.py:165 db/models/fields/__init__.py:625
msgid "Enter a valid date/time in YYYY-MM-DD HH:MM format." msgid "Enter a valid date/time in YYYY-MM-DD HH:MM format."
msgstr "Introduïu un data/hora vàlida en format YYYY-MM-DD HH:MM." msgstr "Introduïu un data/hora vàlida en format YYYY-MM-DD HH:MM."
@ -3655,8 +3655,8 @@ msgid ""
"Upload a valid image. The file you uploaded was either not an image or a " "Upload a valid image. The file you uploaded was either not an image or a "
"corrupted image." "corrupted image."
msgstr "" msgstr ""
"Envieu una imatge vàlida. El fitxer que heu enviat no era una imatge o estava " "Envieu una imatge vàlida. El fitxer que heu enviat no era una imatge o "
"corrupte." "estava corrupte."
#: core/validators.py:200 #: core/validators.py:200
#, python-format #, python-format
@ -3712,7 +3712,8 @@ msgstr "Introdueixi una abreviatura vàlida d'estat dels E.U.A.."
msgid "Watch your mouth! The word %s is not allowed here." msgid "Watch your mouth! The word %s is not allowed here."
msgid_plural "Watch your mouth! The words %s are not allowed here." msgid_plural "Watch your mouth! The words %s are not allowed here."
msgstr[0] "Vigileu amb el vostre llenguatge! Aquí no s'admet la paraula: %s." msgstr[0] "Vigileu amb el vostre llenguatge! Aquí no s'admet la paraula: %s."
msgstr[1] "Vigileu amb el vostre llenguatge! Aquí no s'admeten les paraules: %s." msgstr[1] ""
"Vigileu amb el vostre llenguatge! Aquí no s'admeten les paraules: %s."
#: core/validators.py:288 #: core/validators.py:288
#, python-format #, python-format
@ -3782,11 +3783,11 @@ msgid ""
msgid_plural "" msgid_plural ""
"Please enter a valid decimal number with a whole part of at most %s digits." "Please enter a valid decimal number with a whole part of at most %s digits."
msgstr[0] "" msgstr[0] ""
"Si us plau, introduïu un número decimal vàlid que la seva part sencera " "Si us plau, introduïu un número decimal vàlid que la seva part sencera sigui "
"sigui de com a màxim %s digit." "de com a màxim %s digit."
msgstr[1] "" msgstr[1] ""
"Si us plau, introduïu un número decimal vàlid que la seva part sencera " "Si us plau, introduïu un número decimal vàlid que la seva part sencera sigui "
"sigui de com a màxim %s digits." "de com a màxim %s digits."
#: core/validators.py:450 #: core/validators.py:450
#, python-format #, python-format
@ -3807,12 +3808,14 @@ msgstr "Si us plau, introduïu un número amb punt de coma flotant vàlid."
#: core/validators.py:467 #: core/validators.py:467
#, python-format #, python-format
msgid "Make sure your uploaded file is at least %s bytes big." msgid "Make sure your uploaded file is at least %s bytes big."
msgstr "Assegureu-vos de que el fitxer que heu enviat té, com a mínim, %s bytes." msgstr ""
"Assegureu-vos de que el fitxer que heu enviat té, com a mínim, %s bytes."
#: core/validators.py:468 #: core/validators.py:468
#, python-format #, python-format
msgid "Make sure your uploaded file is at most %s bytes big." msgid "Make sure your uploaded file is at most %s bytes big."
msgstr "Assegureu-vos de que el fitxer que heu enviat té, com a màxim %s bytes." msgstr ""
"Assegureu-vos de que el fitxer que heu enviat té, com a màxim %s bytes."
#: core/validators.py:485 #: core/validators.py:485
msgid "The format for this field is wrong." msgid "The format for this field is wrong."
@ -3894,58 +3897,58 @@ msgstr ""
msgid "%(object)s with this %(type)s already exists for the given %(field)s." msgid "%(object)s with this %(type)s already exists for the given %(field)s."
msgstr "Ja existeix un %(object)s del tipus %(type)s amb aquest %(field)s." msgstr "Ja existeix un %(object)s del tipus %(type)s amb aquest %(field)s."
#: db/models/fields/__init__.py:52 #: db/models/fields/__init__.py:54
#, python-format #, python-format
msgid "%(optname)s with this %(fieldname)s already exists." msgid "%(optname)s with this %(fieldname)s already exists."
msgstr "Ja existeix %(optname)s amb aquest %(fieldname)s." msgstr "Ja existeix %(optname)s amb aquest %(fieldname)s."
#: db/models/fields/__init__.py:161 db/models/fields/__init__.py:327 #: db/models/fields/__init__.py:179 db/models/fields/__init__.py:348
#: db/models/fields/__init__.py:759 db/models/fields/__init__.py:770 #: db/models/fields/__init__.py:780 db/models/fields/__init__.py:791
#: newforms/fields.py:46 oldforms/__init__.py:374 #: newforms/fields.py:46 oldforms/__init__.py:374
msgid "This field is required." msgid "This field is required."
msgstr "Aquest camp és obligatori." msgstr "Aquest camp és obligatori."
#: db/models/fields/__init__.py:427 #: db/models/fields/__init__.py:448
msgid "This value must be an integer." msgid "This value must be an integer."
msgstr "Aquest valor ha de ser un enter." msgstr "Aquest valor ha de ser un enter."
#: db/models/fields/__init__.py:466 #: db/models/fields/__init__.py:487
msgid "This value must be either True or False." msgid "This value must be either True or False."
msgstr "Aquest valor ha de ser True (Veritat) o False (Fals)" msgstr "Aquest valor ha de ser True (Veritat) o False (Fals)"
#: db/models/fields/__init__.py:490 #: db/models/fields/__init__.py:511
msgid "This field cannot be null." msgid "This field cannot be null."
msgstr "Aquest camp no pot ser nul." msgstr "Aquest camp no pot ser nul."
#: db/models/fields/__init__.py:668 #: db/models/fields/__init__.py:689
msgid "This value must be a decimal number." msgid "This value must be a decimal number."
msgstr "Aquest valor ha de ser un número decimal." msgstr "Aquest valor ha de ser un número decimal."
#: db/models/fields/__init__.py:779 #: db/models/fields/__init__.py:800
msgid "Enter a valid filename." msgid "Enter a valid filename."
msgstr "Introduïu un nom de fitxer vàlid." msgstr "Introduïu un nom de fitxer vàlid."
#: db/models/fields/__init__.py:960 #: db/models/fields/__init__.py:981
msgid "This value must be either None, True or False." msgid "This value must be either None, True or False."
msgstr "Aquest valor ha de ser None (Cap), True (Veritat) o False (Fals)" msgstr "Aquest valor ha de ser None (Cap), True (Veritat) o False (Fals)"
#: db/models/fields/related.py:93 #: db/models/fields/related.py:94
#, python-format #, python-format
msgid "Please enter a valid %s." msgid "Please enter a valid %s."
msgstr "Si us plau, introduïu un %s vàlid." msgstr "Si us plau, introduïu un %s vàlid."
#: db/models/fields/related.py:701 #: db/models/fields/related.py:721
msgid "Separate multiple IDs with commas." msgid "Separate multiple IDs with commas."
msgstr "Separi múltiples IDs amb comes." msgstr "Separi múltiples IDs amb comes."
#: db/models/fields/related.py:703 #: db/models/fields/related.py:723
msgid "" msgid ""
"Hold down \"Control\", or \"Command\" on a Mac, to select more than one." "Hold down \"Control\", or \"Command\" on a Mac, to select more than one."
msgstr "" msgstr ""
"Premeu la tecla \"Control\" -o \"Command\" en un Mac- per seleccionar més " "Premeu la tecla \"Control\" -o \"Command\" en un Mac- per seleccionar més "
"d'un valor." "d'un valor."
#: db/models/fields/related.py:750 #: db/models/fields/related.py:770
#, python-format #, python-format
msgid "Please enter valid %(self)s IDs. The value %(value)r is invalid." msgid "Please enter valid %(self)s IDs. The value %(value)r is invalid."
msgid_plural "" msgid_plural ""
@ -3965,15 +3968,15 @@ msgstr "Introduïu un valor vàlid."
#, python-format #, python-format
msgid "Ensure this value has at most %(max)d characters (it has %(length)d)." msgid "Ensure this value has at most %(max)d characters (it has %(length)d)."
msgstr "" msgstr ""
"Assegureu-vos de que el valor té com a màxim %(max)d caràcters (en té %(length)" "Assegureu-vos de que el valor té com a màxim %(max)d caràcters (en té %"
"d)." "(length)d)."
#: newforms/fields.py:125 #: newforms/fields.py:125
#, python-format #, python-format
msgid "Ensure this value has at least %(min)d characters (it has %(length)d)." msgid "Ensure this value has at least %(min)d characters (it has %(length)d)."
msgstr "" msgstr ""
"Assegureu-vos de que el valor té com a mínim %(min)d caràcters (en té %(length)" "Assegureu-vos de que el valor té com a mínim %(min)d caràcters (en té %"
"d)." "(length)d)."
#: newforms/fields.py:153 newforms/fields.py:182 newforms/fields.py:211 #: newforms/fields.py:153 newforms/fields.py:182 newforms/fields.py:211
#, python-format #, python-format
@ -4035,7 +4038,8 @@ msgstr "Aquesta URL sembla ser un enllaç trencat."
#: newforms/fields.py:560 newforms/models.py:299 #: newforms/fields.py:560 newforms/models.py:299
msgid "Select a valid choice. That choice is not one of the available choices." msgid "Select a valid choice. That choice is not one of the available choices."
msgstr "" msgstr ""
"Escolliy una opció vàlida; Aquesta opció no és una de les opcions disponibles." "Escolli una opció vàlida; Aquesta opció no és una de les opcions "
"disponibles."
#: newforms/fields.py:599 #: newforms/fields.py:599
#, python-format #, python-format

File diff suppressed because it is too large Load Diff

View File

@ -84,12 +84,13 @@ def staff_member_required(view_func):
message = ERROR_MESSAGE message = ERROR_MESSAGE
if '@' in username: if '@' in username:
# Mistakenly entered e-mail address instead of username? Look it up. # Mistakenly entered e-mail address instead of username? Look it up.
try: users = list(User.objects.filter(email=username))
user = User.objects.get(email=username) if len(users) == 1:
except User.DoesNotExist: message = _("Your e-mail address is not your username. Try '%s' instead.") % users[0].username
message = _("Usernames cannot contain the '@' character.")
else: else:
message = _("Your e-mail address is not your username. Try '%s' instead.") % user.username # Either we cannot find the user, or if more than 1
# we cannot guess which user is the correct one.
message = _("Usernames cannot contain the '@' character.")
return _display_login_form(request, message) return _display_login_form(request, message)
# The user data is correct; log in the user in and continue. # The user data is correct; log in the user in and continue.

View File

@ -115,7 +115,10 @@ class BaseHandler(object):
# Get the exception info now, in case another exception is thrown later. # Get the exception info now, in case another exception is thrown later.
exc_info = sys.exc_info() exc_info = sys.exc_info()
receivers = dispatcher.send(signal=signals.got_request_exception, request=request) receivers = dispatcher.send(signal=signals.got_request_exception, request=request)
if settings.DEBUG:
if settings.DEBUG_PROPAGATE_EXCEPTIONS:
raise
elif settings.DEBUG:
from django.views import debug from django.views import debug
return debug.technical_500_response(request, *exc_info) return debug.technical_500_response(request, *exc_info)
else: else:

View File

@ -339,6 +339,8 @@ class Model(object):
dispatcher.send(signal=signals.post_save, sender=self.__class__, dispatcher.send(signal=signals.post_save, sender=self.__class__,
instance=self, created=(not record_exists), raw=raw) instance=self, created=(not record_exists), raw=raw)
save_base.alters_data = True
def validate(self): def validate(self):
""" """
First coerces all fields on this instance to their proper Python types. First coerces all fields on this instance to their proper Python types.

View File

@ -391,6 +391,16 @@ are inappropriate for public consumption. File paths, configuration options, and
the like all give attackers extra information about your server. Never deploy a the like all give attackers extra information about your server. Never deploy a
site with ``DEBUG`` turned on. site with ``DEBUG`` turned on.
DEBUG_PROPAGATE_EXCEPTIONS
--------------------------
Default: ``False``
If set to True, Django's normal exception handling of view functions
will be suppressed, and exceptions will propagate upwards. This can
be useful for some test setups, and should never be used on a live
site.
DEFAULT_CHARSET DEFAULT_CHARSET
--------------- ---------------