Commit Graph

7145 Commits

Author SHA1 Message Date
Tim Graham fd81588bc6 Refs #25176 -- Fixed typo in tests/test_utils/tests.py 2015-08-01 07:39:16 -04:00
Adam Chainz 0abb06930f Fixed #25176 -- Prevented TestCase.setUpTestData() exception from leaking transaction. 2015-08-01 07:33:22 -04:00
Tim Graham f4afa699b6 Removed usage of selenium's deprecated switch_to_window() method. 2015-07-31 15:03:18 -04:00
Jay Cox 434d309ef6 Fixed #24720 -- Avoided resolving URLs that don't end in a slash twice in CommonMiddleware.
This speeds up affected requests by about 5%.
2015-07-31 12:04:06 -04:00
Flavio Curella 1e2362ca0f Refs #25184 -- Started deprecation for contrib.gis.geoip. 2015-07-31 10:09:06 -04:00
Flavio Curella 7f0953ce1f Fixed #25184 -- Added support for MaxMind GeoLite2 database format 2015-07-31 09:45:03 -04:00
Tim Graham 1c7c782d6e Fixed #25188 -- Improved message raised by SimpleTestCase.assertRaisesMessage().
Thanks Chris Jerdonek for the suggestion and help with the patch.
2015-07-31 09:19:27 -04:00
Tim Graham 5b6ca15073 Fixed #25183 -- Fixed non-deterministic GeoIP test.
google.com doesn't always resolve to an IP inside the United States.
2015-07-30 18:11:57 -04:00
elky 35901e64b0 Fixed #24444 -- Updated contrib.admin to use django-flat-theme 2015-07-30 15:18:22 -04:00
Tim Graham d27e0f04a6 Fixed #25190 -- Deprecated callable_obj parameter to assertRaisesMessage().
Thanks Aymeric Augustin for review.
2015-07-30 10:12:41 -04:00
Luis Visintini 635ffc3c37 Fixed #25163 -- Added hint for non-staff users to admin login page. 2015-07-29 15:09:32 -04:00
Piper Merriam 537818af87 Fixed #25185 -- Added support for functools.partial serialization in migrations 2015-07-29 10:15:50 -04:00
Piper Merriam b1e552debf Fixed #25186 -- Improved migration's serialization of builtins on Python 2. 2015-07-28 18:15:01 -04:00
Tim Graham c041671167 Refs #25183 -- Added debugging for non-deterministic GeoIP test. 2015-07-28 07:41:18 -04:00
Tim Graham adc0c4fbac Fixed #18556 -- Allowed RelatedManager.add() to execute 1 query where possible.
Thanks Loic Bistuer for review.
2015-07-28 09:28:25 +07:00
Flavio Curella c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Marten Kenbeek bc7923beff Fixed #24127 -- Changed the default current_app to the current namespace.
Changed the url template tag to use request.resolver_match.namespace as a
default for the current_app argument if request.current_app is not set.
2015-07-27 09:14:48 -04:00
Mitchell Kotler 6024fd5dc2 Fixed #25095 -- Fixed annotate() + values() group by bug
Thanks Josh Smeaton for help on the tests.
2015-07-27 07:44:48 -04:00
Joseph Gordon 199a02d1e2 Fixed #25110 -- Fixed a test_runner test isolation regression.
Thanks claudep for the patch.
2015-07-27 07:35:23 -04:00
Konrad Świat c6da621def Fixed #24623 -- Fixed EmailMessage.attach_file() with text files on Python 3.
Thanks tkrapp for the report and Tim Graham for the review.
2015-07-25 07:42:30 -04:00
Claude Paroz c296e55dc6 Fixed #22258 -- Added progress status for dumpdata when outputting to file
Thanks Gwildor Sok for the report and Tim Graham for the review.
2015-07-24 18:37:55 +02:00
Matt Johnson e063ac2fae Fixed #12768 -- Fixed QuerySet.raw() regression on FK with custom db_column. 2015-07-23 18:07:38 -04:00
Tim Graham b60375d4bb Fixed #25129 -- Made model instance defaults work with migrations (refs #24919). 2015-07-21 09:19:40 -04:00
Tim Graham 04e69598de Refs #24919 -- Made test models serializable for migrations. 2015-07-21 09:19:40 -04:00
Luke Plant 8a5eadd140 Corrected HTML-escaping behaviour of url template tag.
Due to the URL encoding applied by the tag for all parameters that might be
partly controllable by an end-user, there are no XSS/security problems
caused by this bug, only invalid HTML.
2015-07-21 14:04:58 +01:00
Claude Paroz 1da170a203 Fixed #25141 -- Diminished GDAL dependence during geojson serialization
Only require GDAL if contained geometries need coordinate transformations.
Thanks drepo for the report and Tim Graham for the review.
2015-07-20 20:22:29 +02:00
Tim Graham 774c16d16e Fixed #25052; refs #16860 -- Added password validation to UserCreationForm. 2015-07-20 13:44:34 -04:00
Tim Graham f5e9d67907 Refs #16860 -- Moved password_changed() logic to AbstractBaseUser.
Thanks Carl Meyer for review.
2015-07-20 13:44:26 -04:00
Anssi Kääriäinen baa732ac9f Refs #23622 -- Added tests to ensure ordering is retained for distinct on fields subqueries.
The ticket was already fixed by
b68212f539.

