Commit Graph

7128 Commits

Author SHA1 Message Date
Vlastimil Zíma cf29b6b561 Fixed #25099 -- Fixed crash in AdminEmailHandler on DisallowedHost. 2015-09-04 09:24:21 -04:00
elky 86cd89095a Fixed #25348 -- Removed unused gif/png images from contrib.admin. 2015-09-04 08:55:36 -04:00
Tim Graham 8a780ec847 Fixed GeoIP test crash when dependencies not installed. 2015-09-04 08:52:20 -04:00
Maxime Lorant c92cd22d02 Refs #25345 -- Updated links to code.google.com. 2015-09-04 08:14:21 -04:00
Tim Graham 233b46f931 Fixed #19263 -- Fixed crash when filtering using __in and an empty QuerySet.
Thanks Marcin Biernat for the initial patch and tests.
2015-09-04 07:44:36 -04:00
sarthakmeh 40bf18e702 Fixed #25058 -- Added GenericRelations with related_query_name to the admin's delete confirmation page. 2015-09-03 10:08:51 -04:00
Tim Graham 2145607d1d Removed some test settings following removal of compatibility checks. 2015-09-03 08:33:23 -04:00
Gavin Wahl 627c7eb7bf Fixed #25335 -- Fixed regression where QuerySet.iterator() didn't return an iterator. 2015-09-03 07:35:22 -04:00
Caio Ariede 6a98396b9d Fixed #25246 -- Guarded against duplicate paths in AppConfig. 2015-09-02 15:27:41 -04:00
Tim Graham 064d4b1cb0 Fixed #25320 -- Reverted ManyToManyField.null to False for backwards compatibility.
Thanks Tom Christie for the report and review.
2015-09-01 07:59:39 -04:00
Preston Timmons 4c30fa905d Rewrote form widget tests as proper unittests.
This is preparation for landing the template-based widget rendering
patch and goes a long way to making these tests more useful for future
development. The old doctest heritage is strong here.
2015-08-31 23:03:55 -05:00
Maxime Lorant 5153a3bfdc Fixed #25331 -- Removed trailing blank lines in docstrings. 2015-08-31 17:37:21 -04:00
Keryn Knight d4b10a7256 Refs #24121 -- Added a repr() to gis.GeoIP and gis.GeoIP2. 2015-08-31 16:12:40 -04:00
Keryn Knight 9c40f01a66 Refs #24121 -- Added repr() to LazySettings, Settings, and UserSettingsHolder. 2015-08-31 16:08:30 -04:00
Adam Chainz 05239180c0 Removed unnecessary DBCacheTests.test_clear_commits_transaction test.
Was added in 44164c5c30 but the
transaction.commit_unless_managed() line was removed in
ba5138b1c0253fcf390b7509ad7b954117b3be88; thus the test does nothing
but check that clear() runs.
2015-08-31 09:14:06 -04:00
Tyson Clugg e34226fc37 Fixed #25259 -- Added comments to header of generated migration files 2015-08-31 22:14:21 +10:00
Y3K cbcf78fa94 Fixed #25252 -- Added friendly error message on incorrect .select_related() use
Using select_related() after .values() or .values_list() is not possible
because .values() or .values_list() already got the values they need.
2015-08-31 15:13:59 +10:00
Aymeric Augustin b79fc11d73 Made the autoreloader survive all exceptions.
Refs #24704.
2015-08-29 20:50:00 +02:00
Aymeric Augustin c2fcba2ac7 Ensured gen_filenames() yields native strings.
This also fixes a test failure on Python 2 when Django is installed in a
non-ASCII path. This problem cannot happen on Python 3.
2015-08-29 20:49:25 +02:00
Aymeric Augustin dfa712efb8 Refactored autoreload tests.
* Added helpers to test uncached and cached access.
* Fixed test_project_root_locale: it duplicated test_locale_paths_setting.
* Rewrote test_only_new_files: test more cases.
2015-08-29 20:49:24 +02:00
Aymeric Augustin 23620cb8e0 Accounted for error files in the autoreloader.
* When some old files contain errors, the second call to
  gen_filenames() should return them.
* When some new files contain errors, the first call to
  gen_filenames(only_new=True) should return them.
