Commit Graph

4637 Commits

Author SHA1 Message Date
Anssi Kääriäinen 50633e7353 Fixed #12568 -- no error when accessing custom field's descriptor
The SubfieldBase's descriptor caused an AttributeError when accessed
from the class. Introspection didn't like that.

Patch by Trac alias supervacuo.
2013-09-18 10:03:52 +03:00
Markus Holtermann a772ea8117 Fixed #21115 -- Fixed NameError in migrate --list command 2013-09-17 12:53:59 -04:00
Markus Holtermann 5a424c2393 Fixed #21114 -- Migrations must not have a dependency to themselves. 2013-09-17 11:47:19 -04:00
Tim Graham 1234225068 Fixed test failures introduced in previous commit. 2013-09-16 13:12:50 -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
Florian Apolloner 351a061497 Fixed a timing edge case in the RelatedFieldWidgetSeleniumFirefoxTests.
By settings an implicit wait timeout for the find_* methods we can wait
till the javascript code add the new option to the DOM.

See http://ci.djangoproject.com/job/Django/database=mysql_gis,python=python3.3/3174/testReport/junit/admin_widgets.tests/RelatedFieldWidgetSeleniumFirefoxTests/test_foreign_key_using_to_field/

Stacktrace:
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/Django/workspace/database/mysql_gis/python/python3.3/tests/admin_widgets/tests.py", line 1060, in test_foreign_key_using_to_field
      self.assertEqual(username_value, new_option.get_attribute('value'))
      AssertionError: 'newuser' != 'testser'
      - newuser
      + testser
2013-09-15 01:11:07 +02:00
Tim Graham 886bb9d878 Revert "Fixed #12288 -- Validated that app names in INSTALLED_APPS are unique"
This reverts commit c1ec08998d.

There are backwards compatability concerns with this.
2013-09-14 07:19:32 -04:00
Anssi Kääriäinen 74b91b3888 Added tests for double-pickling a QuerySet
Refs #21102.
2013-09-14 10:33:15 +03:00
Michael Manfre c89d80e2cc Fixed #21097 - Added DatabaseFeature.can_introspect_autofield 2013-09-14 09:48:59 +03: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
e0ne c1ec08998d Fixed #12288 -- Validated that app names in INSTALLED_APPS are unique 2013-09-13 08:09:21 -04:00
Michael Manfre 018037736f Fixed #21099 - Skip DistinctOnTests unless backend can_distinct_on_fields 2013-09-12 14:32:23 -04:00
Michael Manfre e61cc87129 Fixed #21090 -- Allowed backends to provide dotted field path to inspectdb. 2013-09-11 13:35:26 -04:00
Baptiste Mispelon abb10db06f Fixed #21089 -- Allow TransactionTestcase subclasses to define an empty list of fixtures.
Thanks to lgs for the report and initial patch.
2013-09-11 15:28:04 +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
Tim Graham 7fe5b656c9 Prevented arbitrary file inclusion with {% ssi %} tag and relative paths.
Thanks Rainer Koirikivi for the report and draft patch.

This is a security fix; disclosure to follow shortly.
2013-09-10 21:02:48 -04:00
Tim Graham 4e96dac450 Fixed #19298 -- Added MultiValueField.__deepcopy__
Thanks nick.phillips at otago.ac.nz for the report.
2013-09-10 13:56:49 -04:00
Florian Apolloner d5d0e03ec8 Fixed test errors from 053de6131a on py3.2. 2013-09-10 19:17:01 +02:00
e0ne 053de6131a Fixed #5749 -- Added field_name as a key in the _html_output dict
Thanks SmileyChris for the suggestion.
2013-09-10 13:00:10 -04:00
Juan Catalano 4840fd9cbc Fixed #20919 -- Extended assertRedirects to be able to avoid fetching redirect's response.
Thanks mjtamlyn for the suggestion.
2013-09-10 12:22:55 -04:00
Aymeric Augustin 79ccd1a101 Fixed test that fails when pytz is installed.
pytz' localize() method is the bane of my life.
2013-09-10 18:07:29 +02: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
Loic Bistuer d59f1993f1 Made MigrationWriter look for a "deconstruct" attribute on functions.
Refs #20978.
2013-09-10 10:12:23 -04:00
Tim Graham 4ba373840a Fixed #16534 -- Improved ability to customize DiscoverRunner
Added DiscoverRunner.test_suite and .test_runner attributes.