Thanks to Beauhurst for commissioning the work on this ticket.
2015-07-20 10:20:21 -04:00
Anssi Kääriäinen 6a9a9e50f2 Fixed test with incorrect assumption about pk values.
The test results were dependent on the order in which the
tests were run.
2015-07-20 10:20:21 -04:00
Tim Graham 6e3fe089dd Replaced six.BytesIO with io.BytesIO 2015-07-20 08:19:47 -04:00
Claude Paroz 19fcf083d3 Replaced try/finally by mock.patch in geos tests 2015-07-18 15:34:40 +02:00
Edward Henderson f8cc464452 Fixed #16501 -- Added an allow_unicode parameter to SlugField.
Thanks Flavio Curella and Berker Peksag for the initial patch.
2015-07-17 13:48:58 -04:00
Tim Graham 28ee511b7e Fixed db.utils.load_backend() on non-ASCII paths. 2015-07-17 08:21:43 -04:00
Claude Paroz 1ef4aeab40 Fixed #25078 -- Added support for disabled form fields
Thanks Keryn Knight and Tim Graham for the reviews.
2015-07-16 19:36:56 +02:00
Tim Graham 1fed8dd715 Fixed #25120 -- Deprecated egg template loader. 2015-07-16 09:32:42 -04:00
Tim Graham c52822e750 Fixed #25128 -- Fixed SQLite SchemaEditor crash when adding a ForeignObject field. 2015-07-15 15:22:52 -04:00
Tim Graham bbbb7ce115 Filtered out 'base' from database backend choices error message. 2015-07-15 10:51:26 -04:00
rroskam ed514caed2 Fixed #24966 -- Added deployment system check for empty ALLOWED_HOSTS. 2015-07-15 09:18:58 -04:00
Keryn Knight c96f11257b Refs #24121 -- Added meaningful repr() to HttpResponse and subclasses. 2015-07-15 09:01:25 -04:00
Tim Graham b356dc4e07 Refs #25085 -- Used more specific assertion in widget test. 2015-07-14 12:17:34 -04:00
Eric Carrillo 8ee6a3f1a8 Fixed #25085 -- Overrode Select widget's __deepcopy__() 2015-07-14 11:56:08 -04:00
Thomas Stephenson 035b0fa60d Fixed #24716 -- Deprecated Field._get_val_from_obj()
The method duplicates the functionality of Field.value_from_object()
and has the additional downside of being a privately named public
API method.
2015-07-14 09:13:22 -04:00
Vlastimil Zíma 8f8c54f70b Fixed #25099 -- Cleaned up HttpRequest representations in error reporting. 2015-07-13 19:22:39 -04:00
Daniel Roseman 24620d71f2 Fixed #25079 -- Added warning if both TEMPLATES and TEMPLATE_* settings are defined.
Django ignores the value of the TEMPLATE_* settings if TEMPLATES is also
set, which is confusing for users following older tutorials. This change
adds a system check that warns if any of the TEMPLATE_* settings have
changed from their defaults but the TEMPLATES dict is also non-empty.

Removed the TEMPLATE_DIRS from the test settings file; this was marked
for removal in 1.10 but no tests fail if it is removed now.
2015-07-13 17:50:22 -04:00
Andrei Kulakov db97a88495 Fixed #24375 -- Added Migration.initial attribute
The new attribute is checked when the `migrate --fake-initial` option
is used. initial will be set to True for all initial migrations (this
is particularly useful when initial migrations are split) as well as
for squashed migrations.
2015-07-13 15:57:40 -04:00
Yosuke Yasuda a2b999dfca Fixed #25108 -- Fixed a test which failed on Pillow 2.9+ 2015-07-13 14:58:44 -04:00
Anssi Kääriäinen 76ac07a909 Refs #24090 -- Added a test for multi-table inheritance + subqueries.
Ticket #24090 was already fixed by
b68212f539, this commit adds tests to
verify this is indeed the case.