2015-08-29 20:47:38 +02:00
Sergey Kolosov e75882332c Fixed #17375 -- Changed makemessages to use xgettext with --files-from
Changed the way makemessages invokes xgettext from one call per
translatable file to one call per locale directory (using --files-from).
This allows to avoid https://savannah.gnu.org/bugs/index.php?35027 and,
as a positive side effect, speeds up localization build.
2015-08-28 15:41:58 -04:00
Tim Graham 7ac0cd445e Fixed #25323 -- Fixed selenium test failures with chromedriver 2.18. 2015-08-28 13:54:03 -04:00
Tim Graham 01b2b0b654 Fixed #25318 -- Made SILENCED_SYSTEM_CHECKS suppress all messages.
Previously, messages of ERROR level or higher were printed to
the console.
2015-08-28 13:34:56 -04:00
Tim Graham 9607a04041 Fixed #25299 -- Fixed crash with ModelAdmin.list_display value that clashes with a model reverse accessor. 2015-08-28 08:46:26 -04:00
Markus Holtermann 8e631a3175 Refs #24590 -- Ensured isolation between autodetector tests
Fixed a regression introduced in e1427cc609 when running tests in reverse order.
2015-08-28 10:17:34 +10:00
elky c32b61c6fd Fixed #20597 -- Replaced admin GIF/PNG icons by SVG 2015-08-27 17:21:02 -04:00
Sergey Kolosov 22bb548900 Fixed #22634 -- Made the database-backed session backends more extensible.
Introduced an AbstractBaseSession model and hooks providing the option
of overriding the model class used by the session store and the session
store class used by the model.
2015-08-27 15:00:09 -04:00
Alex Hill 7bec480fe2 Fixed #24201 -- Added order_with_respect_to support to GenericForeignKey. 2015-08-27 09:20:17 -04:00
Markus Holtermann e1427cc609 Fixed #24590 -- Cached calls to swappable_setting.
Moved the lookup in Field.swappable_setting to Apps, and added
an lru_cache to cache the results.

Refs #24743

Thanks Marten Kenbeek for the initial work on the patch. Thanks Aymeric
Augustin and Tim Graham for the review.
2015-08-27 17:06:21 +10:00
Markus Holtermann 91f701f4fc Fixed #25280 -- Properly checked regex objects for equality to prevent infinite migrations
Thanks Sayid Munawar and Tim Graham for the report, investigation and
review.
2015-08-27 09:52:53 +10:00
Jeremy Satterfield 1175027641 Fixed #25308 -- Made MigrationQuestioner respect MIGRATION_MODULES setting. 2015-08-26 09:04:00 -04:00
sarthakmeh 4bc00defd0 Fixed #14217 -- Added validation for field name collision when using model inheritance. 2015-08-25 16:16:54 -04:00
Claude Paroz 9324935c3e Fixed #25295 -- Restored 'no active translation' after language override
Thanks David Nelson Adamec for the report and Tim Graham for the review.
2015-08-25 10:32:10 +02:00
Maxime Lorant 4ce433e811 Fixed #25302 -- Prevented BrokenLinkEmailsMiddleware from reporting 404s when Referer = URL. 2015-08-24 19:35:49 -04:00
Tommy Beadle d3fdaf907d Fixed #23727 -- Inhibited the post_migrate signal when using serialized_rollback.
When using a TransactionTestCase with serialized_rollback=True,
after creating the database and running its migrations (along with
emitting the post_migrate signal), the contents of the database
are serialized to _test_serialized_contents.

After the first test case, _fixture_teardown() would flush the
tables but then the post_migrate signal would be emitted and new
rows (with new PKs) would be created in the django_content_type
table. Then in any subsequent test cases in a suite,
_fixture_setup() attempts to deserialize the content of
 _test_serialized_contents, but these rows are identical to the
rows already in the database except for their PKs.  This causes an
IntegrityError due to the unique constraint in the
django_content_type table.

