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
Aymeric Augustin
f5add4712f
Fixed tests introduced in previous commit on Python 2. Refs #20557 .
2013-09-07 10:43:44 -05:00
Aymeric Augustin
8aaca651cf
Fixed #20557 -- Properly decoded non-ASCII cookies on Python 3.
...
Thanks mitsuhiko for the report.
Non-ASCII values are supported. Non-ASCII keys still aren't, because the
current parser mangles them. That's another bug.
2013-09-07 10:25:43 -05:00
Alex Gaynor
97a626d898
Fixed this syntax error on py32
2013-09-06 21:56:57 -07:00
Aymeric Augustin
a9589dd280
Fixed #21032 -- pip 1.4 can't install pytz.
2013-09-06 22:11:55 -05:00
Eric Boersma
ded40142a9
Fixed #20007 -- Configured psycopg2 to return UnicodeArrays
...
Thanks hogbait for the report.
2013-09-06 20:43:58 -04:00
Russell Keith-Magee
926bc421d9
Merge pull request #1566 from adamsc64/ticket_11857
...
Fixed #11857 -- Added missing 'closed' property on TemporaryFile class.
2013-09-06 17:38:37 -07:00
Tim Graham
b7451b72ed
Fixed deprecation warning on Python 3
2013-09-06 20:36:17 -04:00
Loic Bistuer
adc0ab3386
Fixed #21037 -- Made MigrationWriter raise a ValueError when serializing lambda functions.
2013-09-06 20:13:01 -04:00
Tim Graham
67863b3bfe
Fixed test failure introduced in efd1e6096e
(sqlmigrate)
2013-09-06 19:59:25 -04:00
Russell Keith-Magee
4f5faa1916
Merge pull request #1582 from rca/12756-missing-yaml-module-serializer-error-message
...
Fixed #12756 : Improved error message when yaml module is missing.
2013-09-06 16:05:02 -07:00
Roberto Aguilar
01a5359477
Cleanup commit after peer review.
2013-09-06 22:45:31 +00:00
Russell Keith-Magee
9b2dc12b83
Merge pull request #1580 from ianawilson/ticket_16502
...
Fixed #16502 -- Fixed a TemplateDoesNotExist error that should be an ImproperlyConfigured.
Assistance on the patch from #jambronrose.
2013-09-06 15:31:25 -07:00
Roberto Aguilar
9587d4eea0
Fixed existing tests to handle BadSerializer.
...
When a BadSerializer instance is stubbed in for the yaml serializer,
make sure tests do not fail.
2013-09-06 22:26:13 +00:00
Roberto Aguilar
ca3ac4a3e3
Updated NoYamlSerializerTestCase to run with yaml.
...
In order to verify the behavior of using the yaml serializer when yaml
is on the system, fake the ImportError when the serializer is being
registered.
2013-09-06 22:26:13 +00:00
Ian Wilson
d005130845
fixed test name from an old, overly specific iteration of the test
2013-09-06 17:20:43 -05:00
Aymeric Augustin
b4cd8169de
Fixed #11811 -- Data-loss bug in queryset.update.
...
It's now forbidden to call queryset.update(field=instance) when instance
hasn't been saved to the database ie. instance.pk is None.
2013-09-06 17:15:23 -05:00
Russell Keith-Magee
122020fdb9
Merge pull request #1579 from ianawilson/ticket_21058
...
Fixed #21058 -- Fixed debug view blowing up when no template is provided to the template rendering functions.
Assistance on this commit from @jambonrose.
2013-09-06 15:06:57 -07:00
Ian Wilson
e12de0ac04
Removed unnecessary, leftover imports
2013-09-06 22:04:58 +00:00
Adrian Holovaty
e844e10b4f
Moved a settings usage up the stack in utils/formats.py #unsettings
2013-09-06 17:01:36 -05:00
Ian Wilson
b79df0b358
adds fix for SingleObjectTemplateResponseMixin raising a TemplateDoesNotExist when it should have raised an ImproperlyConfigured. fixes 16502. by @ianawilson, @jambonrose
2013-09-06 16:27:34 -05: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
Ian Wilson
9b7f4aab32
adds fix and test for when a template is not specified at all to render(). fixes #21058 . by jambonrose and ianawilson
2013-09-06 15:50:18 -05: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
Andrew Godwin
efd1e6096e
Adding 'sqlmigrate' command and quote_parameter to support it.
2013-09-06 15:28:12 -05:00
Roberto Aguilar
d8d61d8260
Added tests for missing pyyaml.
...
This test makes sure an YAML import errors are communicated to the
caller rather than stating the serializer does not exist.
2013-09-06 20:23:27 +00:00
Dan Johnson
df462cf760
Fixed #21043 -- Made resolve() handle reverse_lazy objects.
...
Thanks Keryn Knight for the report.
2013-09-06 15:46:43 -04:00
Florian Apolloner
85359ec9a4
Merge branch 't20812'
2013-09-06 21:03:46 +02:00
Daniel Langer
cc957cb16c
Fixed #4287 -- Fixed NaN and +/- Infinity handling in FloatField
...
NaN, +Inf, and -Inf are no longer valid values for FloatFields.
2013-09-06 14:56:37 -04:00
Christopher Adams
b2f5ac1656
Fixed #11857 -- Added missing 'closed' property on TemporaryFile class.
...
- TemporaryFile now minimally mocks the API of the Python standard
library class tempfile.NamedTemporaryFile to avoid AttributeError
exceptions.
- The symbol django.core.files.NamedTemporaryFile is actually assigned
as a different class on different operating systems.
- The bug only occurred if Django is running on Windows, hence why it
was hard to diagnose.
2013-09-06 14:32:46 -04:00
Andrew Godwin
05e14e8eaf
Migration autodetector now corerctly deals with proxy models
2013-09-06 12:39:46 -05:00
Florian Apolloner
2326dedde8
Fixed #20812 -- Error out if __unicode__/__str__ doesn't return a text type.
2013-09-06 19:24:18 +02:00
Andrew Godwin
be983ee403
Also test failure case of ProjectState dependency resolution
2013-09-06 12:18:24 -05:00
Andrew Godwin
cdeff3acc2
Project/ModelState now correctly serialize multi-model inheritance
2013-09-06 12:16:03 -05:00
Andrew Godwin
6f7977bb63
Fixed #21029 : Test for previously-commited SchemaEditor.__exit__ bug.
2013-09-06 12:16:03 -05:00
Chris Wilson
eade315da1
Fixed #10164 -- Made AutoField increase monotonically on SQLite
...
Thanks malte for the report.
2013-09-06 12:31:17 -04:00
Aymeric Augustin
e492ab8e7e
Fixed #18719 -- Made force_bytes more consistent with force_text.
2013-09-06 10:28:28 -05:00
Markus Holtermann
bd8e1a354c
Fixed #20977 -- Fixed writing migrations to disk on Python 3
2013-09-06 09:51:58 -04:00
Preston Timmons
8625c7aab3
Fixed #16096 -- Added origin attribute to template instances.
...
Thanks jdunck for the suggestion.
2013-09-06 09:14:52 -04:00
Loic Bistuer
e1266e50b2
Fixed #21015 -- Fixed MigrationLoader when importlib.import_module returns a file module or an empty directory.
2013-09-06 08:30:19 -04:00
Loic Bistuer
82bbb9fe81
Fixed #21014 -- Fixed gobbled ImportError in MigrationLoader.
2013-09-06 08:30:18 -04: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
Tim Graham
bab039d74c
Fixed #21041 -- Removed a duplicate form in tests.
...
Thanks tuxcanfly.
2013-09-05 05:49:10 -04:00
Loic Bistuer
34d52fd32e
Fixed #21010 -- Changed ModelState to only copy _meta.local_fields.
2013-09-04 14:05:59 -04:00
Tim Graham
5649c0af9d
Fixed "indentation is not a multiple of four" pep8 issues.
2013-09-03 14:22:21 -04:00
Tim Graham
cb98ffe8f4
Fixed a couple unclosed file warnings in tests
2013-09-03 13:37:27 -04:00
Tim Graham
3db66b1d65
Updated syncdb -> migrate in tests.
2013-09-03 11:51:34 -04:00
Tim Graham
86964a7b4f
Silenced deprecation warning regarding old SQL location; refs #14300
2013-09-03 11:10:43 -04:00
Tim Graham
2fd03b39ab
Removed references to django.utils.unittest which is PendingDeprecation
2013-09-03 09:55:21 -04:00
Tim Graham
ec784c486b
Silenced deprecation warnings in SortedDict tests; refs [ 07876cf02b
]
2013-09-03 09:48:46 -04: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
41feab3654
Converted tests for admin first form widget auto-focus to Selenium.
...
Refs #1707 and 1c0c879be3
.
2013-09-01 15:07:08 -03:00
Ramiro Morales
c01cd4c423
Change test added in 3e34005b1b
to be more stable.
...
It could fail when actual serialization JSON field ordering was
different from the hard-coded one. Refs #13182 .
2013-09-01 10:47:35 -03:00
Loic Bistuer
ff9e116198
Fixed #21008 -- Made MigrationWriter handle Promise objects.
2013-08-31 20:26:44 -04: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
Claude Paroz
e0643cb676
Properly skipped yaml tests when not installed
2013-08-31 15:23:56 +02:00
Claude Paroz
3e34005b1b
Fixed #13182 -- Prevented trailing spaces in indented json output
...
Thanks Stéphane Raimbault for the report and the initial patch.
2013-08-31 15:18:01 +02:00
Carl Meyer
7211741fc5
Fixed #20999 - Allow overriding formfield class with choices, without subclass restrictions.
...
Refs #18162 . Thanks claudep and mjtamlyn for review.
2013-08-30 17:43:10 -06:00
Claude Paroz
b04f8ddbaa
Fixed #21005 -- Made schema tests language-independent
...
Thanks Simon Charette for the review.
2013-08-30 21:28:21 +02:00
Simon Charette
11cd7388f7
Fixed #20989 -- Removed useless explicit list comprehensions.
2013-08-30 10:57:51 -04:00
Curtis Maloney
e2f06226ea
Improved {% include %} implementation
...
Merged BaseIncludeNode, ConstantIncludeNode and Include node.
This avoids raising TemplateDoesNotExist at parsing time, allows recursion
when passing a literal template name, and should make TEMPLATE_DEBUG behavior
consistant.
Thanks loic84 for help with the tests.
Fixed #3544 , fixed #12064 , fixed #16147
2013-08-30 10:36:36 +03:00
Anssi Kääriäinen
e973ee6a98
Fixed #20988 -- Added model meta option select_on_save
...
The option can be used to force pre 1.6 style SELECT on save behaviour.
This is needed in case the database returns zero updated rows even if
there is a matching row in the DB. One such case is PostgreSQL update
trigger that returns NULL.
Reviewed by Tim Graham.
Refs #16649
2013-08-30 09:41:07 +03:00
Simon Charette
36bbe3b7c5
Altered test introduced in f19a3669b8
for the sake of readability. refs #14786
2013-08-29 14:50:55 -04:00
Tim Graham
f19a3669b8
Fixed #14786 -- Fixed get_db_prep_lookup calling get_prep_value twice if prepared is False.
...
Thanks homm for the report and Aramgutang and lrekucki for work on
the patch.
2013-08-29 11:13:34 -04:00
Tim Graham
af953c45cc
Fixed #16433 -- Fixed a help_text/read only field interaction that caused an admin crash.
...
Thanks chris at cogdon.org for the report and admackin for the patch.
2013-08-29 09:39:31 -04:00
Tim Graham
cf8d6e9108
Fixed #20881 -- Removed contrib.auth.models.AbstractUser.get_absolute_url()
...
The definition is arbitrary and creates a broken "view on site"
link in the admin if a project doesn't define such a URL.
2013-08-29 06:36:35 -04:00
Curtis Maloney
8d473b2c54
Fixed #7116 -- Optimize RequestContext construction
2013-08-29 10:25:56 +03:00
Curtis Maloney
5cdacbda03
Fixed #17356 -- Allowed {% include %} to render compiled templates
...
Reviewed by Loic Bistuer and Tim Graham.
2013-08-29 10:22:24 +03:00
Loic Bistuer
da800be6dd
Fixed #20986 -- Enabled SelectDateWidget to use custom months
...
Reviewed by Trac alias MarkusH.
2013-08-28 16:39:26 +03:00
Warren Smith
dd3a883894
Fixed #20693 -- Add timezone support to built-in time filter.
...
Modified django.utils.dateformat module, moving __init__() method and
timezone-related format methods from DateFormat class to TimeFormat
base class. Modified timezone-related format methods to return an
empty string when timezone is inappropriate for input value.
2013-08-26 16:15:53 -05:00
Ramiro Morales
b785a80d19
Added further fixes, tests for #19949/f33db5a09a.
...
Thanks Susan Tan. Refs #19949 .
2013-08-26 08:47:24 -03:00
Ramiro Morales
51a9a5980a
Made coverage ignore files without associated source code.
...
This only affests reporting not data collection and allows coverage.py
to succesfully finish the generation of e.g. the HTML report.
Cases of code whose execution data is collected during the run phase but
for which no associated source code files can be found at the reporting
phase include tests with egg files and Python module files created at
test execution-time.
2013-08-25 22:29:43 -03:00
Ramiro Morales
72712755c4
Ignore coverage HTML report output dir in tests.
...
Added it to the list of dirs ignored by tests/runtests.py.
2013-08-25 19:09:03 -03:00
Christopher Medrela
32a962bdbf
Fixed #20814 -- Improved model field accessor clash error messages
...
Thanks shai for the suggestion.
2013-08-24 18:00:23 -04:00
Claude Paroz
f4e9804567
Fixed #20961 -- Fixed HttpResponse default empty content
...
Thanks epandurski at gmail.com for the report.
2013-08-24 18:10:12 +02:00
SusanTan
f33db5a09a
Fixed 19949 -- Cached template loader now caches TemplateDoesNotExist
...
Thanks @timgraham and @jdunck for the code reviews and Kronuz for bug
report and initial patch.
2013-08-24 09:19:55 -04:00
Alex Gaynor
8363406dad
Removed usage of u"" string prefix, which doesn't work on python3.2
2013-08-23 04:56:37 -07:00
Andrew Godwin
5569b0b92f
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/backends/oracle/base.py
django/db/backends/postgresql_psycopg2/base.py
django/db/models/signals.py
tests/queries/tests.py
2013-08-23 12:36:53 +01:00
Andrew Godwin
ac45f9c9c5
Fix some small errors in the tests
2013-08-23 12:07:43 +01:00
Tim Graham
b0ce6fe656
Fixed #20922 -- Allowed customizing the serializer used by contrib.sessions
...
Added settings.SESSION_SERIALIZER which is the import path of a serializer
to use for sessions.
Thanks apollo13, carljm, shaib, akaariai, charettes, and dstufft for reviews.
2013-08-22 13:58:26 -04:00
Lukasz Balcerzak
9d1987d767
Fixed #19303 -- Fixed ModelAdmin.formfield_overrides on fields with choices
2013-08-22 11:50:52 -04:00
Rainer Koirikivi
65cf82bd08
Fixed #20934 -- Avoided NoReverseMatch in ModelAdmin.changelist_view
...
The view tried to display links to a ModelAdmin's change_view, which
resulted in NoReverseMatches if get_urls was overridden to remove the
corresponding url.
2013-08-22 10:08:54 -04:00
Anssi Kääriäinen
6af05e7a0f
Fixed model.__eq__ and __hash__ for no pk value cases
...
The __eq__ method now considers two instances without primary key value
equal only when they have same id(). The __hash__ method raises
TypeError for no primary key case.
Fixed #18864 , fixed #18250
Thanks to Tim Graham for docs review.
2013-08-22 17:24:07 +03:00
Anssi Kääriäinen
8d65b6082c
Fixed #20955 -- select_related regression
...
In cases where the same connection (from model A to model B along the
same field) was needed multiple times in a select_related query, the
join setup code mistakenly reused an existing join.
2013-08-22 10:51:07 +03:00
Tim Graham
3f416f6379
Fixed a regression with get_or_create and virtual fields.
...
refs #20429
Thanks Simon Charette for the report and review.
2013-08-21 22:32:04 +01:00
Ramiro Morales
c7364a11f6
Switched mail tests to SimpleTestCase.
2013-08-21 22:32:04 +01:00
Ramiro Morales
8e571e5f8f
Fixed #12422 -- Don't override global email charset behavior for utf-8.
...
Thanks simonb for the report, Claude Paroz and Susan Tan for their work
on a fix.
2013-08-21 22:32:04 +01:00
Anssi Kääriäinen
244e2b71f5
Fixed #20946 -- model inheritance + m2m failure
...
Cleaned up the internal implementation of m2m fields by removing
related.py _get_fk_val(). The _get_fk_val() was doing the wrong thing
if asked for the foreign key value on foreign key to parent model's
primary key when child model had different primary key field.
2013-08-21 22:32:04 +01:00
Ramiro Morales
c5fbd16362
Import test case classes from their public API module.
2013-08-21 22:32:04 +01:00
Ramiro Morales
01223840f3
Fixed #18967 -- Don't base64-encode message/rfc822 attachments.
...
Thanks Michael Farrell for the report and his work on the fix.
2013-08-21 22:32:04 +01:00
Florian Apolloner
839940f27f
Fixed #20933 -- Allowed loaddata to load fixtures from relative paths.
2013-08-21 22:32:04 +01:00
Anssi Kääriäinen
3a8ae71ab5
Fixed invalid testing fixture
2013-08-21 22:31:50 +01:00
Anssi Kääriäinen
f5552571dc
Fixed #20820 -- Model inheritance + m2m fixture loading regression
...
Tests by Tim Graham, report from jeroen.pulles@redslider.net .
2013-08-21 22:31:50 +01:00
Anssi Kääriäinen
ced3e6b17d
Fixed test failure caused by different NULL ordering between backends
2013-08-21 22:31:50 +01:00
Anssi Kääriäinen
cea7204504
Fixed #14056 -- Made sure LEFT JOIN aren't trimmed in ORDER BY
...
If LEFT JOINs are required for correct results, then trimming the join
can lead to incorrect results. Consider case:
TBL A: ID | TBL B: ID A_ID
1 1 1
2
Now A.order_by('b__a') did use a join to B, and B's a_id column. This
was seen to contain the same value as A's id, and so the join was
trimmed. But this wasn't correct as the join is LEFT JOIN, and for row
A.id = 2 the B.a_id column is NULL.
2013-08-21 22:30:46 +01:00
Anssi Kääriäinen
b773ef8fa0
Fixed #14043 -- Made sure nullable o2o delete works as expected
...
There was an old complaint about nullable one-to-one field cascading
even when the o2o field was saved to None value before the deletion.
Added an test to verify this doesn't happen.
Also some PEP 8 cleanup.
2013-08-21 22:30:45 +01:00
Simon Charette
63378163f9
Fixed #20943 -- Weakly reference senders when caching their associated receivers
2013-08-21 22:30:45 +01:00
Simon Charette
77478d84ad
Fixed an aggregation test failure on MySQL.
2013-08-21 22:30:02 +01:00
Andrew Godwin
2e7f45a372
Change autodetector changes API to be just one method
2013-08-21 22:25:15 +01:00
Tim Graham
f7290581fe
Fixed a regression with get_or_create and virtual fields.
...
refs #20429
Thanks Simon Charette for the report and review.
2013-08-21 08:30:21 -04:00
Ramiro Morales
a5cf5da50d
Switched mail tests to SimpleTestCase.
2013-08-21 07:48:16 -03:00
Ramiro Morales
ececbe77ff
Fixed #12422 -- Don't override global email charset behavior for utf-8.
...
Thanks simonb for the report, Claude Paroz and Susan Tan for their work
on a fix.
2013-08-21 07:44:20 -03:00
Anssi Kääriäinen
b065aeb17f
Fixed #20946 -- model inheritance + m2m failure
...
Cleaned up the internal implementation of m2m fields by removing
related.py _get_fk_val(). The _get_fk_val() was doing the wrong thing
if asked for the foreign key value on foreign key to parent model's
primary key when child model had different primary key field.
2013-08-21 08:32:19 +03:00
Ramiro Morales
deebb1a977
Import test case classes from their public API module.
2013-08-20 22:23:41 -03:00
Ramiro Morales
f9d1d5dc13
Fixed #18967 -- Don't base64-encode message/rfc822 attachments.
...
Thanks Michael Farrell for the report and his work on the fix.
2013-08-20 22:17:26 -03:00
Florian Apolloner
96346ed5ad
Fixed #20933 -- Allowed loaddata to load fixtures from relative paths.
2013-08-20 21:25:57 +02:00
Anssi Kääriäinen
86f4459f9e
Fixed invalid testing fixture
2013-08-20 17:48:02 +03:00
Anssi Kääriäinen
1ed77e7782
Fixed #20820 -- Model inheritance + m2m fixture loading regression
...
Tests by Tim Graham, report from jeroen.pulles@redslider.net .
2013-08-20 16:54:05 +03:00
Anssi Kääriäinen
8dc76c4b91
Fixed test failure caused by different NULL ordering between backends
2013-08-20 11:33:44 +03:00
Anssi Kääriäinen
905409855c
Fixed #14056 -- Made sure LEFT JOIN aren't trimmed in ORDER BY
...
If LEFT JOINs are required for correct results, then trimming the join
can lead to incorrect results. Consider case:
TBL A: ID | TBL B: ID A_ID
1 1 1
2
Now A.order_by('b__a') did use a join to B, and B's a_id column. This
was seen to contain the same value as A's id, and so the join was
trimmed. But this wasn't correct as the join is LEFT JOIN, and for row
A.id = 2 the B.a_id column is NULL.
2013-08-20 10:55:00 +03:00
Anssi Kääriäinen
b53ed351b3
Fixed #14043 -- Made sure nullable o2o delete works as expected
...
There was an old complaint about nullable one-to-one field cascading
even when the o2o field was saved to None value before the deletion.
Added an test to verify this doesn't happen.
Also some PEP 8 cleanup.
2013-08-20 09:50:37 +03:00
Simon Charette
e55ca60903
Fixed #20943 -- Weakly reference senders when caching their associated receivers
2013-08-20 01:53:58 -04:00
Simon Charette
fdbf492946
Fixed an aggregation test failure on MySQL.
2013-08-19 20:39:30 -04:00
Andrew Godwin
b6a957f0ba
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
docs/ref/django-admin.txt
2013-08-19 18:30:48 +01:00
Rainer Koirikivi
3c03004050
Fixed #20640 -- Avoided NoReverseMatch in get_deleted_objects
...
The default delete action resulted in a NoReverseMatch if it were to
list any Model with a ModelAdmin with `get_urls` overridden to remove
the change url. Catching the error and not displaying the link in that
case, as was already done for models with no registered admins.
Thanks Keryn Knight for the report.
2013-08-19 12:01:33 -04:00
Anssi Kääriäinen
58c6d0209d
Fixed #12807 -- EmptyResultSet ORed condition
...
The EmptyResultSet wasn't treated correctly so the end results was
incorrect, too. The bug had been already fixed in master so only tests
added.
2013-08-19 16:24:45 +03:00
Anssi Kääriäinen
7bc57a6d71
Fixed #11881 -- removed junk from aggregation subqueries
...
There were clauses that weren't needed in the subqueries. These were
ORDER BY, SELECT FOR UPDATE and related selections.
2013-08-19 16:15:09 +03:00
Anssi Kääriäinen
7737305a4f
Fixed #12886 -- aggregation over sliced queryset
2013-08-19 16:00:17 +03:00
Andrew Godwin
52edc16086
Add more stringent M2M tests and fix the bug they exposed
2013-08-19 13:50:26 +01:00
Anssi Kääriäinen
7d28bed13b
PEP 8 cleanup
2013-08-19 14:16:10 +03:00
Anssi Kääriäinen
630b9df42f
Fixed #12567 -- Incorrect SQL in model inheritance case
...
An isnull lookup produced incorrect SQL. This was already fixed
earlier, so only tests added.
2013-08-19 14:10:03 +03:00
Anssi Kääriäinen
3844089edc
Fixed #20777 -- Admin proxy model deletion regression
...
Added proxy_models tests by Harm Geerts <github@geertswei.nl>.
2013-08-19 09:51:41 +03:00
Anssi Kääriäinen
4668c142dc
Made Model.__eq__ consider proxy models equivalent
...
Fixed #11892 , fixed #16458 , fixed #14492 .
2013-08-19 09:51:28 +03:00
Alex Gaynor
aa01c99f55
Merge pull request #1479 from nickbruun/ticket_20924
...
Proxy __len__ and __contains__ for LazyObject
2013-08-18 09:41:43 -07:00
Claude Paroz
165f44aaaa
Combine consecutive with statements
...
Python 2.7 allows to combine several 'with' instructions.
2013-08-16 20:12:10 +02:00
Alasdair Nicol
22c6497f99
Fixed #20895 -- Made check management command warn if a BooleanField does not have a default value
...
Thanks to Collin Anderson for the suggestion and Tim Graham for
reviewing the patch.
2013-08-15 19:47:26 -04:00
Nick Bruun
b9ef96e73c
Regression test and patch for ticket #20924 .
2013-08-15 20:59:58 +02:00
Jonathan Slenders
ff410565bf
Fixed #20709 -- Allowed {% widthratio %} to accept an "as" parameter.
...
Thanks clay.evil@ for the suggestion.
2013-08-14 12:40:19 -04:00
Florian Apolloner
4e50e40654
Removed unneeded conditional_escapes from the testsuite.
2013-08-13 22:22:46 +02:00
Andrew Godwin
157604a87f
Oracle schema backend, passes most tests and is pretty complete.
2013-08-13 20:54:57 +01:00
Matt Johnson
907ef9d0d1
Fixed #20555 -- Make subwidget id attribute available
...
In `BoundField.__iter__`, the widget's id attribute is now passed to
each subwidget. A new id_for_label property was added to ChoiceInput.
2013-08-13 13:23:05 -04:00
Jacob Kaplan-Moss
cbe6d5568f
Apply autoescaping to AdminURLFieldWidget.
...
This is a security fix; disclosure to follow shortly.
2013-08-13 11:06:41 -05:00
Anssi Kääriäinen
09a5f5aabe
Fixed test failure on MySQL
...
The fix for #20874 caused a MySQL specific failure.
2013-08-13 15:37:08 +03:00
Loic Bistuer
163a34ce4b
Fixed #20883 -- Made model inheritance find parent links in abstract parents
2013-08-13 15:14:11 +03:00
Anssi Kääriäinen
dcdc579d16
Fixed #20874 -- bump_prefix() in nested subqueries
...
Also made some cleanup to build_filter() code by introducing submethods
solve_lookup_type() and prepare_lookup_value().
2013-08-13 14:11:52 +03:00
Ramiro Morales
6c12cd15e9
Unlocalize line numbers and ids in debug 500 view.
...
While using USE_L10N, line numbers and IDs were printed as comma (or
locale equivalent) separated values.
Thanks Kronuz for the report and intial patch.
Fixes #20861 .
2013-08-12 21:59:27 -03:00
Tim Graham
71b5617c24
Fixed #17778 -- Prevented class attributes on context from resolving as template variables.
...
Thanks KyleMac for the report, regebro for the patch, and Aymeric for the test.
2013-08-12 12:41:39 -04:00
Mel Collins
6bdb3b1135
Fixed #13518 -- Added FILE_UPLOAD_DIRECTORY_PERMISSIONS setting
...
This setting does for new directories what FILE_UPLOAD_PERMISSIONS
does for new files.
Thanks jacob@ for the suggestion.
2013-08-12 07:15:59 -04:00
Andrew Godwin
b61b634628
Fix weird planning issues when already fully migrated.
2013-08-11 15:28:51 +01:00
Andrew Godwin
ae19315b4d
Support index_together during model creation
2013-08-11 14:23:31 +01:00
Ramiro Morales
22af1394c6
Expand testing of Test LiveServerTestCase static files serving.
2013-08-10 16:32:07 -03:00
Ramiro Morales
cb92e3391b
Test that django.views.static.serve() generates 404 status codes.
...
Also, change tests to be based on SimpleTestCase.
2013-08-10 16:00:22 -03:00
Bojan Mihelac
0cac4fbf69
Fixed #18356 -- Gave the test client signals.template_rendered call a unique dispatch_uid
...
This prevents the test client context from being lost when the client
is used in a nested fashion.
2013-08-09 12:22:42 -04:00
Andrew Godwin
588b523233
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/models/options.py
2013-08-09 14:37:37 +01:00
Andrew Godwin
de64c4d6e9
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/core/management/commands/flush.py
django/core/management/commands/syncdb.py
django/db/models/loading.py
docs/internals/deprecation.txt
docs/ref/django-admin.txt
docs/releases/1.7.txt
2013-08-09 14:17:30 +01:00
Tim Graham
9c711ee3a6
Fixed test failures on Python 3 - refs #12288
2013-08-09 09:12:15 -04:00
Tim Graham
b575d690bb
Fixed test failures introduced by #12288
2013-08-09 08:34:37 -04:00
SusanTan
2ac89012d8
Fixed #12288 -- Added unique validation for INSTALLED_APPS
2013-08-09 08:08:34 -04:00
Marc Tamlyn
1c4a9bd9ad
Revert change to the default Form.clean()
...
This means it doesn't break for people who are doing
`cleaned_data = super(FooForm, self).clean()`.
2013-08-08 14:27:48 +01:00
Marc Tamlyn
fb1dd6b13a
Form.clean() does not need to return cleaned_data.
...
If it does, that will be used as the cleaned_data. The default
implementation has been changed to match this change.
2013-08-08 14:05:55 +01:00
Anssi Kääriäinen
c7739e30b2
Fixed #17424 -- annotate() + exclude() bug
...
The bug was already fixed by 01b9c3d519
,
so only tests added.
At the same time promote_joins()'s uncoditional flag is gone, it isn't
needed for anything any more.
2013-08-07 12:53:33 +03:00
Collin Anderson
d53e574676
Fixed #20865 -- Fixed raw_id_fields to work with callable limit_choices_to.
2013-08-06 13:41:52 -04:00
Alex Cucu
1c64a0f29e
Fixed #19918 -- Modified select_for_update to run on the write database.
2013-08-06 09:50:59 -04:00
Tai Lee
1280675834
Fixed #15511 -- Allow optional fields on ``MultiValueField` subclasses.
...
The `MultiValueField` class gets a new ``require_all_fields`` argument that
defaults to ``True``. If set to ``False``, individual fields can be made
optional, and a new ``incomplete`` validation error will be raised if any
required fields have empty values.
The ``incomplete`` error message can be defined on a `MultiValueField`
subclass or on each individual field. Skip duplicate errors.
2013-08-06 08:50:47 -04:00
Marc Tamlyn
0b771fcf29
Merge pull request #1441 from loic/ticket16986
...
Fixed #16986 -- Model.clean() can report errors on individual fields.
2013-08-06 02:10:45 -07:00
Anssi Kääriäinen
263b873599
Fixed ordering related test failure
...
Also PEP8 + python_2_unicode_compatible cleanup done.
2013-08-06 10:07:52 +03:00
Loic Bistuer
71093d22b6
Fixed #16986 -- Model.clean() can report errors on individual fields.
...
This commit provides the tests for this issue but the actual problem was solved
by the ValidationError refactor in f34cfec
and ee77d4b
.
Refs #20199 .
2013-08-06 02:26:51 +07:00
Tim Graham
04489c7dbf
Fixed #17667 -- Prevented app loading from skipping nonexistent apps after the first try
...
Thanks ea2100@ for the report and akaariai for the patch.
2013-08-05 13:34:35 -04:00
Tim Heap
75c87e2d38
Fixed #20850 -- Added MultiWidget.needs_multipart_form
2013-08-05 10:02:28 -04:00
Julien Phalip
f067887a4f
Fixed some intermittent Selenium test failures.
2013-08-04 22:03:53 -07:00
Julien Phalip
995ffbb2a6
Added some Selenium tests for the admin raw id widget.
2013-08-04 16:08:45 -07:00
Loic Bistuer
ebb3e50243
Introduced ModelAdmin.get_fields() and refactored get_fieldsets() to use it.
...
Refs #18681 .
This also starts the deprecation of ModelAdmin.declared_fieldsets
2013-08-04 09:14:18 -04:00
Curtis Maloney
07876cf02b
Deprecated SortedDict (replaced with collections.OrderedDict)
...
Thanks Loic Bistuer for the review.
2013-08-04 07:09:39 -04:00
Aymeric Augustin
784377544e
Fixed #20822 -- Set content type of default error pages to 'text/html'.
...
Thanks Jimmy Song for the patch.
2013-08-04 11:04:37 +02:00
Loic Bistuer
0bcdcc7eb9
Added ModelAdmin.get_search_fields.
2013-08-03 20:02:43 -04:00
Petr Dlouhý
1b47508ac8
Fixed LogEntry.get_admin_url() for non-existent models.
...
Regression introduced by [369b6fa
]; refs #18169 .
2013-08-02 12:51:10 -04:00
Loic Bistuer
a0ed2f9260
Fixed #18681 -- GenericInlineModelAdmin.get_formset() no longer bypasses get_fieldsets().
...
Refs 23e1b59
which already fixed this issue for ModelAdmin and InlineModelAdmin.
2013-08-02 10:41:29 -04:00
Aleksandra Sendecka
893d8de6f5
Fixed #18777 -- Localized form fields with as_text/as_hidden
...
Thanks croldan for the report.
2013-08-02 08:41:54 -04:00
Tim Graham
aa830009de
Fixed #17519 -- Fixed missing SQL constraints to proxy models.
...
Thanks thibaultj for the report, jenh for the patch,
and charettes for the tests.
2013-08-02 07:41:56 -04:00
Alex Couper
1123f45511
Fixed #20649 -- Allowed blank field display to be defined in the initial list of choices.
2013-07-31 14:12:03 -04:00
Will Hardy
1c3c21b38d
Fixed #19987 -- Disabled host validation when DEBUG=True.
...
The documentation promises that host validation is disabled when
DEBUG=True, that all hostnames are accepted. Domains not compliant with
RFC 1034/1035 were however being validated, this validation has now been
removed when DEBUG=True.
Additionally, when DEBUG=False a more detailed SuspiciousOperation
exception message is provided when host validation fails because the
hostname is not RFC 1034/1035 compliant.
2013-07-31 10:38:59 -04:00
Loic Bistuer
acd1d439fd
Fixed #20826 -- Moved Manager.raw() and Manager._insert() to the QuerySet class.
2013-07-31 09:54:00 -04:00
Florian Hahn
e888a9b30d
Fixed #15624 -- Made sure aggregations are present in SELECT
2013-07-31 16:27:58 +03:00
Anssi Kääriäinen
e01b5a5823
Fixed #11521 -- usage of field.attname in .update()
...
Fixed already by previous patch, only test added.
2013-07-31 16:02:36 +03:00
Anssi Kääriäinen
c21e86ab9e
Added field.attname to Options.name_map
...
The change also removed allow_explicit_fk from sql/query.py.
2013-07-31 16:02:36 +03:00
Tai Lee
31e6d58d46
Fixed #20348 -- Consistently handle Promise objects in model fields.
...
All Promise objects were passed to force_text() deep in ORM query code.
Not only does this make it difficult or impossible for developers to
prevent or alter this behaviour, but it is also wrong for non-text
fields.
This commit changes `Field.get_prep_value()` from a no-op to one that
resolved Promise objects. All subclasses now call super() method first
to ensure that they have a real value to work with.
2013-07-31 15:54:17 +03:00
SusanTan
ccf8f1e18f
Added a test for AdminSite.app_index_template; refs #8498 .
2013-07-31 06:59:15 -04:00
Tai Lee
4c6ffcf721
Fixed #20819 -- Return 404 instead of 500 error when ``staticfiles`` view is used in production.
2013-07-31 18:58:50 +10:00
Baptiste Mispelon
3c45fb8589
Fixed #10491 -- Allowed passing lazy objects to HttpResponseRedirect.
...
Thanks liangent for the report.
2013-07-30 13:39:44 -04:00
Tim Graham
8550df869b
Removed part of a test that doesn't work on Jenkins; refs #19877 .
2013-07-30 11:59:04 -04:00
Tim Graham
dffda2ba4e
Fixed a test that depended on the DB backend; refs #19877 . Thanks Loic.
2013-07-30 11:30:20 -04:00
Jose L. Patino
7b57e575c9
Fixed #19877 -- Added `--no-color` option to `BaseCommand` to avoid using output styles.
2013-07-30 09:26:18 -04:00
Andrew Godwin
fddc5957c5
Implement allow_migrate for migration operations
2013-07-30 12:34:31 +01:00
Andrew Godwin
12e9804d16
Rename allow_syncdb to allow_migrate
2013-07-30 12:08:59 +01:00
Julien Phalip
e351dbf6ee
Fixed #19082 -- Enabled admin field pre-population for existing objects.
...
Thanks to msaelices and d1ffuz0r for the initial patch and tests.
2013-07-30 00:21:08 -07:00
Claude Paroz
5c1143910e
Removed most of absolute_import imports
...
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00
Claude Paroz
e4937b6dde
Add utf-8 preamble to admin_scripts temp settings file
...
As some settings are copied from current user settings, we cannot
be sure the characters are pure ascii.
2013-07-29 17:10:23 +02:00
Claude Paroz
fdd7a355bf
Deprecated django.utils.importlib
...
This was a shim for pre-Python 2.7 support.
2013-07-29 17:10:22 +02:00
Justin Michalicek
ac09558760
Fixed #20817 -- Added html_message parameter to django.core.mail.send_mail()
2013-07-29 09:53:47 -04:00
Przemek Lewandowski
382c53d7d8
Fixed #18213 -- Allowed empty fixtures (emit a warning rather than raising an exception).
2013-07-29 08:03:51 -04:00
Florian Apolloner
b70c371fc1
Simplified smart_urlquote and added some basic tests.
2013-07-28 10:05:39 +02:00
Julien Phalip
4e0ff35146
Fixed #11195 -- Added CSS classes to the changelist cells to allow style customizations. Thanks to akaihola, Ramiro Morales and vdboor for their work on the patch.
2013-07-27 19:50:02 -07:00
Julien Phalip
47c755327b
Fixed a number of minor misspellings.
2013-07-27 18:46:03 -07:00
Florian Hahn
ca39c0a6be
Fixed #18404 -- Added test for AppStaticStorage with non ascii path
...
(bug was already fixed in #19357 )
2013-07-27 20:18:32 -04:00
Tim Graham
8676318d2d
Fixed #20805 -- Removed an extra colon beside checkboxes in the admin.
...
Thanks CollinAnderson for the report.
2013-07-26 14:45:38 -04:00
Tim Graham
2a979d2a7b
Updated contrib.admin to use Email/URLInputs; refs #16630
2013-07-26 07:22:30 -04:00
Anssi Kääriäinen
7cca8d56d2
Fixed related model lookup regression
...
It has been possible to use models of wrong type in related field
lookups. For example pigs__in=[a_duck] has worked. Changes to
ForeignObject broke that.
It might be a good idea to restrict the model types usable in lookups.
This should be done intentionally, not accidentally and without any
consideration for deprecation path.
2013-07-26 13:13:27 +03:00
Loic Bistuer
31fadc1202
Fixed #20625 -- Chainable Manager/QuerySet methods.
...
Additionally this patch solves the orthogonal problem that specialized
`QuerySet` like `ValuesQuerySet` didn't inherit from the current `QuerySet`
type. This wasn't an issue until now because we didn't officially support
custom `QuerySet` but it became necessary with the introduction of this new
feature.
Thanks aaugustin, akaariai, carljm, charettes, mjtamlyn, shaib and timgraham
for the reviews.
2013-07-26 12:41:27 +03:00
Carl Meyer
8f3aefdec3
Fixed handling of template loader tests.
...
Previously, the CachedLoaderTests were never run at all.
2013-07-25 17:19:17 -05:00
Andrew Godwin
a758c9c186
Add test for creating M2Ms
2013-07-25 16:36:58 +01:00
Anssi Kääriäinen
92476e880c
Fixed ._meta.pk_index() virtual field failure
2013-07-25 16:25:23 +03:00
Andrew Godwin
00276e0414
Add tests for the migrate command and fix a bug they exposed
2013-07-25 13:52:35 +01:00
Anssi Kääriäinen
b2314d9e1e
Fixed #19941 -- Modified runtests.py to make running the tests easier.
...
1. Automatically use tests/../django as the Django version.
2. If settings aren't provided through --settings or DJANGO_SETTINGS_MODULE)
then use test_sqlite.
2013-07-24 07:33:03 -04:00
Tim Graham
31c13a99bb
Fixed #14300 -- Fixed initial SQL location if models is a package.
...
Thanks al_the_x for the report and fheinz for the draft patch.
2013-07-24 06:56:33 -04:00
Tim Graham
65e03a424e
Fixed #10284 -- ModelFormSet.save(commit=False) no longer deletes objects
...
Thanks laureline.guerin@ and Wedg.
2013-07-23 16:21:23 -04:00
Anssi Kääriäinen
c00a8525c6
Fixed #20788 -- exclude() generated subquery failure
...
"Fixed" by adding a test case, the original problem was already fixed
by earlier ORM changes. Thanks to david@judicata.com for the report
and test case.
2013-07-23 13:40:50 +03:00
Anssi Kääriäinen
4bd5554721
Fixed #20782 -- qs.values().aggregate() failure
...
In the combination of .values().aggregate() the aggregate_select_mask
didn't include the aggregates added. This resulted in bogus query.
Thanks to Trac alias debanshuk for report.
2013-07-23 11:38:38 +03:00
Andrew Godwin
162f7b938f
Make migrate command recognise prefixes and 'zero'.
2013-07-22 19:43:58 +01:00
Andrew Godwin
52eb19b545
Make multi-app-cache tests work again
2013-07-22 19:36:03 +01:00
Andrew Godwin
03ec3219a0
Merge branch 'master' into schema-alteration
...
Conflicts:
django/db/backends/mysql/introspection.py
django/db/backends/oracle/creation.py
django/db/backends/postgresql_psycopg2/creation.py
django/db/models/base.py
django/db/models/loading.py
2013-07-22 19:04:25 +01:00
Claude Paroz
02b0106d43
Fixed #20781 -- Fixed _has_changed regression with MultiValueField
...
Thanks Tim Graham for the report.
2013-07-22 09:06:07 +02:00
Thomas Sorrel
bb145e2c47
Fixed #13629 -- Added CSS classes to the `<body>` tag of some admin templates to allow style customizations per app or per model.
2013-07-21 20:17:14 +00:00
Claude Paroz
11b7b9ad00
Fixed an email validation regression
...
Thanks Vincent Wagelaar for the report.
2013-07-21 21:11:32 +02:00
Karen Tracey
3aad955ea8
Fixed #13696 -- ensured inline pk field is rendered
2013-07-21 13:06:11 -04:00
Simon Charette
415a36947c
Fixed #20765 -- Set small values of `step` using exponential notation.
...
Browsers parse small factors of 10 as 0 under decimal notation.
Thanks to Trac alias matklad for the report and Claude Paroz for the review.
2013-07-19 23:31:15 -04:00
Claude Paroz
6d52844b9b
Fixed #18551 -- Enabled skipIfDBFeature/skipUnlessDBFeature to decorate a class
...
Thanks Tim Graham for the review and improved patch.
2013-07-19 20:30:14 +02:00
Matt Deacalion Stevens
a269ea4fe0
Fixed #14656 -- Added Atom1Feed `published` element
...
Some feed aggregators make use of the `published` element as well as
the `updated` element (within the Atom standard -- http://bit.ly/2YySb ).
The standard allows for these two elements to be present in the same
entry. `Atom1Feed` had implemented the `updated` element which was
incorrectly taking the date from `pubdate`.
2013-07-19 10:38:34 -04:00
Loic Bistuer
2fc6c9472c
Fixed #20767 -- Fixed ModelAdmin.preserve_filters for namespaced URLs.
...
Thanks Collin Anderson for the report.
2013-07-18 18:18:30 -04:00
Curtis Maloney
a3e7d73ed7
Allowed Context.push to behave as a context mananger.
...
Thanks Loic Bistuer for the review.
2013-07-17 13:32:32 -04:00
Tim Graham
2333c9662b
Fixed #14007 -- Added model discovery in models module without the need to specify app_label.
...
Thanks mark@ and Aramgutang for work on the patch.
2013-07-16 19:32:30 -04:00
Tim Graham
2456ffa42c
Fixed #20746 -- Removed Python 2.6 specific code/docs
2013-07-14 13:02:55 -04:00
Tim Graham
d9c580306c
Fixed #20681 -- Prevented teardown_databases from attempting to tear down aliases
...
Thanks simonpercivall.
2013-07-13 17:46:05 -04:00
Tim Graham
9b471a8fe3
Fixed a deprecation warning in a selenium test.
2013-07-13 13:15:28 -04:00
Claude Paroz
73f86f4441
Isolated host validation tests in own test case
2013-07-13 10:16:52 +02:00
Tim Graham
f2cb94f1c0
Fixed #20740 -- GenericIPAddressField should pass protocol to formfield()
...
Thanks Jeff250.
2013-07-12 16:05:14 -04:00
Karol Sikora
6272d2f155
Fixed #20429 -- Added QuerySet.update_or_create
...
Thanks tunixman for the suggestion and Loic Bistuer for the review.
2013-07-12 08:26:35 -04:00
Joeri Bekker
66f3d57b79
Fixed #19031 -- Added a warning when using override_settings with 'DATABASES'
2013-07-12 07:10:18 -04:00
Claude Paroz
59ebe39812
Fixed #17471 -- Added smtplib.SMTP_SSL connection option for SMTP backend
...
Thanks dj.facebook at gmail.com for the report and initial patch
and Areski Belaid and senko for improvements.
2013-07-11 22:00:08 +02:00
Benjamin Kagia
b0953dc913
Fixed #13721 -- Added UploadedFile.content_type_extra.
...
Thanks Waldemar Kornewald and mvschaik for work on the patch.
2013-07-11 09:11:59 -04:00
Tim Graham
4d92a0bd86
Fixed #19196 -- Added test/requirements
2013-07-10 09:24:05 -04:00
Loic Bistuer
7e6d852bac
Fixed #20663 -- "Today" and "now" admin shortcuts.
...
Changed the shortcuts next to date and time intput widgets
to account for the current timezone.
Refs #7717 , #14253 and #18768 .
2013-07-09 23:04:33 +02:00
Aymeric Augustin
404870ee1f
Fixed #20724 -- Test failure on SQLite.
...
This test failure happened if the connection's NAME was set to a file
system path, and its TEST_NAME wasn't.
Thanks Claude for the report.
2013-07-09 21:41:30 +02:00
Aymeric Augustin
38bc581bc0
Avoided transaction.set_autocommit in tests.
...
It doesn't work as one might expect on a certain database backend where
autocommits_when_autocommit_is_off = True. That backend happens to be
popular for running tests.
2013-07-09 21:41:30 +02:00
Claude Paroz
57f190ed3b
Only import gis test apps for geo-enabled DBs
2013-07-09 15:58:56 +02:00
Claude Paroz
bd563f0f57
Trusted test skipping about gis tests running or not
...
With the new test discovery system, gis tests are discovered as
other tests. They should be properly skipped now when dependencies
are missing. So let's stop special casing their inclusion.
2013-07-09 15:17:26 +02:00
Tim Graham
da79ccca1d
Fixed #6785 -- Made QuerySet.get() fetch a limited number of rows.
...
Thanks Patryk Zawadzki.
2013-07-08 08:33:40 -04:00
Alex Gaynor
626fa28878
Fixed #13813 -- Comparison of DatabaseWrappers doesn't raise errors.
...
Patch from Lukasz Balcerzak.
2013-07-08 09:35:08 +10:00
Tim Graham
2cbd579efe
Fixed #19940 -- Made test.runner.setup_databases properly handle aliases for default db.
...
Thanks simonpercivall.
2013-07-04 19:58:58 -04:00
Andrew Godwin
3a6580e485
Make get_constraints return columns in order
2013-07-02 18:02:20 +01:00
Andrew Godwin
61ff46cf8b
Add AlterIndexTogether operation
2013-07-02 18:02:01 +01:00
Andrew Godwin
2202e3f7d3
Fix index_together test
2013-07-02 12:06:26 +01:00
Andrew Godwin
9ef715d256
Fix some bad test running under PostgreSQL
2013-07-02 11:51:38 +01:00
Andrew Godwin
6a8cfbf07b
Support for index_together in schema backends
2013-07-02 11:43:44 +01:00
Andrew Godwin
3b20af3e96
Autodetection of unique_together changes
2013-07-02 11:25:18 +01:00
Andrew Godwin
67dcea711e
Add unique_together altering operation
2013-07-02 11:19:02 +01:00
Andrew Godwin
310cdf492d
Fix M2M interaction with transactions
2013-07-02 11:08:16 +01:00
Andrew Godwin
b1e0ec06f0
Merge branch 'master' into schema-alteration
2013-07-02 10:49:53 +01:00
Aymeric Augustin
e021b87c00
Fixed a few more imports of django.utils.unittest.
...
One import per line please! Refs #20680 .
2013-07-01 22:49:07 +02:00
Aymeric Augustin
909433fa50
Removed tests for django.utils.unittest vs. unittest.
...
Silenced warnings caused by the deprecation of django.utils.unittest.
Thanks Preston Timmons and Carl Meyer for their advice.
Fixed #20680 .
2013-07-01 21:49:11 +02:00
Tim Graham
a521d10322
Fixed a couple form/formset deprecation warnings in tests.
2013-07-01 09:36:31 -04:00
Tim Graham
a6a905c619
Updated tests for deprecation of Option.get_(add|change|delete)_permission.
...
refs #20642 .
2013-07-01 09:19:55 -04:00
Aymeric Augustin
cfcf4b3605
Stopped using django.utils.unittest in the test suite.
...
Refs #20680 .
2013-07-01 14:29:33 +02:00
Aymeric Augustin
2c40681805
Stopped calling loaddata with commit=False.
...
This was a stealth option only used by the tests, and it isn't useful
any more since `atomic` provides nested transactions.
2013-06-30 14:17:33 +02:00
Aymeric Augustin
acd7b34aaf
Advanced deprecation warnings for Django 1.7.
2013-06-29 18:49:37 +02:00
Aymeric Augustin
8b9b8d3bda
Removed compatibility code for streaming responses.
...
This code provided a deprecation path for old-style streaming responses.
Refs #6527 , #7581 .
2013-06-29 18:49:36 +02:00
Claude Paroz
59b0c48ce2
Fixed #18592 -- Prevented crash when accessing MySQL _last_executed
...
Thanks reames at asymmetricventures.com for the report.
2013-06-29 18:44:41 +02:00
Claude Paroz
7fbab3ebaf
Do not allow FileSystemStorage.delete to receive an empty name
...
Refs #20660 .
2013-06-29 18:09:31 +02:00
Claude Paroz
ea3fe78a9d
Fixed #20660 -- Do not try to delete an unset FieldFile
...
Thanks stanislas.guerra at gmail.com for the report and
Baptiste Mispelon for the review.
2013-06-29 18:08:39 +02:00
Claude Paroz
6118d6d1c9
More import removals
...
Following the series of commits removing deprecated features in
Django 1.7, here are some more unneeded imports removed and other
minor cleanups.
2013-06-29 11:58:36 +02:00
Ramiro Morales
7379d9acea
Removed insert(), value_for_insert() SortedDict methods deprecated in Django 1.5.
2013-06-28 22:38:13 -03:00
Ramiro Morales
6ba69c8456
Removed 'depth' .select_related() argument as per deprecation TL.
2013-06-28 21:48:16 -03:00
Ramiro Morales
c196564132
Removed custom profile model functionality as per deprecation TL.
2013-06-28 21:48:16 -03:00
Ramiro Morales
4f6be9a0c4
Removed warnings level handling code as per deprecation TL.
2013-06-28 21:48:15 -03:00
Andrew Godwin
7a47ba6f6a
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/backends/__init__.py
django/db/models/fields/related.py
tests/field_deconstruction/tests.py
2013-06-28 17:32:57 +01:00
Andrew Godwin
48dd1e63bb
Ported over Field.deconstruct() from my schema alteration branch.
...
This is to help other ongoing branches which would benefit from
this functionality.
2013-06-28 17:27:52 +01:00
Shai Berger
d097417025
Support 'pyformat' style parameters in raw queries, Refs #10070
...
Add support for Oracle, fix an issue with the repr of RawQuerySet,
add tests and documentations. Also added a 'supports_paramstyle_pyformat'
database feature, True by default, False for SQLite.
Thanks Donald Stufft for review of documentation.
2013-06-28 06:59:10 +03:00
Tim Graham
7c0b72a826
Prevented running some admin_view tests twice.
2013-06-27 20:13:42 -04:00
Tim Graham
534ced5aad
Fixed #20664 -- Fixed a bug with raw_id_fields on Python 3.
...
Thanks jefftriplett for the report.
2013-06-27 19:39:20 -04:00
Aymeric Augustin
c1284c3d3c
Fixed #20571 -- Added an API to control connection.needs_rollback.
...
This is useful:
- to force a rollback on the exit of an atomic block without having to
raise and catch an exception;
- to prevent a rollback after handling an exception manually.
2013-06-27 22:19:54 +02:00
Andrew Godwin
99b467f272
Add related_query_name to ForeignKey/M2M. Refs #20244
2013-06-27 14:44:21 +01:00
Loic Bistuer
a9ea7d8c70
Fixed #20462 - Replaced the str() cast introduced in 273dc55
by force_text()
2013-06-26 21:30:58 +07:00
Andrew Clark
273dc550a4
Fixed #20462 -- null/non-string regex lookups are now consistent
...
Thanks to noirbizarre for the report and initial patch.
2013-06-26 08:13:26 -04:00
Baptiste Mispelon
ec371ace00
Fixed #20650 -- Fixed {% filter %} incorrectly accepting 'escape' as argument
...
Thanks to grzesiof for the report and to loic84 and Alex Gaynor
for the review.
2013-06-25 20:28:35 +02:00
Javier Mansilla
f819bef3dc
Fixed #19773 - Added admin/popup_response.html template.
...
Thanks jimmylam@ for the suggestion.
2013-06-25 11:20:41 -04:00
Russell Keith-Magee
0346563939
Fixed #20653 -- Renamed checksetup management command.
...
This is to allow future compatibility with work that is ongoing in the 2013 GSoC.
2013-06-25 09:37:54 +08:00
Ramiro Morales
1559f84d8b
Fixed #20311 -- Make sure makemessages doesn't create duplicate Plural-Forms .po file headers.
...
Thanks naktinis for the report and initial patch.
2013-06-22 18:45:41 -03:00
Andrew Godwin
e2d7e83256
Autodetect ForeignKeys and add dependencies/split on circulars
2013-06-22 17:15:51 +01:00
Gilberto Gonçalves
680b512fc1
Fixed #20587 -- Made convert_values handle None values
2013-06-22 14:05:12 +01:00
Gilberto Gonçalves
ef37b23050
Fixed #18872 -- Added prefix to FormMixin
...
Thanks @ibustama for the initial patch and dragonsnaker for opening the
report.
2013-06-22 12:12:43 +01:00
Claude Paroz
ef79582e86
Fixed 17478 -- Allowed queryset overriding in BaseModelFormSet init
...
BaseModelFormSet.forms is now a cached property instead of being
populated in the __init__ method. This behaviour also matches an
example in the documentation.
Thanks Thomasz Swiderski for the report and Simon Charette for the
review.
2013-06-22 09:29:37 +02:00
Oliver Beattie
552a90b444
Fixed #20290 -- Allow override_settings to be nested
...
Refactored override_settings to store the underlying settings._wrapped
value seen at runtime, not instantiation time.
2013-06-21 16:57:47 +02:00
Andrew Godwin
cca40703df
Prompt about renames rather than doing them automatically
2013-06-21 15:32:15 +01:00
Andrew Godwin
92a10f5552
Autodetect field renames. HAHAHA. AHAHAHAHA. YES.
2013-06-20 16:02:43 +01:00
Simon Charette
04628e2016
Fixed #20630 -- Removed `maxlength` attribute from `NumberInput`.
...
This attribute is only allowed on inputs of type "text", "search", "url",
"tel", "email", or "password".
Thanks to yoyoma for the report and @bmispelon for the review.
2013-06-20 10:59:41 -04:00
Andrew Godwin
47e4b86ddf
Autodetect field alters
2013-06-20 15:19:30 +01:00
Andrew Godwin
80bdf68d6b
Add AlterField and RenameField operations
2013-06-20 15:12:59 +01:00
Andrew Godwin
6f667999e1
Add operation that renames tables
2013-06-20 14:54:11 +01:00
Russell Keith-Magee
18e79f1425
Fixed #20486 -- Ensure that file_move_safe raises an error if the destination already exists.
...
Thanks to kux for the report, and Russ Webber for the patch.
2013-06-20 18:55:27 +08:00
Andrew Godwin
ab5cbae9b7
First stab at some migration creation commands
2013-06-19 15:36:22 +01:00
Andrew Godwin
2ae8a8a77d
Fix test running with new apps stuff/migrate actually running migrations
2013-06-19 15:36:02 +01:00
Andrew Godwin
9daf81b94e
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/models/loading.py
2013-06-19 12:05:23 +01:00
Aymeric Augustin
d9a43545be
Merge pull request #1282 from loic/ticket6903
...
Fixed failing test on MySQL since c86a9b6
2013-06-19 03:04:04 -07:00
Loic Bistuer
7d0c3b9b26
Fixed MySQL failing test introduced by c86a9b6
2013-06-19 16:13:43 +07:00
Florian Hahn
2f35c6f10f
Fixed #14930 -- values_list() failure on qs ordered by extra column
...
Thanks lsaffre for the report and simon29, vicould, and Florian Hahn
for the patch.
Some changes done by committer.
2013-06-18 23:56:51 +03:00
Aymeric Augustin
9da9b3eb04
Merge pull request #1281 from loic/ticket6903
...
Fixed #6903 - Preserved admin changelist filters.
2013-06-18 13:07:28 -07:00
Loic Bistuer
c86a9b6398
Fixed #6903 - Preserve admin changelist filters after saving or deleting an object
2013-06-19 02:41:36 +07:00
Erik Romijn
aeb1389442
Fixed #20079 -- Improve security of password reset tokens
2013-06-18 20:02:00 +02:00
Baptiste Mispelon
3128f3d38d
Fixed #20618 -- Fixed regression in `BoundField.label_tag`.
2013-06-18 17:49:53 +02:00
Loic Bistuer
ee77d4b253
Fixed #20199 -- Allow ModelForm fields to override error_messages from model fields
2013-06-18 08:01:17 -04:00
Loic Bistuer
f34cfec0fa
Refactored ValidationError to allow persisting error params and error codes as the exception bubbles up
2013-06-18 08:01:17 -04:00
Baptiste Mispelon
1b7634a0d0
Fixed #20464 -- Added a `total_error_count` method on formsets.
...
Thanks to frog32 for the report and to Tim Graham for the review.
2013-06-16 15:49:30 -04:00
Aymeric Augustin
c3df866619
Fixed #20603 -- Made the test suite faster.
...
By avoiding to run syncdb with the full set of test models.
Thanks Anssi for the idea.
2013-06-14 23:16:15 +02:00
Marc Tamlyn
46789e76c6
Fixed #20548 -- Removed all PendingDeprecationWarnings from django test suite
2013-06-14 15:37:39 +01:00
Anssi Kääriäinen
5459795ef2
Fixed #20289 -- pickling of dynamic models
2013-06-14 17:05:54 +03:00
Anssi Kääriäinen
855d1305c5
Added cache to available_apps in cache tests
2013-06-14 17:05:54 +03:00
Anssi Kääriäinen
89bf7a4525
Fixed #20528 -- regression in select_related join promotion
...
The join used by select_related was incorrectly INNER when the query
had an ORed filter for nullable join that was trimmed away. Fixed this
by forcing the join type to LOUTER even when a join was trimmed away
in ORed queries.
2013-06-14 16:29:06 +03:00
Marc Tamlyn
b7bd7087e6
Fixed #15273 -- Extend RedirectView to allow reversal by name.
...
Thanks to @DrMeers for the report and @ludwigkraatz for the initial patch.
2013-06-14 11:59:26 +01:00
Wilfred Hughes
8365ed08b8
Fixed #17076 -- When reversing a URL fails, inform the user which patterns were tried.
2013-06-14 10:26:30 +01:00
Daniel Lindsley
91f317c76d
Added a ``checksetup`` management command for verifying Django compatibility.
2013-06-13 18:39:02 -07:00
Loic Bistuer
9e50833e22
Fixed #20000 -- Allowed ModelForm meta overrides for label, help_text and error_messages
2013-06-13 15:06:25 -04:00
Baptiste Mispelon
dc9c359546
Fixed #20594 -- Add validation to models.SlugField.
...
Thanks carbonXT for the report.
2013-06-13 13:31:57 -04:00
Tim Graham
92c49d6f01
Revert "Fixed #20462 - Fixed sqlite regex lookups for null values and non-string fields."
...
This reverts commit 64041f0e6e
.
lookup.tests.LookupTests.test_regex_non_string fails under Postgres.
We should also try to rewrite the test using an existing model.
2013-06-11 17:55:19 -04:00
Axel Haustant
64041f0e6e
Fixed #20462 - Fixed sqlite regex lookups for null values and non-string fields.
2013-06-11 14:13:40 -04:00
Gabe Jackson
584bd14dcf
Fixed #18134 -- BoundField.label_tag now includes the form's label_suffix
...
There was an inconsistency between how the label_tag for forms were
generated depending on which method was used: as_p, as_ul and as_table
contained code to append the label_suffix where as label_tag called on a
form field directly did NOT append the label_suffix. The code for
appending the label_suffix has been moved in to the label_tag code of
the field and the HTML generation code for as_p, as_ul and as_table now
calls this code as well.
This is a backwards incompatible change because users who have added the
label_suffix manually in their templates may now get double label_suffix
characters in their forms.
2013-06-10 14:23:15 -04:00
Florian Apolloner
af70dfcf31
Reverted the introduction of shared_models.
...
The recent improvements should make shared_models obsolete.
This reverts commit 1059da8de6
, reversing
changes made to 4fa7f3cdd9
.
2013-06-10 12:34:47 +02:00