Thanks to Beauhurst for commissioning the work on this ticket.
2015-07-13 13:13:54 -04:00
Ben Spaulding 915ef79b08 Fixed #25115 -- Made admindocs view bookmarklet reverse the URL rather than hardcode it. 2015-07-13 12:44:37 -04:00
Anssi Kääriäinen 6f403056f0 Fixed #24923 -- errored out nicely when using aggregates in order_by() 2015-07-13 08:36:25 -04:00
Claude Paroz d72f8862cb Fixed #25072 -- Prevented GDALRaster memory to be uncollectable
Setting GDALRaster.bands as a cached property was creating a circular
reference with objects having __del__ methods, which means the memory
could never be freed.
Thanks Daniel Wiesmann for the report and test, and Tim Graham for the review.
2015-07-10 19:56:17 +02:00
darkryder f675afa13c Fixed #25093 -- Added utils.datastructures.OrderedSet.__len__() 2015-07-09 21:20:52 -04:00
Simon Charette 11e6bf9bdf Fixed a CaptureQueriesContext usage in queries tests. 2015-07-09 16:00:53 -04:00
Simon Charette 3b0cdb1410 Added a regression test for get() ordering clearing. 2015-07-09 16:00:52 -04:00
Simon Charette 07577a2d05 Fixed #25081 -- Prevented DISTINCT ON ordering from being cleared in get().
Thanks to pdewacht for the patch.
2015-07-09 16:00:52 -04:00
Shai Berger 17d3a6d804 Fixed catastrophic backtracking in URLValidator.
Thanks João Silva for reporting the problem and Tim Graham for finding the
problematic RE and for review.

This is a security fix; disclosure to follow shortly.
2015-07-08 15:23:03 -04:00
Tim Graham 014247ad19 Prevented newlines from being accepted in some validators.
This is a security fix; disclosure to follow shortly.

Thanks to Sjoerd Job Postmus for the report and draft patch.
2015-07-08 15:23:03 -04:00
Carl Meyer df049ed77a Fixed #19324 -- Avoided creating a session record when loading the session.
The session record is now only created if/when the session is modified. This
prevents a potential DoS via creation of many empty session records.

This is a security fix; disclosure to follow shortly.
2015-07-08 15:23:03 -04:00
Andriy Sokolovskiy 13dca01af0 Replaced try..except blocks by context manager in custom lookups tests 2015-07-07 12:03:58 -04:00
David Wolever 0d71349773 Fixed #22804 -- Added warning for unsafe value of 'sep' in Signer
Thanks Jaap Roes for completing the patch.
2015-07-07 11:44:37 -04:00
Tim Graham 6bd8462380 Refs #23658 -- Fixed dbshell tests on Windows. 2015-07-06 16:17:56 -04:00
Alexey Sveshnikov bc98bc56a5 Fixed #25059 -- Allowed Punycode TLDs in URLValidator 2015-07-06 15:08:43 -04:00
Andriy Sokolovskiy b40c551fdf Fixed some unclosed objects in tests 2015-07-06 10:10:40 -04:00
Tim Graham e7c6a2cf9f Refs #4960 -- Fixed selenium test failures for CharField strip changes. 2015-07-06 08:52:50 -04:00
Sylvain Fankhauser f5d5867a4a Fixed #24877 -- Added middleware handling of response.render() errors. 2015-07-03 12:06:40 -04:00
Rigel Di Scala b91a2a499f Fixed #23190 -- Made Paginator.page_range an iterator 2015-07-03 11:34:34 -04:00
Michael Manfre f9c3587b51 Fixed #25055 -- Made m2m long name testing friendlier for 3rd party databases. 2015-07-03 09:00:08 -04:00
Jan Pazdziora 3353684102 Fixed #25032 -- Removed double redirect in admin login. 2015-07-03 08:53:10 -04:00
Tim Graham ca58181bac Fixed #25056 -- Documented minimum version of jinja2 for testing. 2015-07-03 08:20:53 -04:00
Tim Graham c0c7fa4837 Refs #25050 -- Corrected test assertion in serializers test. 2015-07-03 08:03:20 -04:00
Jan Pazdziora a570701e02 Fixed #25029 -- Added PersistentRemoteUserMiddleware for login-page-only external authentication. 2015-07-02 17:38:10 -04:00
Grégoire ROCHER c6cce4de38 Fixed #25050 -- Allowed serialization of models with deferred fields. 2015-07-02 14:46:16 -04:00
Tim Graham 7edd912cfb Used assertRaisesMessage in managers_regress tests. 2015-07-02 14:23:28 -04:00
Chris Lamb 61f3e22e38 Fixed #25054 -- Added app_label to swapped model AttributeError 2015-07-02 14:18:10 -04:00
William Schwartz 9a5cfa05a0 Fixed #24997 -- Enabled bulk_create() on proxy models 2015-07-02 13:53:51 -04:00
jpic fedef7b2c6 Fixed #24908 -- Fixed duplicate readonly field rendering.
ModelAdmin added readonly_fields to exclude, but would not undeclare
them if they were overridden.
2015-07-02 13:37:30 -04:00
Kai Richard Koenig 60f795c060 Fixed #25040 -- Fixed migrations state crash with GenericForeignKey 2015-07-02 12:48:29 -04:00
Curtis 11cac1bd8e Fixed #4960 -- Added "strip" option to CharField 2015-07-01 17:47:05 -04:00
Tim Graham b535eb3fcb Refs #23658 -- Fixed unclosed file in dbshell tests. 2015-07-01 13:45:02 -04:00
Jon Dufresne b44dee16e6 Fixed #20916 -- Added Client.force_login() to bypass authentication. 2015-07-01 13:01:08 -04:00
Matthew Somerville 839edcebb3 Fixed #21695 -- Added asvar option to blocktrans.
Thanks Bojan Mihelac for the initial patch.
2015-07-01 10:03:00 -04:00
Moritz Sichert b35b43dff8 Fixed #24982 -- Split staticfiles tests into multiple files 2015-07-01 09:41:27 -04:00
Michael Tänzer 3bbaf84d65 Fixed #18247 -- Added cast to NUMERIC for Decimals on sqlite
On sqlite the SUM() of a decimal column doesn't have a NUMERIC type so
when comparing it to a string literal (which a Decimal gets converted to
in Django) it is not compared as expected.
2015-06-30 18:27:42 -04:00
Jean-Michel Vourgère b64c0d4d61 Fixed #23658 -- Provided the password to PostgreSQL dbshell command
The password from settings.py is written in a temporary .pgpass file
file whose name is given to psql using the PGPASSFILE environment
variable.
2015-06-30 18:21:51 -04:00
Marten Kenbeek aabb58428b Refs #23621 -- Fixed warning message when reloading models. 2015-06-30 15:00:10 -04:00
Andreas Pelme 00a1d4d042 Fixed #21803 -- Added support for post-commit callbacks
Made it possible to register and run callbacks after a database
transaction is committed with the `transaction.on_commit()` function.