Thanks tomchristie for the suggestion and jcd for the patch.
2013-09-10 09:49:39 -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
e0ne f2a4452882 Fixed #18403 -- Initialized bad_cookies in SimpleCookie
Thanks Stefano Crosta for the report.
2013-09-10 08:26:54 -04:00
homm 7008ed61c5 Fixed #21033 -- Fixed uploaded filenames not always being truncated to 255 characters 2013-09-10 01:55:16 +02:00
Florian Apolloner df2fd4e09b Removed unneeded imports in tests's __init__.py and unified them. 2013-09-09 23:01:07 +02:00
Aymeric Augustin d9413d33b2 Refactored code and tests that relied on django.utils.tzinfo.
Refs #17262.
2013-09-09 22:32:52 +02:00
Aymeric Augustin ec2778b445 Fixed #17262 -- Refactored tzinfo implementations.
This commit deprecates django.utils.tzinfo in favor of the more recent
django.utils.timezone which was introduced when Django gained support
for time zones.
2013-09-09 22:32:51 +02:00
Kevin Christopher Henry 9d700322b3 Fixed #19885 -- cleaned up the django.test namespace
* override_settings may now be imported from django.test
* removed Approximate from django.test
* updated documentation for things importable from django.test

Thanks akaariai for the suggestion.
2013-09-09 16:03:13 -04:00
Josh Mize a52cc1c088 Fixed #21078 -- Handled additional bad Accept-Language header 2013-09-09 15:19:09 -04: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
Tim Graham 789d8f0748 Fixed syntax error on Python 3.2; refs #20889. 2013-09-09 09:54:08 -04:00
Curtis Maloney 7c6f2ddcd9 Simplify FilterExpression.args_check 2013-09-09 09:03:50 -04:00
Daniel Boeve 6dca603abb Fixed #20889 -- Prevented email.Header from inserting newlines
Passed large maxlinelen to email.Header to prevent newlines from being
inserted into value returned by _convert_to_charset

Thanks mjl at laubach.at for the report.
2013-09-09 08:47:41 -04:00
Tim Graham aeed2cf3b2 Added a test to show that the user.is_staff check in admin base.html is necessary.
refs #21067
2013-09-09 07:59:35 -04:00
Baptiste Mispelon 28a571348b Fix #20745: Don't silence TypeError raised inside templates.
Thanks to robin for the report and claudep for the review.
2013-09-08 22:05:35 +02:00
Alex Gaynor 9d11522599 Removed some more unused local vars 2013-09-08 12:20:01 -07:00
Aymeric Augustin c687bf0620 Further hardening. Refs #18766. 2013-09-08 20:43:04 +02:00
Aymeric Augustin 1a1e14786a Hardened the test introduced in ded11aa6. Refs #18766.
Inputs acceptable to time.mktime are platform-dependent.
2013-09-08 19:40:42 +02:00
Alex Gaynor 96fd5557f9 Removed a ton of unused local vars 2013-09-08 08:05:16 -07:00
Aymeric Augustin ded11aa620 Fixed #18766 -- Pointed to pytz when LocalTimezone fails.
Thanks void for the report.
2013-09-08 02:04:43 -05: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
Alex Gaynor c348550d35 Fixed some flake8 warnings 2013-09-07 15:36:00 -07: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
Julien Phalip 8ef060e0e6 Fixed a test failure introduced in 55a11683f7. 2013-09-07 12:41:33 -05: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
Aymeric Augustin 65b6eff322 Fixed #20530 -- Properly decoded non-ASCII query strings on Python 3.
Thanks mitsuhiko for the report.

This commit just adds a test since the problem was fixed in 8aaca651.
2013-09-07 11:47:38 -05:00
Andrew Godwin bacbbb481d RunSQL migration operation and alpha SeparateDatabaseAndState op'n. 2013-09-07 11:03:38 -05:00