This change made it so that in the above scenario the post_migrate
signal is not emitted after flushing the tables, since it will be
repopulated during fixture_setup().
2015-08-24 08:59:20 -04:00
Aymeric Augustin 491d01b7e9 Tweak some examples.
"Area man/woman" is confusing to people not familiar with the
conventions of American journalism (like me).
2015-08-22 20:25:42 +02:00
Maxime Lorant 7d60659e22 Fixed #25300 -- Added unit tests for BoundField.id_for_label 2015-08-22 10:08:59 -04:00
Tim Graham 01966bb2a7 Fixed typo in tests/migrations/test_autodetector.py. 2015-08-20 14:52:26 -04:00
Tim Graham 867d287b3a Added a test to ensure empty sessions are saved. 2015-08-20 10:24:19 -04:00
Tim Graham 333cbdcd2d Fixed #24951 -- Fixed AssertionError in delete queries involving a foreign/primary key.
Thanks Anssi Kääriäinen for help.
2015-08-20 08:14:16 -04:00
Jani Tiainen 1b8d7eff3b Refs #12400 -- Added supports_geometry_field_unique_index GIS db feature. 2015-08-19 19:02:30 -04:00
Claude Paroz c1893e2839 Fixed #25285 -- Provided unknown command message with plain django-admin.py
Thanks Maxime Lorant for the report and Tim Graham for suggesting
the improved comment.
2015-08-19 19:58:44 +02:00
Tim Graham 197b187810 Fixed #25225 -- Simplified code to remove GEOSIndexError
The test is a regression for refs #4740 to show that the original
fix of GEOSIndexError is no longer needed.
2015-08-18 19:10:47 -04:00
David Gibbons 39b55537ec Added two more tests for user-entered passwords when creating a superuser. 2015-08-18 16:22:14 -04:00
Tim Graham 8cc41ce7a7 Fixed DoS possiblity in contrib.auth.views.logout()
Thanks Florian Apolloner and Carl Meyer for review.

This is a security fix.
2015-08-18 08:03:43 -04:00
Markus Holtermann 0271a11ba5 Fixed #24755 -- Hid operations from dependency apps when merging migrations
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-08-18 18:33:14 +10:00
Tim Graham 75b5de8d5f Refs #23266 -- Fixed ticket number reference in a queries test. 2015-08-17 17:37:07 -04:00
Richard Mitchell 7eb513ab0f Refs #21554 -- Added some assertions to a model_inheritance_regress test. 2015-08-15 19:32:21 -04:00
Caio Ariede dad8434d6f Fixed #25180 -- Prevented varchar_patterns_ops and text_patterns_ops indexes for ArrayField. 2015-08-15 10:02:08 -04:00
Valentina Mukhamedzhanova 1f7b25c1a7 Fixed #24986 -- Added support for annotations in DISTINCT queries. 2015-08-15 08:23:32 -04:00
Alex Hill 98bcdfa8bd Fixed #25064 -- Allowed empty join columns. 2015-08-15 07:26:44 -04:00
Tim Graham f9636fdf92 Refs #23843 -- Updated Oracle annotations workaround to reflect latest status. 2015-08-14 13:52:18 -04:00
Tim Graham 825429c1f7 Moved foreign_object models.py into a module. 2015-08-14 08:53:35 -04:00
Caio Ariede de41fbb3cf Fixed #25239 -- Corrected makemigrations numbering if a migration has a number-only filename. 2015-08-14 07:28:37 -04:00
Fabrizio Ettore Messina ece78684d9 Fixed #25267 -- Corrected message for admin.E122 system check. 2015-08-13 12:34:48 -04:00
Ion Scerbatiuc 0cc059cd10 Fixed #25172 -- Fixed check framework to work with multiple databases. 2015-08-12 18:00:26 -04:00
Sambhav Satija d0bd533043 Fixed #25254 -- Added JsonResponse json_dumps_params parameter. 2015-08-12 10:39:07 -04:00
Doug Beck b7508896fb Fixed #24257 -- Corrected i18n handling of percent signs.
Refactored tests to use a sample project.

Updated extraction:
* Removed special handling of single percent signs.
* When extracting messages from template text, doubled all percent signs
  so they are not interpreted by gettext as string format flags. All
  strings extracted by gettext, if containing a percent sign, will now
  be labeled "#, python-format".