This patch is heavily based on Carl Meyers django-transaction-hooks
<https://django-transaction-hooks.readthedocs.org/>. Thanks to
Aymeric Augustin, Carl Meyer, and Tim Graham for review and feedback.
2015-06-30 14:51:00 -04:00
Jonas Degrave 4352e865a7 Fixed #24911 -- Made BaseManager.get_queryset() allow custom queryset args. 2015-06-30 13:48:30 -04:00
Ned Batchelder 3b81dbe844 Used %r in the TextNode repr to show newlines better. 2015-06-30 09:54:18 -04:00
Andriy Sokolovskiy c31bf8cb54 Refs #20203 -- Added tests to check inherited custom default manager 2015-06-29 21:17:51 -04:00
Andriy Sokolovskiy c0cf73a57d Refs #20203 -- Allowed adding custom default manager to the model state
If the only manager on the model is the default manager defined
by Django (`objects = models.Manager()`), this manager will not
be added to the model state. If it is custom, it needs to be
passed to the model state.
2015-06-29 21:15:37 -04:00
Luke Plant aef2a0ec59 Fixed #25018 -- Changed simple_tag to apply conditional_escape() to its output.
This is a security hardening fix to help prevent XSS (and incorrect HTML)
for the common use case of simple_tag.

Thanks to Tim Graham for the review.
2015-06-29 08:16:19 -04:00
Anssi Kääriäinen 9ed82154bd Fixed #23791 -- Corrected object type check for pk__in=qs
When the pk was a relation field, qs.filter(pk__in=qs) didn't work.

In addition, fixed Restaurant.objects.filter(place=restaurant_instance),
where place is an OneToOneField and the primary key of Restaurant.

A big thank you to Josh for review and to Tim for review and cosmetic
edits.

