Commit Graph

7068 Commits

Author SHA1 Message Date
Aymeric Augustin ddb2a9eb9e Fixed #17414 -- Prevented numberformat from trying to group digits when the number of digits per group is zero.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-24 11:01:57 +00:00
Luke Plant 1c16907199 Added a password reset link to default admin login page if a password reset URL is available.
You no longer have to override the admin login page just to get that link to
appear!

Also provided much better docs for how to plug in the provided password
reset mechanism with minimum effort.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17266 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-24 00:14:45 +00:00
Ramiro Morales 7c6e265a9f Refactored the internals of makemessages management command for better readability.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 11:24:35 +00:00
Jannis Leidel 64066a59d9 Fixed #17450 -- Added missing import to auth models module forgotten in r17253. Thanks, aalbrecht.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 11:22:13 +00:00
Jannis Leidel 7a67102e8d Fixed django.utils.timezone.__all__ to include correct function names.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 11:19:00 +00:00
James Bennett 0e29e48c05 Bump to 1.4 alpha 1.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17255 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 04:00:26 +00:00
Paul McMillan 90e05aaeac Renovated password hashing, including the forgotten files in r17253.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 03:53:56 +00:00
Paul McMillan dce820ff70 Renovated password hashing. Many thanks to Justine Tunney for help with the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 03:46:06 +00:00
Gabriel Hurley a0721a3017 Fixed #15900 -- Calls to reverse with nested namespaced urls are escaped properly and capture parameters as expected.
Thanks to teolicy for the report, and dmclain for the patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17251 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 23:03:48 +00:00
Jannis Leidel 4c376852fe Updated English base translation files in preparation of the alpha release so Transifex can pick them up.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 23:02:28 +00:00
Jannis Leidel 0e9b1041d7 Fixed a broken translation string in the flatpages' forms module.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 23:01:53 +00:00
Jannis Leidel cbe82411cc Added yet another missing with_statement import. Thanks, Florian Apolloner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 22:46:05 +00:00
Jannis Leidel ad1c376d39 Fixed a missing exception (`WindowsError`) when using the rmtree error handler on non-Windows systems.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 22:38:10 +00:00
Jannis Leidel a9a0f0b03f Fixed #17042 -- Extended startproject and startapp management commands to better handle custom app and project templates. Many thanks to Preston Holmes for his initial patch and Alex Gaynor, Carl Meyer, Donald Stufft, Jacob Kaplan-Moss and Julien Phalip for code reviewing.
* Added ability to pass the project or app directory path as the second argument
* Added ``--template`` option for specifying custom project and app templates
* Cleaned up admin_scripts tests a little while I was there

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 22:38:02 +00:00
Adrian Holovaty 98c974c70b Fixed super-edge-case bug in debug view where exc_value.args was empty. I managed to trigger this in some template code
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 22:08:32 +00:00
Ramiro Morales 287565779d Added support for modifying the effect of ``DISTINCT`` clauses so they
only consider some fields (PostgreSQL only).

For this, the ``distinct()`` QuerySet method now accepts an optional
list of model fields names and generates ``DISTINCT ON`` clauses on
these cases. Thanks Jeffrey Gelens and Anssi Kääriäinen for their work.

Fixes #6422.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 20:42:40 +00:00
Julien Phalip 2f02a05ffb Fixed #2879 -- Added support for the integration with Selenium and other in-browser testing frameworks. Also added the first Selenium tests for `contrib.admin`. Many thanks to everyone for their contributions and feedback: Mikeal Rogers, Dirk Datzert, mir, Simon G., Almad, Russell Keith-Magee, Denis Golomazov, devin, robertrv, andrewbadr, Idan Gazit, voidspace, Tom Christie, hjwp2, Adam Nelson, Jannis Leidel, Anssi Kääriäinen, Preston Holmes, Bruno Renié and Jacob Kaplan-Moss.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 08:33:58 +00:00
Julien Phalip 45e3dff5ac Ensured that `makemessages` doesn't leave any temporary file over if the parsing of a template file fails. Refs #8536.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-21 15:35:58 +00:00
Ramiro Morales 554f0601b5 Stopped unconditionally reversing admin model add/change URLs.
Starting with [16857] this could cause HTTP 500 errors when
`ModelAdmin.get_urls()` has been customized to the point it doesn't
provide these standard URLs.

Fixes #17333. Refs #15294.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 14:59:14 +00:00
Julien Phalip 259ebcdeea Fixed #17408 -- Cleaned up some namings in `contrib.formtools`. Thanks, Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 13:52:40 +00:00
Julien Phalip 355f7fc564 Fixed #17163 -- Added the `NamedUrlWizardView.get_step_url()` method. Thanks, Bradley Ayers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 13:36:32 +00:00
Julien Phalip 1ef6841cad Fixed #17162 -- Removed the useless `WizardView.get_wizard_name()` method. Thanks, Bradley Ayers and Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 13:13:41 +00:00
Julien Phalip ed56e2c4a8 Fixed #17151 -- Renamed `wizard_prev_step` to the clearer `wizard_goto_step` in `NamedUrlWizardView`. Thanks, Bradley Ayers and Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 12:58:18 +00:00
Julien Phalip ad5df5119f Fixed #17150 -- Made `NamedUrlWizardView.url_name` available in the template context. Thanks to Bradley Ayers for the suggestion and to Stephan Jaekel for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 12:28:39 +00:00
Julien Phalip 3e790ae632 Fixed #17148 -- Fixed the signature of `WizardView.get_context_data()` to play nicer with mixin inheritance. Thanks, Bradley Ayers and Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 12:11:12 +00:00
Ramiro Morales 5003df3659 Tweaked changes from r17228 to cater for older simplejson versions.
dump() started accepting the `use_decimal` argument in 2.1.3.

