Commit Graph

3206 Commits

Author SHA1 Message Date
Bouke Haarsma 4142d15102 Fixed #21388 -- Corrected language code for Frisian 2013-11-11 13:34:01 +01:00
Bouke Haarsma 9b7455e918 Fixed #21351 -- Replaced memoize with Python's lru_cache.
Replaced the custom, untested memoize with a similar decorator from Python's
3.2 stdlib. Although some minor performance degradation (see ticket), it is
expected that in the long run lru_cache will outperform memoize once it is
implemented in C.

Thanks to EvilDMP for the report and Baptiste Mispelon for the idea of
replacing memoize with lru_cache.
2013-11-11 08:53:09 +01:00
Tim Graham d15985d81f Fixed #21398 -- Fixed BCryptSHA256PasswordHasher with py-bcrypt and Python 3.
Thanks arjan at anymore.nl for the report.
2013-11-09 10:11:50 -05:00
Claude Paroz 7e714827ea Don't initialize PostGIS-specific stuff for non-db connections
Refs #16969.
2013-11-09 11:28:16 +01:00
Claude Paroz 60d27fe7da Fixed a typo in admindocs template
Thanks Reza Mohammadi for the report.
2013-11-08 17:25:17 +01:00
Loic Bistuer f51c1f5900 Fixed #17001 -- Custom querysets for prefetch_related.
This patch introduces the Prefetch object which allows customizing prefetch
operations.

This enables things like filtering prefetched relations, calling select_related
from a prefetched relation, or prefetching the same relation multiple times
with different querysets.

When a Prefetch instance specifies a to_attr argument, the result is stored
in a list rather than a QuerySet. This has the fortunate consequence of being
significantly faster. The preformance improvement is due to the fact that we
save the costly creation of a QuerySet instance.

Thanks @akaariai for the original patch and @bmispelon and @timgraham
for the reviews.
2013-11-07 14:49:49 +02:00
Ramiro Morales a9093dd376 Fixed #21387 -- Merge two very similar help texts. 2013-11-06 00:35:20 -03:00
Alex Gaynor c347f78cc1 Fixed all E226 violations 2013-11-03 10:08:55 -08:00
Alex Gaynor 91078f5669 Merge pull request #1861 from milmazz/E251
Fixed flake8 E251 violations
2013-11-03 09:42:31 -08:00
Florian Apolloner f40f90d63b Fixed regressions from 36ded01527.
Refs #21302
2013-11-03 12:45:15 +01:00
Milton Mazzarri cbc7cbbc5b Fixed flake8 E251 violations 2013-11-03 03:22:11 -06:00
Alex Gaynor 4202d9cf0c Whitespace fix 2013-11-03 01:53:28 -07:00
Alex Gaynor 6c1b55d61a Re-expose Count here 2013-11-03 01:52:40 -07:00
coagulant 3bc0d46a84 Fixed all E261 warnings 2013-11-02 18:20:39 -04:00
Alex Gaynor 7548aa8ffd More attacking E302 violators 2013-11-02 13:12:09 -07:00
Boryslav Larin e737c009b8 Fixed flake8 E241 2013-11-02 21:45:40 +02:00
Tim Graham 36ded01527 Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
Alex Gaynor 19256f300e Continue to attack E302 violations 2013-11-02 10:18:46 -07:00
Claude Paroz c64efe3734 Fixed #15529 -- More permissive geojson syntax in constructor
Thanks Wouter Klein Heerenbrink for the report.
2013-10-31 18:15:54 +01:00
Alex Gaynor 726ded5708 Started attackign the next flake8 violation 2013-10-31 08:42:28 -07:00
Baptiste Mispelon 9fde42a69a Fixed #20610: Added a message level dict to contrib.message context processor. 2013-10-30 13:54:07 +01:00
Unai Zalakain fd219fa24c Fixed #8261 -- ModelAdmin hook for customising the "show on site" button
``ModelAdmin.view_on_site`` defines wether to show a link to the object on the
admin detail page. If ``True``, cleverness (i.e. ``Model.get_absolute_url``) is
used to get the url. If it's a callable, the callable is called with the object
as the only parameter. If ``False``, not link is displayed.