Thanks to Beauhurst for commissioning the work on this ticket.
2015-06-29 07:49:31 -04:00
Tim Graham 1e63652e44 Renamed MySQL-specific dbshell test file. 2015-06-27 16:22:11 -04:00
Tim Graham 7da3923ba0 Sorted imports in __init__.py files. 2015-06-27 11:53:33 -04:00
Greg Chapple 4a66a69239 Fixed #24887 -- Removed one-arg limit from models.aggregate 2015-06-27 11:44:33 -04:00
Tim Graham 6c592e79e1 Removed unused code after refs #25017. 2015-06-27 10:08:59 -04:00
Noam e291fc4757 Fixed #25031 -- Fixed a regression in the unordered_list template filter. 2015-06-27 09:37:41 -04:00
sujayskumar 2e70bf3785 Fixed #25017 -- Allowed customizing the DISALLOWED_USER_AGENTS response 2015-06-27 08:46:23 -04:00
Jason Hoos a50b66da30 Fixed #24958 -- Fixed inline forms using UUID-PK parents with auto-PK children. 2015-06-26 09:09:09 -04:00
Claude Paroz 0cc39e50e1 Pushed GDAL skip condition inside test
As GDAL_VERSION is conditionnaly imported, it cannot be referenced
in skipIf decorator.
2015-06-26 14:57:45 +02:00
Daniel Wiesmann b647ccfa67 Refs #24840 -- Added skip flag to raster transform test for GDAL<1.8.1.
Thanks to Simon Charette for the report.
2015-06-26 14:30:54 +02:00
薛丞宏 d3e12c9017 Fixed #25016 -- Reallowed non-ASCII values for ForeignKey.related_name on Python 3. 2015-06-26 08:30:05 -04:00
Claude Paroz 3f9dca62cb Updated GeoIP test for newer versions 2015-06-25 21:47:54 +02:00
Simon Charette bdb382b2a4 Refs #25002 -- Supported textual to temporal column alteration on Oracle.
Thanks to Tim Graham for the report and Shai Berger for the review.
2015-06-24 19:37:55 -04:00
Tim Graham aaacaeb096 Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
2015-06-24 16:08:20 -04:00
Lukas Hetzenecker 6355a6d4f5 Fixed #25019 -- Added UUID support in DjangoJSONEncoder 2015-06-24 18:41:25 +02:00
Daniel Wiesmann c078021555 Refs #24840 -- Added GDALRaster Warp and transform methods
Thanks to Tim Graham for the review.
2015-06-24 18:31:22 +02:00
Daniel Wiesmann c0fff64486 Fixed #25011, Refs #23804 -- Added check for GDAL on RasterField initialization 2015-06-23 16:11:42 -04:00
Markus Holtermann 4202959b6f Improved coverage configuration
By providing a .coveragerc file with all default settings, users only
have to execute "coverage run ./runtests.py" without the need to specify
all the possible flags. The same applies to "coverage html" and
"coverage xml".
2015-06-23 21:17:37 +02:00
Markus Holtermann 7bb7670ee4 Used mock in MigrationQuestioner tests
Thanks Andriy Sokolovskiy and Simon Charette for the review.
2015-06-23 17:34:22 +02:00
Marten Kenbeek 290ff35e6c Fixed #25000 -- Fixed cast to string for lazy objects.
Implemented __str__() to return the string-representation of the
proxied object, not the proxy itself, if the lazy object didn't have
a string-like object in its resultclasses.
2015-06-23 09:16:17 -04:00
Francisco Albarran e75b614640 Fixed #25009 -- Allowed User.objects.create_user(...,is_staff=True) to work. 2015-06-22 11:34:26 -04:00
Simon Charette 73040e584a Fixed #25002 -- Used PostgreSQL column type alteration USING clause.
Thanks to Dirk Uys for the report.
2015-06-22 09:35:35 -04:00
Tim Graham 7f155a0703 Refs #25006 -- Added a '6 p.m.' option to the admin's time picker. 2015-06-22 07:24:57 -04:00
Rolo e7b4bd48c7 Fixed #24970 -- Added --managers and --admins options to the sendtestemail management command. 2015-06-22 07:21:26 -04:00
Marten Kenbeek 738c0de300 Fixed #14200 -- Added a fallback if HttpRequest.urlconf is None.
Made BaseHandler fall back to settings.ROOT_URLCONF if
HttpRequest.urlconf is set to None, rather than raising
ImproperlyConfigured.
2015-06-20 18:52:33 -04:00
Gagaro 8b7bd62ae5 Refs #24978 -- Amended test filename to avoid checkout warnings on Windows. 2015-06-20 14:22:57 -04:00
Claude Paroz ffdf507ec0 Added GDAL 2.0 support 2015-06-20 14:40:50 +02:00
Claude Paroz 9368f51e12 Fixed #20197 -- Made XML serializer fail loudly when outputting unserializable chars
Thanks Tim Graham for the review.
2015-06-19 20:54:46 +02:00
Daniel Wiesmann b769bbd4f6 Fixed #23804 -- Added RasterField for PostGIS.
Thanks to Tim Graham and Claude Paroz for the reviews and patches.
2015-06-19 14:36:43 -04:00
Markus Holtermann d3d66d4722 Fixed #24940 -- Made model managers hashable
Thanks Federico Jaramillo Martínez for the report and Tim Graham for the
test and review.
2015-06-19 19:02:01 +02:00
Tim Graham 0d97e73d95 Fixed reverse sites_tests failures introduced in refs #24834. 2015-06-18 16:25:32 -04:00
Tim Graham 20c6ba6ffa Fixed #24962 -- Added newline to characters escaped by contrib.admin.utils.quote()
Thanks alito for the report and patch.
2015-06-18 16:10:44 -04:00
Gagaro 74261bc593 Fixed #24873 -- Prevented nested Prefetch objects from being overwritten. 2015-06-18 15:42:47 -04:00
Nick Pope b3d5dc6932 Fixed #24834 -- Fixed get_current_site() when Host header contains port.
When the Host header contains a port, looking up the Site record fails
as the host will never match the domain.
2015-06-18 10:18:12 -04:00
Tim Graham 7f1168e387 Removed support for Python 3.3. 2015-06-18 08:36:50 -04:00
Markus Holtermann e5cb4e1411 Fixed #24914 -- Added authentication mixins for CBVs
Added the mixins LoginRequiredMixin, PermissionRequiredMixin and
UserPassesTestMixin to contrib.auth as counterparts to the respective
view decorators.

The authentication mixins UserPassesTestMixin, LoginRequiredMixin and
PermissionRequiredMixin have been inspired by django-braces
<https://github.com/brack3t/django-braces/>

