1
0
mirror of https://github.com/django/django.git synced 2025-07-03 17:29: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
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.
USE_ETAGS = False

View File

@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-04-25 00:18+0200\n"
"PO-Revision-Date: 2008-03-29 01:37+0100\n"
"POT-Creation-Date: 2007-02-15 00:00+0200\n"
"PO-Revision-Date: 2008-05-14 11:15+0200\n"
"Last-Translator: Django Catalan Group <django-cat@googlegroups.com>\n"
"Language-Team: Catalan <ca@li.org>\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\"? "
"All of the following related items will be deleted:"
msgstr ""
"Esteu segurs de voler esborrar els/les %(object_name)s \"%(escaped_object)s\"? "
"S'esborraran els següents elements relacionats:"
"Esteu segurs de voler esborrar els/les %(object_name)s \"%(escaped_object)s"
"\"? S'esborraran els següents elements relacionats:"
#: contrib/admin/templates/admin/delete_confirmation.html:25
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 "
"options."
msgstr ""
"Primer, entreu un usuari i una contrasenya. Després podreu editar més opcions "
"de l'usuari."
"Primer, entreu un usuari i una contrasenya. Després podreu editar més "
"opcions de l'usuari."
#: contrib/admin/templates/admin/auth/user/add_form.html:12
msgid "Username"
@ -599,8 +599,8 @@ msgstr ""
"Ara podeu escollir el 'bookmarklet' des de qualsevol pàgina del lloc.\n"
"Observeu que alguns d'aquests 'bookmarklets' precisen que estigui veient\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 "
"vostre).</p>\n"
"amb el vostre administrador de sistemes si no esteu segurs de la condició "
"del vostre).</p>\n"
#: contrib/admin/templates/admin_doc/bookmarklets.html:18
msgid "Documentation for this page"
@ -826,8 +826,8 @@ msgid ""
"cookies, reload this page, and try again."
msgstr ""
"Sembla ser que el vostre navegador no està configurat per acceptar "
"'cookies' (galetes). Si us plau, habiliteu les 'cookies', recarregueu aquesta "
"pàgina i proveu-ho de nou. "
"'cookies' (galetes). Si us plau, habiliteu les 'cookies', recarregueu "
"aquesta pàgina i proveu-ho de nou. "
#: contrib/admin/views/decorators.py:90
msgid "Usernames cannot contain the '@' character."
@ -837,7 +837,8 @@ msgstr "Els noms d'usuari no poden contenir el caracter '@'."
#, python-format
msgid "Your e-mail address is not your username. Try '%s' instead."
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:52
@ -1070,7 +1071,7 @@ msgstr "Seleccioneu %s"
msgid "Select %s to change"
msgstr "Seleccioneu %s per modificar"
#: contrib/admin/views/main.py:784
#: contrib/admin/views/main.py:765
msgid "Database error"
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 "
"you've registered?"
msgstr ""
"Aquesta adreça de correu no té associada cap compte d'usuari. Esteu segurs de "
"que s'ha registrat?"
"Aquesta adreça de correu no té associada cap compte d'usuari. Esteu segurs "
"de que s'ha registrat?"
#: contrib/auth/forms.py:107
#, python-format
@ -1173,8 +1174,8 @@ msgid ""
"Use '[algo]$[salt]$[hexdigest]' or use the <a href=\"password/\">change "
"password form</a>."
msgstr ""
"Utilitzeu '[algo]$[salt]$[hexdigest]' o el <a href=\"password/\">formulari de "
"canvi de contrasenya</a>."
"Utilitzeu '[algo]$[salt]$[hexdigest]' o el <a href=\"password/\">formulari "
"de canvi de contrasenya</a>."
#: contrib/auth/models.py:136
msgid "staff status"
@ -1189,12 +1190,11 @@ msgid "active"
msgstr "actiu"
#: contrib/auth/models.py:137
#, fuzzy
msgid ""
"Designates whether this user should be treated as active. Unselect this "
"instead of deleting accounts."
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."
#: contrib/auth/models.py:138
@ -1327,8 +1327,8 @@ msgid ""
"Check this box if the comment is inappropriate. A \"This comment has been "
"removed\" message will be displayed instead."
msgstr ""
"Marqueu aquesta caixa si el comentari no és apropiat. En lloc seu es mostrarà "
"\"Aquest comentari ha estat eliminat\" "
"Marqueu aquesta caixa si el comentari no és apropiat. En lloc seu es "
"mostrarà \"Aquest comentari ha estat eliminat\" "
#: contrib/comments/models.py:96
msgid "comments"
@ -1572,8 +1572,8 @@ msgstr "tipus de continguts"
msgid ""
"Example: '/about/contact/'. Make sure to have leading and trailing slashes."
msgstr ""
"Exemple: '/about/contact/'. Assegureu-vos de posar les barres al principi i al "
"final."
"Exemple: '/about/contact/'. Assegureu-vos de posar les barres al principi i "
"al final."
#: contrib/flatpages/models.py:10
msgid "title"
@ -1617,7 +1617,7 @@ msgstr "pàgines estàtiques"
#: contrib/flatpages/models.py:27
msgid "Advanced options"
msgstr ""
msgstr "Opcions avançades"
#: contrib/humanize/templatetags/humanize.py:19
msgid "th"
@ -2254,8 +2254,8 @@ msgid ""
"Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or "
"9XXXXXXXX."
msgstr ""
"Introduïu un número de telèfon vàlid en un dels formats 6XXXXXXXX, "
"8XXXXXXXX o 9XXXXXXXX."
"Introduïu un número de telèfon vàlid en un dels formats 6XXXXXXXX, 8XXXXXXXX "
"o 9XXXXXXXX."
#: contrib/localflavor/es/forms.py:66
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"
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."
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."
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."
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 "
"corrupted image."
msgstr ""
"Envieu una imatge vàlida. El fitxer que heu enviat no era una imatge o estava "
"corrupte."
"Envieu una imatge vàlida. El fitxer que heu enviat no era una imatge o "
"estava corrupte."
#: core/validators.py:200
#, 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_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[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
#, python-format
@ -3782,11 +3783,11 @@ msgid ""
msgid_plural ""
"Please enter a valid decimal number with a whole part of at most %s digits."
msgstr[0] ""
"Si us plau, introduïu un número decimal vàlid que la seva part sencera "
"sigui de com a màxim %s digit."
"Si us plau, introduïu un número decimal vàlid que la seva part sencera sigui "
"de com a màxim %s digit."
msgstr[1] ""
"Si us plau, introduïu un número decimal vàlid que la seva part sencera "
"sigui de com a màxim %s digits."
"Si us plau, introduïu un número decimal vàlid que la seva part sencera sigui "
"de com a màxim %s digits."
#: core/validators.py:450
#, 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
#, python-format
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
#, python-format
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
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."
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
msgid "%(optname)s with this %(fieldname)s already exists."
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:759 db/models/fields/__init__.py:770
#: db/models/fields/__init__.py:179 db/models/fields/__init__.py:348
#: db/models/fields/__init__.py:780 db/models/fields/__init__.py:791
#: newforms/fields.py:46 oldforms/__init__.py:374
msgid "This field is required."
msgstr "Aquest camp és obligatori."
#: db/models/fields/__init__.py:427
#: db/models/fields/__init__.py:448
msgid "This value must be an integer."
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."
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."
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."
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."
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."
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
msgid "Please enter a valid %s."
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."
msgstr "Separi múltiples IDs amb comes."
#: db/models/fields/related.py:703
#: db/models/fields/related.py:723
msgid ""
"Hold down \"Control\", or \"Command\" on a Mac, to select more than one."
msgstr ""
"Premeu la tecla \"Control\" -o \"Command\" en un Mac- per seleccionar més "
"d'un valor."
#: db/models/fields/related.py:750
#: db/models/fields/related.py:770
#, python-format
msgid "Please enter valid %(self)s IDs. The value %(value)r is invalid."
msgid_plural ""
@ -3965,15 +3968,15 @@ msgstr "Introduïu un valor vàlid."
#, python-format
msgid "Ensure this value has at most %(max)d characters (it has %(length)d)."
msgstr ""
"Assegureu-vos de que el valor té com a màxim %(max)d caràcters (en té %(length)"
"d)."
"Assegureu-vos de que el valor té com a màxim %(max)d caràcters (en té %"
"(length)d)."
#: newforms/fields.py:125
#, python-format
msgid "Ensure this value has at least %(min)d characters (it has %(length)d)."
msgstr ""
"Assegureu-vos de que el valor té com a mínim %(min)d caràcters (en té %(length)"
"d)."
"Assegureu-vos de que el valor té com a mínim %(min)d caràcters (en té %"
"(length)d)."
#: newforms/fields.py:153 newforms/fields.py:182 newforms/fields.py:211
#, python-format
@ -4035,7 +4038,8 @@ msgstr "Aquesta URL sembla ser un enllaç trencat."
#: newforms/fields.py:560 newforms/models.py:299
msgid "Select a valid choice. That choice is not one of the available choices."
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
#, 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
if '@' in username:
# Mistakenly entered e-mail address instead of username? Look it up.
try:
user = User.objects.get(email=username)
except User.DoesNotExist:
message = _("Usernames cannot contain the '@' character.")
users = list(User.objects.filter(email=username))
if len(users) == 1:
message = _("Your e-mail address is not your username. Try '%s' instead.") % users[0].username
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)
# 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.
exc_info = sys.exc_info()
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
return debug.technical_500_response(request, *exc_info)
else:

View File

@ -339,6 +339,8 @@ class Model(object):
dispatcher.send(signal=signals.post_save, sender=self.__class__,
instance=self, created=(not record_exists), raw=raw)
save_base.alters_data = True
def validate(self):
"""
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
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
---------------