With the aim of maitaining backwards compatibility, ``True`` is the default.
2013-10-29 17:10:12 -04:00
Alex Gaynor b9a90b371c Remove dsome import * 2013-10-26 20:57:08 -07:00
Alex Gaynor b35ff0d920 Fixed all the E203 violations 2013-10-26 18:27:42 -07:00
Alex Gaynor f2d8027c9a Fixed up some more flake8 violations (this particular violation still has many occurrences in the tests/ dir so it can't be removed from setup.cfg yet) 2013-10-26 10:50:40 -07:00
Kevin Christopher Henry 08c9ab5a0f Fixed #21227 -- Added workaround for selenium test failures
Added a refresh() before quit() in the selenium tests, since this
solves the problem of spurious test failures in some environments.
2013-10-24 15:07:41 -04:00
Renato Oliveira 43569647ab Fixed #21299 - Changed filters from title to capfirst on admin inline formsets.
Previously there was a mixture of the two which resulted in inconsistent
casing.
2013-10-24 14:44:07 -04:00
Alex Gaynor 9bf5610890 Start attacking E231 violations 2013-10-24 10:30:03 -07:00
Alasdair Nicol c3aa2948c6 Fixed #21298 -- Fixed E301 pep8 warnings 2013-10-23 13:45:03 +01:00
Tim Graham ae48d77ef8 Fixed E225 pep8 warnings. 2013-10-23 06:09:29 -04:00
Ramiro Morales 51d2e1fb23 Fixed #21307 -- Moved TransRealMixin to django.test.utils. 2013-10-22 22:19:56 -03:00
Tim Graham 1597503a01 Fixed E221 pep8 warnings. 2013-10-22 09:51:39 -04:00
Tim Graham 8e2029f8dd Removed import * in tests.
Thanks to flake8 path/to/file.py | awk -F ' ' '{ print $5 }' | sort | uniq
2013-10-22 08:32:01 -04:00
Loic Bistuer e565e1332d Fixed #21275 -- Fixed a serializer error when generating migrations for contrib.auth.
The migration serializer now looks for a deconstruct method on any object.
2013-10-21 14:54:52 -04:00
Florian Apolloner 7d0d0dbf26 Force update of the password on iteration count changes. 2013-10-21 20:31:28 +02:00
Alasdair Nicol b289fcf1bf Fixed #21288 -- Fixed E126 pep8 warnings 2013-10-21 08:31:30 -04:00
Claude Paroz 5f52590368 Fixed #21291 -- Ensured inactive users cannot reset their passwords
Thanks kz26 for the report and the suggested fix. Refs #19758.
2013-10-19 10:43:06 +02:00
Claude Paroz 59a8808632 Cleaned formatting/comments in PasswordResetFormTest 2013-10-19 10:43:06 +02:00
Tim Graham ac4fec5ca2 Fixed bug causing CSRF token not to rotate on login.
Thanks Gavin McQuillan for the report.
2013-10-18 08:31:19 -04:00
Alasdair Nicol a800036981 Fixed #21287 -- Fixed E123 pep8 warnings 2013-10-18 10:07:39 +01:00
Alasdair Nicol bab9123daa Fixed #21268 -- Fixed E303 pep8 warnings 2013-10-18 01:46:24 +01:00
Alasdair Nicol 65d1d65d52 Fixed #21267 -- Fixed E502 pep8 warnings 2013-10-18 01:28:32 +01:00
Alasdair Nicol dfb4cb9970 Fixed #21285 -- Fixed E121,E122 pep8 warnings 2013-10-17 20:20:11 -04:00
Kathryn Killebrew 7e5d7a76bf Fixed #21259 -- Fixed formstools wizard for InlineFormSet. 2013-10-17 14:01:02 -04:00
Tim Graham 9833b931b7 Removed importing formtools tests in __init__.py
Unnecessary since introduction of DiscoveryTestRunner in 9012833af8.
2013-10-17 13:51:36 -04:00
Bouke Haarsma 2fb5a51fa3 Fixed #18659 -- Deprecated request.REQUEST and MergeDict
Thanks Aymeric Augustin for the suggestion.
2013-10-17 09:42:28 -04:00
Alex Gaynor 98788d3c3a Remove some unnecesary uses of bool 2013-10-17 05:27:34 -07:00
Alex Gaynor 7f508a3673 Removed some dead code and simplified some other ocde 2013-10-17 05:15:08 -07:00
Alasdair Nicol eb214452c3 Fixed #21270 -- Fixed E701 pep8 warnings 2013-10-17 12:12:40 +01:00
Tim Graham 91c77eeab8 Avoided hardcoding Permission.name max_length
refs #18866.
2013-10-16 11:31:07 -04:00
Bouke Haarsma 3918eeb9fd Fixed #7551 -- Made GFK allow None init argument.
Thanks SamBull for the report.
2013-10-16 07:03:46 -04:00
Ryan Allen f719d4afc7 Updated admin alert colors
refs #21220.
2013-10-15 10:18:51 -04:00
Unai Zalakain c7634cd7fe Fixed #7603 -- Added a 'scheme' property to the HttpRequest object
`HttpRequest.scheme` is `https` if `settings.SECURE_PROXY_SSL_HEADER` is
appropriately set and falls back to `HttpRequest._get_scheme()` (a hook
for subclasses to implement) otherwise.

`WSGIRequest._get_scheme()` makes use of the `wsgi.url_scheme` WSGI
environ variable to determine the request scheme.

`HttpRequest.is_secure()` simply checks if `HttpRequest.scheme` is
`https`.

This provides a way to check the current scheme in templates, for example.
It also allows us to deal with other schemes.

Thanks nslater for the suggestion.
2013-10-15 09:04:12 -04:00
Tim Graham 975415a8ce Fixed a webdesign template tag docstring to prevent parsing as metadata.
Previously admindocs would throw an error when processing it:
"Error in "default-role" directive: no content permitted."

refs #6681
2013-10-14 19:48:24 -04:00
Larry O'Neill 83b9bfea44 Fixed #21266 -- Fixed E201,E202 pep8 warnings. 2013-10-14 18:12:00 -04:00
Marc Tamlyn 8ce3c3a928 Merge pull request #1733 from joaoxsouls/#18866
Fixed #18866 -- added validation error for verbose_name longer than 39 characters
2013-10-14 06:20:59 -07:00
joaoxsouls 1ab27e9a65 Fixed #18866 -- added validation error for verbose_name longer than 39 characters
Added a validation error check when creating the permissions for model, to avoid
cryptic database error when the verbose_name is longer than 39 characters
thanks elena for reporting it
2013-10-14 14:19:35 +01:00
Claude Paroz 1e8eadc94e Fixed #15888 -- Made tablename argument of createcachetable optional
Thanks Aymeric Augustin for the report and the documentation and
Tim Graham for the review.
2013-10-14 13:24:40 +02:00
Claude Paroz ef22d512b5 Imported custom user classes in tests depending on it
Without those imports, affected test files cannot be run
independently. Refs #21164.
2013-10-14 10:14:24 +02:00
Claude Paroz 21c2bfdff3 Updated OpenLayers version from 2.11 to 2.13 2013-10-12 18:08:07 +02:00
Tim Graham b67ab75e82 Fixed assorted flake8 errors. 2013-10-11 07:25:14 -04:00
Claude Paroz 4b0f8d23c9 Sanitized test assertions in gdal tests 2013-10-10 23:02:31 +02:00
Tim Graham 1dae4ac177 Whitespace cleanup.
* Removed trailing whitespace.
* Added newline to EOF if missing.
* Removed blank lines at EOF.
* Removed some stray tabs.
2013-10-10 16:49:20 -04:00
Tim Graham adedc31072 Fixed "redefinition of unused 'foo' from line X" pyflakes warnings. 2013-10-10 11:09:42 -04:00
crccheck 4523fcd601 Fixed #19924 -- Fixed selectors in actions.js that did not use options. 2013-10-09 10:41:54 -04:00
Baptiste Mispelon 24f9967619 Fixed regression introduced by 20472aa827.
The wrong exception was being caught when detecting the presence of GeoIP.
Thanks to ramiro for the report.
2013-10-09 11:53:43 +02:00
Russell Keith-Magee ddb53856b6 Fixed #21164 -- Added documentation for issue with test users.
The package renaming restores the older package names (which were also the
documented package names). This doesn't affect test discovery because the
module in question doesn't contain any tests.

Thanks to Carl for the design discussion.
2013-10-08 10:32:56 +08:00
Ryan Allen 935001c4f1 Cleaned up admin CSS for consistency.
* header selected twice -merged
* match indentation throughout
* color names to hex

refs #21220.
2013-10-07 14:49:20 -04:00
Ryan Allen 3eab22a045 Added min-width for date and time inputs in admin.
refs #21220.
2013-10-07 14:29:58 -04:00
Simon Charette a8df8e34f9 Revert "Fixed #21241 -- Avoid extraneous JOINs in admin changelist search."
This reverts commit 698dd82eee.

The patch introduced a backward incompatible change.
2013-10-07 13:45:52 -04:00
Ryan Allen 259a6ea82c Added a link in admin branding block to admin index.
Refs #13749 and #21220.
2013-10-07 13:39:40 -04:00
Chris Adams 698dd82eee Fixed #21241 -- Avoid extraneous JOINs in admin changelist search. 2013-10-07 13:10:52 -04:00
Tim Graham 617aceb1b4 Fixed #18263 -- Corrrected handling of hidden fields in tabular admin inlines.
Thanks hvdklauw for the report and patch.
2013-10-07 12:30:02 -04:00
Étienne Loks 8d75d1e1bc Improved error message while setting GeometryProxy 2013-10-06 21:29:39 +02:00
Anssi Kääriäinen 1df3c49a1a Fixed #21174 -- transaction control in related manager methods 2013-10-05 23:07:52 +03:00
Baptiste Mispelon 20472aa827 Fixed #21189: Cleaned up usage of bare except clauses.
Thanks to berkerpeksag for the report and to claudep
for the review.
2013-10-05 11:50:03 +02:00
Simon Charette 948d209ada Fixed #21217 -- Avoid connecting `(pre|post)_init` signals to abstract senders. 2013-10-04 16:23:06 -04:00
Christopher Medrela dc3d2ac98c Fixed #11277 -- Hid labels of fields with HiddenInput widget in admin forms.
Thanks bartTC for the report.
2013-10-04 14:08:06 -04:00
Tai Lee bcd4c3f27d Fixed #6681 -- Don't break docutils when rendering reStructuredText.
Don't set a global default interpreted role function for reStructuredText.
Instead, use the `default-role` directive to change the default only within
the `parse_rst()` function.

Thanks Malcolm Tredinnick for the report.
2013-10-04 13:27:08 -04:00
Ryan Kaskel 8b0014869f Fixed #19321 -- Allowed redirect middleware HTTP responses to be overridden.
Thanks Melevir for the suggestion.
2013-10-04 07:36:39 -04:00
Anentropic c4db7f075e Fixed #19182 -- Fixed ModelAdmin.lookup_allowed to work with ('fieldname', SimpleListFilter) syntax.
Thanks gauss for the report.
2013-10-03 09:37:49 -04:00
Tim Graham 1285ca67eb Fixed #16919 -- Passed user to set_password_form in GET requests.
Thanks Jaime Irurzun for the report and initial patch and
ejucovy for the test.
2013-10-02 13:28:15 -04:00
tschilling 5381317fe3 Fixed #21129 -- Prevented admin filter params modifications from throwing an exception.
Thanks Tuttle for the report.
2013-10-02 08:16:09 -04:00
Ramiro Morales 1d0fc61b1c Fixed #15185 -- Allowed ModelAdmin.list_display_links=None to disable change list links.
Thanks rm_ for the suggestion.
2013-10-01 14:25:54 -04:00
Adam Haney d9bbda7149 * Fixing improper grammar 2013-09-30 16:59:45 -04:00
Loic Bistuer d847ddfe1d Fixed #3871 -- Fixed regression introduced by 04a2a6b.
Added do_not_call_in_templates=True attribute to RelatedManagers
to prevent them from being called.

Thanks jbg@ for the report.
2013-09-30 15:43:44 -04:00
Tim Graham 4745ea1d27 Added hints argument to GeoQuerySet; refs #13724. 2013-09-30 14:16:17 -04:00
Aymeric Augustin 728548e483 Fixed #21134 -- Prevented queries in broken transactions.
Squashed commit of the following:

commit 63ddb271a44df389b2c302e421fc17b7f0529755
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 29 22:51:00 2013 +0200

    Clarified interactions between atomic and exceptions.

commit 2899ec299228217c876ba3aa4024e523a41c8504
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 22 22:45:32 2013 +0200

    Fixed TransactionManagementError in tests.

    Previous commit introduced an additional check to prevent running
    queries in transactions that will be rolled back, which triggered a few
    failures in the tests. In practice using transaction.atomic instead of
    the low-level savepoint APIs was enough to fix the problems.

commit 4a639b059ea80aeb78f7f160a7d4b9f609b9c238
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Sep 24 22:24:17 2013 +0200

    Allowed nesting constraint_checks_disabled inside atomic.

    Since MySQL handles transactions loosely, this isn't a problem.

commit 2a4ab1cb6e83391ff7e25d08479e230ca564bfef
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Sep 21 18:43:12 2013 +0200

    Prevented running queries in transactions that will be rolled back.

    This avoids a counter-intuitive behavior in an edge case on databases
    with non-atomic transaction semantics.

    It prevents using savepoint_rollback() inside an atomic block without
    calling set_rollback(False) first, which is backwards-incompatible in
    tests.

    Refs #21134.

commit 8e3db393853c7ac64a445b66e57f3620a3fde7b0
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 22 22:14:17 2013 +0200

    Replaced manual savepoints by atomic blocks.

    This ensures the rollback flag is handled consistently in internal APIs.
2013-09-30 09:42:27 +02:00
Baptiste Mispelon 8f51ba669a Fixed #21186: Fixed regression when using date fields in the admin's list_filter.
Thanks to onlygoldi2201 for the report and to ramiro and apollo13
for the reviews.
2013-09-28 00:40:43 +02:00
Loic Bistuer 04a2a6b0f9 Fixed #3871 -- Custom managers when traversing reverse relations. 2013-09-25 21:15:59 +03:00
Florian Apolloner 5d74853e15 Revert "Ensure that passwords are never long enough for a DoS."
This reverts commit aae5a96d57.

This fix is no longer necessary, our pbkdf2 (see next commit) implementation
no longer rehashes the password every iteration.
2013-09-24 21:01:21 +02:00
Michał Lech 53c7d66869 Marked PermissionsMixin.user_permissions help_text for translation 2013-09-24 07:36:24 -04:00
Claude Paroz 18fb713e7b Properly marked skipped GIS tests as skipped 2013-09-24 12:23:42 +02:00
Claude Paroz 45403d330a Reformatted some GIS distance tests 2013-09-24 12:23:42 +02:00
Aymeric Augustin a5b062576b Removed a few trailing backslashes.
We have always been at war with trailing backslashes.
2013-09-22 14:04:10 +02:00
Aymeric Augustin ee0ef1b094 Partial revert of 165f44aa.
That commit didn't always improve readability.

See discussion on django-developers for details.
2013-09-22 14:04:10 +02:00
tschilling 0d1ba84d13 Fixed #20702 -- Deprecated get_formsets in favor of get_formsets_with_inlines.
Thanks stanislas.guerra at gmail.com for the report.
2013-09-20 07:47:24 -04:00
Paul McMillan a075e2ad0d Increase default PBKDF2 iterations
Increases the default PBKDF2 iterations, since computers have gotten
faster since 2011. In the future, we plan to increment by 10% per
major version.
2013-09-19 18:02:25 +01:00
Tim Graham e23de9e350 Fixed typo in exception message; refs #19414
Thanks Alexey Boriskin for the report.
2013-09-19 06:24:12 -04:00
Brian Holdefehr 98514849dc Fixed #19414 -- Added admin registration decorator
Thanks stavros for the suggestion.
2013-09-18 11:44:10 -04:00
Florian Apolloner 2c6079775e Destroy selenium before live server threads.
Ensure that selenium quits before the live server thread to
prevent occasional hangs when killing the live server.
2013-09-17 18:39:25 +02:00
Florian Apolloner 73a610d2a8 Final attempt to solve sporadic test failures.
tearDownClass is not called if setUpClass throws an exception, in our case
this means that LiveServerTestCase leaks LiveServerThread sockets if the
test happens to be skipped later on, and AdminSeleniumWebDriverTestCase
doesn't close it's already open browser window. To prevent this leakage
we catch errors where needed and manually call _tearDownClassInternal.
_tearDownClassInternal should be written as defensively as possible since
it is not allowed to make any assumptions on how far setUpClass got.

This patch should fix the sporadic "Address already in use"-errors on jenkins
and also the "This code isn't under transaction management"-error for sqlite
(also just on jenkins).

After discussion with koniiiik, jezdez, kmtracey, tos9, lifeless, nedbat and
voidspace it was decided that this is the safest approach (thanks to everyone
for their comments and help). Manually calling tearDownClass was shut down
cause we don't know how our users override our classes.

This is a private and very specialized API on purpose and should not be used
without a strong reason!

This patch partially reverts the earlier attempts to fix those issues,
namely:
	2fa0dd73b1 and
	3c5775d36f

Final note: If this patch breaks in a later version of Django, please be
very careful on how you fix it, you might not see test failures locally.
That said, this patch hopefully doesn't produce even more failures.
2013-09-17 16:41:01 +02:00
Beshr Kayali 8e04ad9fc2 Added Arabic mapping to contrib/admin/static/admin/js/urlify.js 2013-09-17 10:34:12 -04:00
Simon Charette f5f662fa5f Fixed #21112 -- Make sure sitemaps with no lastmod date work correctly.
Thanks to Matthias Kestenholz for the report and patch.
2013-09-17 10:21:11 -04:00
Tim Graham f40c82213f Added backwards compatability shims for util modules.
refs #17627
2013-09-16 12:53:42 -04:00
Tim Graham 18ffdb1772 Fixed #17627 -- Renamed util.py files to utils.py
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor Kołodziej for the initial patch.
2013-09-16 12:52:05 -04:00
Russell Keith-Magee aae5a96d57 Ensure that passwords are never long enough for a DoS.
* Limit the password length to 4096 bytes
  * Password hashers will raise a ValueError
  * django.contrib.auth forms will fail validation
* Document in release notes that this is a backwards incompatible change

Thanks to Josh Wright for the report, and Donald Stufft for the patch.

This is a security fix; disclosure to follow shortly.
2013-09-15 13:42:23 +08:00
Florian Apolloner 2fa0dd73b1 Fixed error handling in 3c5775d36f for non-operational webdrivers. 2013-09-14 23:24:48 +02:00
Florian Apolloner 3c5775d36f Delayed initialization of Selenium webdrivers.
If setUpClass throws an exception (in this case "Address already in use" if the
super call can't find any open port to bind too) tearDownClass is not called.
This results in open browser windows from the webdriver, hence we only construct
it once we are sure there is no code afterwards which could error out.
2013-09-14 22:58:30 +02:00
Juan Catalano 6feb75129f Fixed #21060 -- Refactored admin's autodiscover method to make it reusable.
We want to be able to use it for instance for discovering `tasks.py` modules
inside the INSTALLED_APPS.

This commit therefore moves the logic to `autodiscover_modules` method in
django.utils.module_loading.
2013-09-13 20:09:41 -04:00
Claude Paroz 4c5641dd92 Fixed inspectdb test for spatialite >=4 2013-09-12 11:14:16 +02:00
Claude Paroz c82f6c2227 Add a test for the geo-enabled inspectdb command 2013-09-12 10:30:45 +02:00
Keryn Knight 170f721367 Fixed #21056 -- AdminSite.app_index no longer blindly accepts any app-labelish input. 2013-09-11 08:48:32 -04:00
Gregor MacGregor b2b763448f Fixed #20841 -- Added messages to NotImplementedErrors
Thanks joseph at vertstudios.com for the suggestion.
2013-09-10 11:09:59 -04:00
Roberto Aguilar af67ce5e18 Fixed #4574 -- Added CSS classes to the admin calendar widget for better control over styling. 2013-09-10 08:07:17 -05:00
Tim Graham 2bc5143866 Fixed #7467 -- Added a template block to override the admin welcome message.
Thanks Jeff Kowalczyk for the suggestion and rctay for the patch.
2013-09-10 08:48:03 -04:00
Aymeric Augustin d9413d33b2 Refactored code and tests that relied on django.utils.tzinfo.
Refs #17262.
2013-09-09 22:32:52 +02:00
Keryn Knight 0d74f9553c Fixed #21063 -- AdminSite app_index should be fail early if the user has no permissions. 2013-09-09 12:51:03 -04:00
Alex Gaynor 9d11522599 Removed some more unused local vars 2013-09-08 12:20:01 -07:00
Alex Gaynor 96fd5557f9 Removed a ton of unused local vars 2013-09-08 08:05:16 -07:00
Pablo Mouzo b11564fd36 Fixed #16869 -- BaseGenericInlineFormSet.save_new should use form's save() method
Thanks mattaustin for the report and Pablo Recio (pyriku) for the patch.
2013-09-07 20:00:38 -04:00
Juan Catalano 04415bf81b Fixed #21013 -- Ensure that ModelAdmin.get_queryset is considered for the admin history view. 2013-09-07 14:53:29 -05:00
Alex Gaynor 907f19eba7 Merge pull request #1565 from garrypolley/#19988-ordinal-html-i18n-fix
fixes #19988, allow html in ordinal for humanize
2013-09-07 11:13:55 -07:00
Julien Phalip 55a11683f7 Fixed #20836 -- Ensure that the ForeignKey's to_field attribute is properly considered by the admin's interface when creating related objects.
Many thanks to Collin Anderson for the report and patch and to Peter Sheats for the test.
2013-09-07 12:14:07 -05:00
Pablo Mouzo 73de9dd1fa Add `response_delete` and `render_delete_form` methods to `ModelAdmin`
This make it easier to control the delete flow.
2013-09-07 10:59:49 -05:00
Aymeric Augustin 636860fbfb Moved two WSGI-specific functions to the WSGI handler.
They were defined in base when the mod_python handler used them. See bfcecbff.
2013-09-07 10:03:49 -05:00
Loic Bistuer ec47de77d6 Fixed regression introduced by a962286, changed ugettext to ugettext_lazy. 2013-09-07 08:09:13 -04:00
Alex Gaynor 2530735d2d Fixed a number of flake8 errors -- particularly around unused imports and local variables 2013-09-06 21:56:40 -07:00
Julien Phalip d5df914fe1 Merge pull request #1578 from rmutter/ticket_20821
Fixed #20821 -- Added tooltips to Admin SelectBox widget
2013-09-06 14:03:58 -07:00
Rudy Mutter c438cc2a36 Fixed #20821 -- Added tooltips to Admin SelectBox widget
The Admin widget, which can be used to filter multiple selects
can sometimes be too narrow and hide information such as
user permissions. This commit adds tooltips to the select
options so that a user can hover over and see the hidden text.
2013-09-06 15:46:38 -05:00
Garry Polley 337bd248a5 fixes #19988, allow html in ordinal for humanize 2013-09-06 12:59:44 -05:00
Adrian Holovaty a962286b74 Added AdminSite attributes for easily changing admin title.
AdminSite now has overridable site_header, site_title and index_title attributes. Changed
each admin view to pass these to the context (in a new AdminSite.each_context() method).
The intent here is to make it easier to override these things in the common case, instead of
having to override a template, which is a bigger burden.
2013-09-06 12:31:50 -05:00
Adrian Holovaty 273a1e6b8d Fixed awkward indentation in admin URLconfs 2013-09-06 12:31:50 -05:00
Eric Boersma 4d13cc56de Fixed #21035 -- Changed docs to treat the acronym SQL phonetically.
The documentation and comments now all use 'an' to
refer to the word SQL and not 'a'.
2013-09-05 20:14:58 -04:00
Aymeric Augustin 6a6428a36f Took advantage of django.utils.six.moves.urllib.*. 2013-09-05 14:39:23 -05:00
CHI Cheng ed9cd4fd8b Fixed #21000 -- Made cached_db session backend respect SESSION_CACHE_ALIAS 2013-09-05 10:47:58 -04:00
Tim Graham 5649c0af9d Fixed "indentation is not a multiple of four" pep8 issues. 2013-09-03 14:22:21 -04:00
Claude Paroz dd656073ad Fixed #21003 -- Ensured geometry widget return value has SRID
Thanks Mathieu Leplatre for the report and initial patch.
2013-09-03 13:53:35 +02:00
Claude Paroz 3550b27a89 Isolated map creation JS code 2013-09-03 13:53:35 +02:00
Claude Paroz b6889c68d7 Prevented rendering attrs to be squashed in OSMWidget 2013-09-03 10:02:55 +02:00
Claude Paroz 6ecbac21a9 Fixed syntax error in OSMWidget 2013-09-03 09:05:01 +02:00
Claude Paroz 973502c047 Fixed gis test to run on non gis-enabled settings
Refs #20998.
2013-09-02 14:15:04 +02:00
Claude Paroz 102f26c929 Fixed #20998 -- Allow custom (de)serialization for GIS widgets
Thanks Mathieu Leplatre for the report and the initial patch.
2013-09-02 13:32:00 +02:00
Aymeric Augustin 868b4c921c Used six.moves.zip_longest, new in six 1.4.0. 2013-09-02 12:11:16 +02:00
Aymeric Augustin 365c3e8b73 Replaced "not PY3" by "PY2", new in six 1.4.0. 2013-09-02 12:11:02 +02:00
Ramiro Morales 17d898dedd Remove usage of deprecated module_name model option introduced in 1c0c879be3. 2013-09-01 09:58:33 -03:00
Claude Paroz 1c0c879be3 Fixed #17074 -- Improved first field detection in admin add form
Thanks Kidwind for the report and Julien Phalip for the initial
patch.
2013-08-31 21:19:22 +02:00
Ramiro Morales 92a710cd03 Updated Selenium-based tests after e909ceae9b. 2013-08-31 12:14:52 -03:00
Ramiro Morales e909ceae9b Made django.test.testcases not depend on staticfiles contrib app.
Do this by introducing a django.contrib.staticfiles.testing.StaticLiveServerCase
unittest TestCase subclass.

Fixes #20739.
2013-08-31 11:02:32 -03:00
Simon Charette 11cd7388f7 Fixed #20989 -- Removed useless explicit list comprehensions. 2013-08-30 10:57:51 -04:00