Thanks Raphael Michel for the initial patch, tests and docs on the PR
and Ana Balica, Kenneth Love, Marc Tamlyn, and Tim Graham for the
review.
2015-06-17 23:19:10 +02:00
ana-balica 2f615b10e6 Fixed #24829 -- Allowed use of TemplateResponse in view error handlers. 2015-06-17 17:11:50 -04:00
Markus Holtermann 64a4211aa8 Refs #9619 -- Fixed failing test case
Regression introduced in 9aac99e96d
2015-06-17 20:07:00 +02:00
JensDiemer 9aac99e96d Refs #9619 -- Added a test that Field.from_db_value() is called on QuerySet.values() 2015-06-17 12:20:32 -04:00
Tim Graham 81aae28843 Refs #24978 -- Skipped an unsupported test on Windows. 2015-06-17 10:22:08 -04:00
Andriy Sokolovskiy cf6ce279c7 Fixed #24948 -- Fixed crash when uploading bitmap images in forms.ImageField 2015-06-16 14:37:58 -04:00
Tim Graham 09f2cdbe1a Refs #16860 -- Fixed a resource and deprecation warning in password validation. 2015-06-16 11:02:27 -04:00
Mounir Messelmeni e6dd7f995a Fixed #24971 -- Made startapp generate an apps.py 2015-06-16 07:08:04 -04:00
Markus Holtermann e470f311d6 Fixed #24828 -- Allowed migration optimization across AlterFooTogether
The idea behind this change is, that AlterUniqueTogether,
AlterIndexTogether and AlterOrderWithRespectTo can always be moved after
an Add/Alter/Rename/RemoveField operation if they don't refer to the
respective field and are not empty sets / None.

Combined with the optimizations of duplicate AlterUniqueTogether,
AlterIndexTogether, and AlterOrderWithRespectTo operations from
128caa1e16, these operations are optimized
in a later round of the optimizer.