Updated translation:
* Used "%%" for "%" in template text before calling gettext.
* Updated {% trans %} rendering to restore "%" from "%%".
2015-08-12 10:23:34 -04:00
pscottdevos 7fa1dd8a80 Fixed #25163 -- Fixed exception handling in nested test client requests. 2015-08-11 10:01:24 -04:00
Tim Graham b27547f9d1 Removed deprecated GeoManager from inspectdb/ogrinspect output.
refs ea27e26b09
2015-08-10 10:29:36 -04:00
Tim Graham 5980b05c1f Fixed #25160 -- Moved unsaved model instance data loss check to Model.save()
This mostly reverts 5643a3b51b and
81e1a35c36.

Thanks Carl Meyer for review.
2015-08-10 08:51:32 -04:00
Simon Charette 12f91f6ebd Used skipUnlessDBFeature where appropriate. 2015-08-08 11:27:06 -04:00
Tim Graham a3830f6d66 Refs #25236 -- Removed ifequal/ifnotequal usage. 2015-08-08 07:33:15 -04:00
Claude Paroz 64982cc2fb Updated Wikipedia links to use https 2015-08-08 12:02:32 +02:00
mlavin 69db1c7455 Fixed #25231 -- Added recording of squashed migrations in the migrate command.
Ensured squashed migrations are recorded as applied when the
migrate command is run and all of the original migrations
have been previously applied.
2015-08-07 17:59:18 -04:00
Tim Graham a7b7f27c05 Fixed #25233 -- Fixed HStoreField.has_changed() handling of initial values.
Thanks Simon Charette for review.
2015-08-07 13:26:17 -04:00
Caio Ariede ec9004728e Fixed #25175 -- Renamed the postgresql_psycopg2 database backend to postgresql. 2015-08-07 09:33:17 -04:00
Tim Graham f2b665f886 Fixed #25241 -- Corrected ModelForm.save() error message when saving invalid form with UUIDField pk. 2015-08-07 07:44:59 -04:00
Tim Graham 3e1bb5cfb8 Refs #14476 -- Added a test for default annotation name access in aggregate.
Fixed in f59fd15c49
2015-08-06 13:52:26 -04:00
Ion Scerbatiuc 520802160a Fixed #25226 -- Set the model attribute on ArrayField's base_field 2015-08-05 15:01:32 -04:00
Sergey Kolosov 244404227e Fixed #22404 -- Added a view that exposes i18n catalog as a JSON
Added django.views.i18n.json_catalog() view, which returns a JSON
response containing translations, formats, and a plural expression
for the specified language.
2015-08-05 09:05:21 -04:00
Matt Robenolt 4dcfbd7923 Fixed #25211 -- Added HttpRequest.get_port() and USE_X_FORWARDED_PORT setting. 2015-08-04 09:50:57 -04:00
Peter Schmidt f6259ce776 Fixed #25209 -- Removed parallel=True coverage option 2015-08-04 09:32:12 -04:00
Caio Ariede 62d4074005 Fixed #25191 -- Added string diff to SimpleTestCase.assertXMLEqual() message. 2015-08-04 09:16:34 -04:00
Curtis Maloney 9f73009e98 Fixed #25215 -- Solved reference to forms.HStoreField in declaration of HStoreField
Correct test which was using the model field in a test form.
2015-08-04 19:15:22 +10:00
Tim Graham 770449e24b Removed unused Field.get_flatchoices() method.
Unused since c2ba59fc1d (Django 1.0).

Thanks Andy Baker for the report.
2015-08-03 13:08:24 -04:00
Alasdair Nicol 8972818289 Fixed #25206 -- Fixed error message when checking a ModelAdmin fieldset's fields. 2015-08-03 08:58:39 -04:00
Alex Hill b47e862d3a Added test for ForeignObject.get_extra_descriptor_filter() 2015-08-03 08:27:53 -04:00
Tim Graham fa14fb9771 Fixed flake8 warning. 2015-08-02 21:30:13 -04:00
Alex Becker 53d28f8339 Fixed #25089 -- Added password validation to createsuperuser/changepassword. 2015-08-01 20:18:26 -04:00
Rigel Di Scala 3bdaaf6777 Fixed #25146 -- Allowed method_decorator() to decorate classes. 2015-08-01 08:38:03 -04:00
Tim Graham 1a76257b1b Fixed #25204 -- Added missing space in runserver logging. 2015-08-01 08:01:24 -04:00
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