Refs #16850.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 23:00:41 +00:00
Ramiro Morales b5d9ad982d Fixed #16850 -- Made sure we always represent Decimal instances with JS strings when serializing.
We force this when calling simplejson dump() to isolate us from changes of
default behavior to encode them with JavaScript numbers instead that could
introduce loss of precision when decoding back from JSON to Python.

Thanks Raphael Hertzog for the report and Bob Ippolito for his help.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 22:10:37 +00:00
Adrian Holovaty 20c8aa2a20 Fixed various dodgy behaviours
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 17:37:24 +00:00
Aymeric Augustin c7534584e8 Explained why UserCreationForm performs custom validation of usernames. Refs #13147.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 15:30:55 +00:00
Aymeric Augustin a4e516b593 Fixed #11166 -- {% widthratio %} should return 0 when the maximum is 0, no matter the value.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 10:27:14 +00:00
Adrian Holovaty 8767439af4 Converted some of the built-in views to use content_type instead of mimetype HttpResponse argument. Refs #16519
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 03:53:25 +00:00
Adrian Holovaty bfb4ed1425 Negligible spacing fixes to comments in django/http/__init__.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:40:35 +00:00
Adrian Holovaty 81bf5e3950 Fixed comma splice in DeprecationWarning for CompatCookie
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:37:26 +00:00
Adrian Holovaty 637a70fa7b Negligible spacing cleanup in utils/dateparse.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:31:34 +00:00
Adrian Holovaty 286c5c811b Fixed #17233 -- Fixed typo in defaultfilters.py docstring. Thanks, aalexapolsky
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:27:00 +00:00
Adrian Holovaty 913b39b37f Fixed #17422 -- Changed BaseDetailView to use *args, to be consistent with other views
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:16:52 +00:00
Adrian Holovaty 3f003a3c4b Fixed #17323 -- Renamed HttpRequest.raw_post_data to request.body. Thanks for the patch, dstufft
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 23:40:32 +00:00
Adrian Holovaty 61f0aff811 Fixed #14597 -- Added a SECURE_PROXY_SSL_HEADER setting for cases when you're behind a proxy that 'swallows' the fact that a request is HTTPS
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 22:06:06 +00:00
Adrian Holovaty 4d32e6abc2 Removed incorrect comment in core/handlers/modpython.py. If it were true, the modpython handler wouldn't be working, because the handler's module imports from django.http, which includes a settings import
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 20:37:12 +00:00
Adrian Holovaty 082cfce185 Negligible typo fix in a comment in handlers/wsgi.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 20:21:16 +00:00
Julien Phalip a1d2f1f7b7 Ensured that thread-shareability gets validated when closing a PostgreSQL or SQLite connection. Refs #17258.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 17:02:41 +00:00
Julien Phalip 34e248efec Fixed #17258 -- Moved `threading.local` from `DatabaseWrapper` to the `django.db.connections` dictionary. This allows connections to be explicitly shared between multiple threads and is particularly useful for enabling the sharing of in-memory SQLite connections. Many thanks to Anssi Kääriäinen for the excellent suggestions and feedback, and to Alex Gaynor for the reviews. Refs #2879.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 13:40:19 +00:00
Jannis Leidel 5df31c0164 Fixed #17194 -- Made sure the auth form tests work if a language other than English is activated by moving the error message translation strings into class level dictionaries. Many thanks to Claude Paroz, rabio and Bas Peschier for their initial work on this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-15 16:12:46 +00:00
Luke Plant 655b29b5ba Fixed #16563 - Error pickling request.user
Thanks to zero.fuxor for the report

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-15 02:33:14 +00:00
Luke Plant a935d436e9 Fixed #15863 - SimpleCookies are not correctly serialized with the file or database cache backends
Thanks to rakuco for the report and for the tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 21:04:56 +00:00
Aymeric Augustin 694bc0f22b Fixed #16397 -- Respected the --traceback flag in BaseCommand. This should make import loops easier to debug. Refs #11667, #17369.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 10:03:09 +00:00
Aymeric Augustin affca1369c Fixed #16632 -- Crash on responses without Content-Type with IE. Thanks juan for the report and kenth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 08:58:14 +00:00
Aymeric Augustin 219b41cc15 Fixed #17266 -- Skipped the "SET TIME ZONE" query for PostgreSQL when it isn't necessary.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 08:19:04 +00:00
Ramiro Morales f2e99ecfda Made makemessages leave `'%%'` sequences untouched when extracting translatable literals from blocktrans template tags.
This makes it consistent with behavior introduced when fixing #11240 in
processing of literal passed to the trans tag to avoid double escaping
(i.e. `'%%%%'` sequences in resulting PO files.)

Also, cleaned up tests changes from r17190 (removed commented out code and
implemented compatibility with Python 2.5.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:48:26 +00:00
Ramiro Morales ff7556c4ec Fixed #11240 -- Made makemessages i18n command escape % symbols in literals passed to the trans tag.
This avoids problems with unintended automatic detection, marking and
validation of Python string formatting specifiers performed by
xgettext(1)/msgfmt(1) that stem from the fact that under the hood makemessages
converts templates to Python code before passing them to xgettext.

This also makes it consistent with its behavior on literals passed to the
blocktrans tag.

Thanks Jannis and claude for reviewing and feedback.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:07:06 +00:00