Thanks Tim Graham for the review.
2015-06-16 00:43:22 +02:00
Adam Brenecki 65296b3be3 Fixed #24972 -- Fixed removing unique_together indexes on MySQL. 2015-06-15 17:28:13 -04:00
Adam Chainz d34d39ade7 Fixed #24894 -- Added contrib.postgres.functions.TransactionNow 2015-06-15 14:03:17 -04:00
Tim Graham 47fcbe506c Fixed flake8 warnings on Python 3. 2015-06-15 11:27:09 -04:00
Brian King bfb5b7150f Fixed #24912 -- Fixed prefetch_related failure for UUIDField primary keys
This resolves a problem on databases besides PostgreSQL when using
prefetch_related with a source model that uses a UUID primary key.
2015-06-15 09:37:38 -04:00
Markus Holtermann 128caa1e16 Optimized duplicate AlterModelTable/AlterFooTogether/AlterOWRT
Thanks Andrew Godwin for the review.
2015-06-14 20:34:48 +02:00
Markus Holtermann 5bc412c35a Took AlterOrderWithRespectTo into account when optimizing migrations
Thanks Andrew Godwin for the review.
2015-06-14 20:34:34 +02:00
Markus Amalthea Magnuson 5304494585 Fixed #24890 -- Added warning to collectstatic when static files have clashing names 2015-06-13 20:34:24 -04:00
Moritz Sichert 98df288dda Fixed #24978 -- Escaped special characters in loaddata fixture paths 2015-06-13 19:45:05 -04:00
Moritz Sichert 296919e7a5 Fixed #24965 -- Made LiveServerTestCase.live_server_url accessible from class 2015-06-12 17:44:54 -04:00
Carson Gee e93e0c03b2 Fixed #24963 -- Added File.seekable() on Python 3. 2015-06-12 10:17:21 -04:00
Kai Richard Koenig 3c593ba79e Refs #24125 -- Added admin_docs tests for multiple template engines.
This adds a test for 511a53b314
2015-06-11 20:26:27 -04:00
Markus Holtermann 5d42890821 Fixed #24950 -- Added unicode_literals to models.py in app template
Thanks Tim Graham for the patch
2015-06-11 16:38:12 +02:00
Russell Keith-Magee 9851e54121 Merge pull request #4811 from mthornhill/12685
Fixed #12685 - Ensure that deserialised model instances honor the same arguments as normal models.
2015-06-10 21:41:48 +08:00
Tim Graham 55b3bd8468 Refs #16860 -- Minor edits and fixes to password validation. 2015-06-10 07:41:01 -04:00
mick 211c19c579 Fix for ticket 12685 2015-06-10 10:20:51 +01:00
Rivo Laks a0047c6242 Fixed #24769 -- Cast optparse verbosity argument to an integer for better backwards compatibility.
Using `BaseCommand.options_list` makes Django use the legacy optparse
parser, which does not set the verbosity attribute correctly. Now the
verbosity argument is always cast to int. Regression in 8568638 (#19973).

Initial report and patch from blueyed.
2015-06-09 19:03:23 -04:00
Marten Kenbeek 1e82094f1b Fixed #21927 -- Made application and instance namespaces more distinct.
Made URL application namespaces be set in the included URLconf and
instance namespaces in the call to include(). Deprecated other ways
to set application and instance namespaces.
2015-06-08 15:12:20 -04:00
Raphael Michel 39937de7e6 Fixed #24929 -- Allowed permission_required decorator to take any iterable 2015-06-08 13:44:39 -04:00
Tim Graham 167a3203b6 Fixed tests for refs #24767 on databases that don't support microseconds. 2015-06-08 11:03:10 -04:00
Tim Graham c19bc2d5d4 Fixed tests from refs #24922 when run in reverse. 2015-06-08 08:15:41 -04:00
Trey Hunner 788071e22d Moved jQuery to a vendor/jquery subdirectory. 2015-06-07 22:23:42 +02:00
Erik Romijn 1daae25bdc Fixed #16860 -- Added password validation to django.contrib.auth. 2015-06-07 19:31:20 +02:00
David Bannon f4416b1a8b Fixed #24915 -- Added stricter session key validation
Changed _session_key attribute to a property and implemented basic
validation in the setter. The session key must be 'truthy' and
at least 8 characters long. Otherwise, the value is set to None.
2015-06-06 20:04:20 -04:00
Cole Maclean 20ff296cb1 Fixed #24859 -- Made QuerySet.get() with UUIDField raise TypeError on bad value.
For consistency with AutoField.
2015-06-06 19:46:05 -04:00
Sergei Maertens eaf4d8c0d8 Fixed #24922 -- Added system check for templates setting
If `'loaders'` is present in the `TEMPLATES` options together with
`APP_DIRS` set to `True`, the template engine raises an exception. This
conflict is now detected by the system check templates.E001.
2015-06-06 19:40:26 -04:00
Markus Amalthea Magnuson 1884bf8e8e Fixed #12437 -- Added css_classes to Form._html_output() 2015-06-06 19:23:06 -04:00
Tomasz Kontusz c2b4967e76 Fixed ImportError message in utils.module_loading.import_string() 2015-06-06 11:45:22 -04:00
Marten Kenbeek bc77eb6d08 Fixed #24906 -- Fixed ResolverMatch.app_name for nested namespaces.
Set ResolverMatch.app_name to the full path of nested application
namespaces.
2015-06-06 10:44:43 -04:00
Alasdair Nicol 1ea87c8c79 Fixed #24910 -- Added createsuperuser support for non-unique USERNAME_FIELDs
Clarified docs to say that a non-unique USERNAME_FIELD is permissable
as long as the custom auth backend can support it.
2015-06-06 09:33:02 -04:00
Matthew Somerville a391b17ad2 Fixed #23516 -- Added caching of include tag Template objects
This also speeds up for loops that render the same template
multiple times.
2015-06-06 09:25:11 -04:00
Andriy Sokolovskiy 2a7c59cd88 Added missing tests for transforms usage with subquery for PostgreSQL fields 2015-06-06 09:04:53 -04:00
Andriy Sokolovskiy 08232ef84d Fixed #24744 - Fixed relabeled_clone for the Transform 2015-06-06 09:04:53 -04:00
Marc Tamlyn d58816bd6b Merge pull request #4818 from dracos/24937-ranging-to-victory
Fixed #24937 -- fix serialization of Date(Time)RangeField.
2015-06-06 13:41:00 +01:00
Matthew Somerville 8a842148b6 Switch to aware datetimes in test. 2015-06-06 13:05:29 +01:00
Matthew Somerville 86d9b10dc3 Instead of using DjangoJSONEncoder, use base_field's value_to_string.
Note this means the serialization of e.g. IntegerRangeField now has
strings for lower and upper, so use to_python when they came back in
(same behaviour as ArrayField, hopefully, from where I also got the
set_attributes_from_name function).
2015-06-06 12:55:04 +01:00
Claude Paroz 7abf418eb1 Fixed GIS tests broken by 0a89915 2015-06-06 10:30:55 +02:00
Matthew Somerville 2926559cce Fixed #24937 -- fix serialization of Date(Time)RangeField.
Use the DjangoJSONEncoder so that datetime and date are encoded
appropriately.
2015-06-05 22:01:42 +01:00
Mark Lavin 541f4ea546 Fixed #24924 -- Join promotion for multiple Case expressions 2015-06-05 12:22:43 -04:00
Marten Kenbeek f0450c9b12 Fixed #24904 -- Fixed nested namespaces in current_app.
Fixed reverse() to correctly handled nested namespace lookups
in current_app.
2015-06-05 11:47:21 -04:00
Andriy Sokolovskiy 286d0e6ab1 Refs #24833 -- Forwardported some of "Fixed Case expressions with exclude()."
Partial forwardport of 469f1e362b from stable/1.8.x
as the issue was already fixed in master.
2015-06-05 11:21:31 -04:00
Ian Foote 4ab53a558a Fixed #24767 -- Added Greatest and Least expressions
Greatest and Least are row-level Function versions of Min and Max.
2015-06-05 11:15:33 +01:00
Russell Keith-Magee fe21fb810a Merge pull request #4757 from sergei-maertens/ticket_18166
Fixed #18166 -- Added ability to pass kwargs to the form constructor in a formset.
2015-06-05 11:10:28 +01:00
Shai Berger 071801ccff Cleanup: Removed the try-except-fail antipattern from tests
Found cases where testing code was doing

    try:
        whatever
    except (some excption type):
        self.fail("exception shouldn't be thrown")

replaced it with just

    whatever

as this makes the unexpected errors easier to debug, and the tests
would fail just as much and aren't rendered less readable.

Thanks Markus Holtermann for review
2015-06-05 12:57:20 +03:00
Marc Tamlyn 1f28521e0a Merge pull request #4786 from coldmind/refs_22728
Refs #22728 - Added missing tests for defaults__exact case
2015-06-05 10:33:03 +01:00
Andriy Sokolovskiy fc19f9315b Refs #22728 - Added missing tests for defaults__exact case 2015-06-05 09:22:49 +01:00
Michael Manfre 6cc2113204 Added comment to test_query_clone indicating lack of assert is intentional. 2015-06-05 00:51:49 -04:00
Matthew Somerville 2dc93bb10a Fixed #22316 -- Added time filters to TimeField on SQLite.
This was implemented for non-SQLite backends in 1.7 (as a
side effect of #16187).
2015-06-04 22:27:13 -04:00
Raphael Michel 6700c90935 Fixed #19210 -- Added leap year support to django.utils.timesince() 2015-06-04 21:36:12 -04:00
Loek van Gent 0207bdd2d4 Fixed #24474 -- Allowed configuring the admin's empty change list value. 2015-06-04 21:06:26 -04:00
Matthew Somerville 40f0a84cb1 Fixed #24159 -- Made compilemessages run across all apps.
Updated the command to match the documentation, which states it
runs over all .po files.
2015-06-04 21:02:02 -04:00
Marc Tamlyn 7bda2d8ebc Fixed #24837 -- field__contained_by=Range
Provide `contained_by` lookups for the equivalent single valued fields
related to the range field types. This acts as the opposite direction to
rangefield__contains.

With thanks to schinckel for the idea and initial tests.
2015-06-04 19:29:59 +01:00
Raphael Michel 5c125f63f7 Fixed #24728 -- Renamed mime_type to content_type for syndication feeds
Renamed the mime_type properties of RssFeed and Atom1Feed to
content_type and start deprecation for the old names.
2015-06-04 13:24:18 -04:00
Sergei Maertens 238e2ac369 Fixed #18166 -- Added form_kwargs support to formsets.
By specifying form_kwargs when instantiating the formset, or overriding
the `get_form_kwargs` method on a formset class, you can pass extra
keyword arguments to the underlying `Form` instances.

Includes tests and documentation update.
2015-06-04 15:13:55 +02:00
Rolo 19e67c6cd1 Fixed #24677 -- Made TextField.to_python() return a string.
This is consistent with CharField.
2015-06-04 09:02:54 -04:00
Carl Meyer 57dbc87ade Cleaned up docstring style, per Tim Graham review. 2015-06-03 19:20:12 -06:00
Carl Meyer 5c085ea7b3 Refs #24628 -- Added a second test and a docstring comment to avoid regression. 2015-06-03 13:46:01 -06:00
Tim Graham 192b3637c5 Removed unnecessary postgres logic in runtests.py
Obsolete after 36e90d1f45
2015-06-03 12:20:12 -04:00
Tim Graham 7c637a3aae Applied db_table conversion to fix schema tests on Oracle. 2015-06-02 19:17:17 -04:00
Carl Meyer 492537ac18 Fixed #24628 -- Fixed applied status for squashed migrations. 2015-06-02 16:15:13 -06:00
Carl Meyer 335fc44f68 Improved isolation of applied-migrations table in migration tests. 2015-06-02 16:14:02 -06:00
Adam Chainz 23048d186c Fixed #24866 -- Added Now() database function 2015-06-02 17:59:01 -04:00
Tomáš Ehrlich 002b3d87b5 Fixed #24230 -- Added translated language name for i18n template tag/filter. 2015-06-02 16:04:01 -04:00
Carl Meyer 84522c0d16 Fixed #24895 -- Fixed loading a pair of squashed migrations with a dependency. 2015-06-02 12:07:54 -06:00
zauddelig 262d4db8c4 Fixed #24897 -- Allowed using choices longer than 1 day with DurationField 2015-06-02 12:39:34 -04:00
Andriy Sokolovskiy 2913d6b77d Fixed #24831 -- Fixed pickling queryset with prefetch_related() after deleting objects. 2015-06-02 09:54:53 -04:00