Commit Graph

9822 Commits

Author SHA1 Message Date
Aymeric Augustin 4292097078 Updated the bundled version of six to 1.4.0. 2013-09-02 12:07:03 +02:00
Ramiro Morales 17d898dedd Remove usage of deprecated module_name model option introduced in 1c0c879be3. 2013-09-01 09:58:33 -03:00
Loic Bistuer ff9e116198 Fixed #21008 -- Made MigrationWriter handle Promise objects. 2013-08-31 20:26:44 -04:00
Claude Paroz 1c0c879be3 Fixed #17074 -- Improved first field detection in admin add form
Thanks Kidwind for the report and Julien Phalip for the initial
patch.
2013-08-31 21:19:22 +02:00
Ramiro Morales 92a710cd03 Updated Selenium-based tests after e909ceae9b. 2013-08-31 12:14:52 -03:00
Ramiro Morales e909ceae9b Made django.test.testcases not depend on staticfiles contrib app.
Do this by introducing a django.contrib.staticfiles.testing.StaticLiveServerCase
unittest TestCase subclass.

Fixes #20739.
2013-08-31 11:02:32 -03:00
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
Simon Charette 11cd7388f7 Fixed #20989 -- Removed useless explicit list comprehensions. 2013-08-30 10:57:51 -04:00
Claude Paroz e4a67fd906 Set 'bidi' Urdu property to True
Refs #20454.
2013-08-30 12:03:39 +02: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
Anssi Kääriäinen 13be3bfef1 Removed stale add_q() comment 2013-08-30 09:45:32 +03:00
Tomer Chachamu 50d25a9c5a Added SplitHiddenDateTimeWidget to django.forms.widgets.__all__ 2013-08-29 14:22:04 -04:00
Tim Graham c7d0ff0cad Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()
Thanks jeroen.pulles at redslider.net for the suggestion and
helper script.
2013-08-29 12:11:03 -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
Claude Paroz 169637649b Fixed #20984 -- Stopped decoding bytes in sqlite3 adapter on Python 3
Thanks lvella at gmail.com for the report.
2013-08-29 08:39:06 +02:00
Tim Graham 12023887ea Fixed #14765 -- Removed unncessary usage of NodeList in ForNode.
Thanks traff and FunkyBob for work on the patch.
2013-08-28 09:48:47 -04: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
Michał Górny b89c2a5d9e Fixed #18171 -- Checked signature of authenticate() to avoid supressing TypeErrors.
The current auth backend code catches TypeError to detect backends that
do not support specified argumetnts. As a result, any TypeErrors raised
within the actual backend code are silenced.

In Python 2.7+ and 3.2+ this can be avoided by using inspect.getcallargs().
With this method, we can test whether arguments match the signature without
actually calling the function.

Thanks David Eyk for the report.
2013-08-28 07:51:45 -04: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
Erik Romijn fa57266699 Fixed #20972 -- Make messages cookie follow session cookie secure/httponly 2013-08-26 21:34:29 +02:00
Ramiro Morales b785a80d19 Added further fixes, tests for #19949/f33db5a09a.
Thanks Susan Tan. Refs #19949.
2013-08-26 08:47:24 -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
Andrew Godwin 35230adf63 Python 3 compat fix for callable() 2013-08-23 17:59:35 +01:00
Andrew Godwin 2787de652a Fix location of tablespace clauses in schema backend column SQL 2013-08-23 14:38:55 +01: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 9cc6cfc405 Fix Oracle's default handling and schema-prepared-statement issue 2013-08-23 12:07:55 +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
Tim Graham 768bbf3efe Revert "Fixed #20956 -- Removed useless check in django.db.utils"
This reverts commit ce0e86cf76.

The check is necessary if 'ENGINE' is an empty string.
Thanks apollo13 for pointing this out.
2013-08-22 09:47:17 -04:00
Dima Kurguzov ce0e86cf76 Fixed #20956 -- Removed useless check in django.db.utils 2013-08-22 08:53:14 -04:00
Claude Paroz 8cd8742981 Moved translator comment just above the target string 2013-08-22 09:52:54 +02: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
Andrew Godwin beefac8aae Only create the migration directory once per app 2013-08-21 22:32:05 +01:00
Tim Graham 2d903929a7 Fixed #20949 -- Typo #2 in docstring 2013-08-21 22:32:05 +01:00
Tim Graham cb5c0bec14 Fixed docstring typo, thanks minddust. 2013-08-21 22:32:04 +01: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 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
Simon Charette 1db5fce1ee Oracle also treats NULLs as largests values when ordering. 2013-08-21 22:32:03 +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
Simon Charette 63378163f9 Fixed #20943 -- Weakly reference senders when caching their associated receivers 2013-08-21 22:30:45 +01:00
Simon Charette eadecf0cdb Avoid importing the deprecated `django.utils.importlib` package. 2013-08-21 22:30:02 +01:00
Simon Charette e9b703f5a5 Correctly format missing Pillow/PIL exceptions messages. refs #19934 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 0073f1d94f Fixed #20949 -- Typo #2 in docstring 2013-08-21 10:50:08 -04:00
Tim Graham d3ed15b79d Fixed docstring typo, thanks minddust. 2013-08-21 09:01:52 -04: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 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
Simon Charette 859e678b3d Oracle also treats NULLs as largests values when ordering. 2013-08-20 12:28:59 -04: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
Simon Charette e55ca60903 Fixed #20943 -- Weakly reference senders when caching their associated receivers 2013-08-20 01:53:58 -04:00
Simon Charette ac0e41e2c4 Avoid importing the deprecated `django.utils.importlib` package. 2013-08-19 19:42:53 -04:00
Simon Charette b9590a6935 Correctly format missing Pillow/PIL exceptions messages. refs #19934 2013-08-19 18:42:48 -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 ddeb20e31b Fixed GIS regression caused by force_subq
Caused by commit 7737305a4f
2013-08-19 16:35:11 +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
Andrew Godwin 5b522cd85a Minor oracle fixes 2013-08-19 13:12:48 +01: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 4090982617 Some code simplification 2013-08-18 09:43:41 -07: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
Nick Bruun 7a698c05b5 Update LazyObject method proxy declarations to simpler form. 2013-08-18 15:58:55 +02:00
Harm Geerts 240886183b Fixed #20829 -- Skip postgis metadata tables with introspection 2013-08-16 21:14:29 +02: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
SusanTan 71c491972e Fixed #11400 -- Passed kwargs from AbstractUser.email_user() to send_mail()
Thanks Jug_ for suggestion, john_scott for the initial patch,
and Tim Graham for code review.
2013-08-14 07:46:11 -04:00
Krzysztof Jurewicz 4eeb8ec147 Fixed #20864 -- Made the test client use common method for performing requests. 2013-08-13 19:08:13 -04: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
Jacob Kaplan-Moss ae3535169a Fixed is_safe_url() to reject URLs that use a scheme other than HTTP/S.
This is a security fix; disclosure to follow shortly.
2013-08-13 11:06:22 -05:00
Tim Graham 737b53ab9a Merge pull request #1470 from loic/admin.actionlist
Fixed overflow for the "Recent Actions" widget on the admin index.
2013-08-13 05:11:39 -07:00
Loic Bistuer 163a34ce4b Fixed #20883 -- Made model inheritance find parent links in abstract parents 2013-08-13 15:14:11 +03:00
Loic Bistuer 33fc083b0d Fixed overflow for the "Recent Actions" widget on the admin index.
Previously the CSS targeted "li.changelink" and therefore didn't
work for the "add" and "delete" actions.

Refs #14868.
2013-08-13 18:20:12 +07: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
Andrew Godwin 44f907dd98 Start of getting Oracle to do schema stuff 2013-08-12 20:05:20 +01: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
Andrew Godwin 841b7af812 Use DEFAULT_DB_ALIAS 2013-08-12 16:40:41 +01: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 b4c493ecd3 Remove keep_default from add_field 2013-08-11 14:28:55 +01:00
Andrew Godwin d985fd7a18 Fix tablespace command 2013-08-11 14:27:42 +01:00
Andrew Godwin ae19315b4d Support index_together during model creation 2013-08-11 14:23:31 +01:00
Andrew Godwin 21be9fef7b Stop being overcautious about Field.rel 2013-08-11 00:01:30 +01:00
Andrew Godwin 7702819441 Update get_constraints with better comments 2013-08-10 23:58:12 +01:00
Andrew Godwin d5a7a3d6a8 Add clarifying comment 2013-08-10 21:04:59 +01:00
Andrew Godwin 3f1f91f155 Print all bad apps passed to makemigrations, not just the first one. 2013-08-10 20:02:55 +01:00
Andrew Godwin 7970d97a70 Docs tweaks (thanks timgraham) 2013-08-10 20:00:12 +01:00
Andrew Godwin 3c3d308ea3 Back SortedSet onto OrderedDict, rename it, and a few typo fixes 2013-08-10 19:50:06 +01:00
ersran9 00d23a13eb Fixed #20828 -- Allowed @permission_required to take a list of permissions
Thanks Giggaflop for the suggestion.
2013-08-10 10:10:18 -04:00
Tim Graham db0779dbe1 Merge pull request #1447 from evansd/patch-1
Use `usegmt` flag in formatdate
2013-08-09 12:18:56 -07:00
Andrew Godwin f093646bfc Remove pointless comment. 2013-08-09 17:47:13 +01:00
Andrew Godwin 9b4a789eef Add [y/n] to autodetector questions and allow for default value 2013-08-09 17:45:19 +01:00
Andrew Godwin ae96ad872f Remove pointless fetch_results param 2013-08-09 17:42:56 +01:00
Andrew Godwin fb16ee5a31 Remove commented-out print 2013-08-09 17:41:39 +01:00
Andrew Godwin b3cec920a2 Remove other color_style override 2013-08-09 17:39:07 +01:00
Andrew Godwin 9f73629420 utils.importlib is deprecated 2013-08-09 17:36:16 +01:00
Andrew Godwin 679627660f Remove useless override of self.style 2013-08-09 17:34:35 +01: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
Tim Graham 453915bb12 SQLite test fix -- refs #9057 2013-08-09 10:57:25 -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
Tim Graham ddae74b64c Fixed #9057 -- Added default_permissions model meta option.
Thanks hvendelbo for the suggestion and koenb for the draft patch.
2013-08-09 09:19:52 -04: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
SusanTan 2ac89012d8 Fixed #12288 -- Added unique validation for INSTALLED_APPS 2013-08-09 08:08:34 -04:00
Loic Bistuer f8a6a4eba1 Improved queryset handling and docs for (Single|Multiple)ObjectMixin. 2013-08-09 17:51:58 +07: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
David Evans 8a160d5de1 Use `usegmt` flag in formatdate
Slightly cleaner and faster than string manipulation.
 
This flag has been available since Python 2.4:
http://docs.python.org/2/library/email.util.html#email.utils.formatdate
2013-08-07 12:00:39 +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
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
Justin Michalicek 6d88d47be6 Fixed #20832 -- Enabled HTML password reset email
Added optional html_email_template_name parameter to password_reset view
and PasswordResetForm.
2013-08-05 09:47:28 -04:00
Alex Gaynor 3e0eb2d788 Fixed a number of lint warnings, particularly around unused variables. 2013-08-04 09:17:10 -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
Tim Graham 59f58bf731 Merge pull request #1432 from loic/modeladmin.get_search_results
Moved get_search_results from BaseModelAdmin to ModelAdmin.
2013-08-04 04:17:34 -07:00
Curtis Maloney 07876cf02b Deprecated SortedDict (replaced with collections.OrderedDict)
Thanks Loic Bistuer for the review.
2013-08-04 07:09:39 -04:00
Loic Bistuer 470a9bb22d Moved get_search_results from BaseModelAdmin to ModelAdmin.
Refs #15961.
2013-08-04 17:18:17 +07: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
Tim Graham 425d076d0c Fixed #18923 -- Corrected usage of sensitive_post_parameters in contrib.auth
Thanks Collin Anderson for the report.
2013-08-02 14:46:17 -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
Harm Geerts fd0d486467 Fixed #20838 -- Fixed Geodjango spatialrefsys test failure with postgis-2.0.3 2013-08-02 09:26:53 -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
Tim Graham 5df84b268d Removed unused model option "admin" 2013-08-01 10:27:30 -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
Tim Graham a1889397a9 Fixed #12103 -- Added AuthenticationForm.confirm_login_allowed to allow customizing the logic policy.
Thanks ejucovy and lasko for work on the patch.
2013-07-31 13:54:05 -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 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
Julian Bez 8f5533ab25 Fixed #20793 -- Added Last-Modified header to sitemaps. 2013-07-31 07:42:30 -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
Gavin Wahl 5154c9f92c Fixed #20806 -- Cached loader caches find_template
The cached template loader should cache find_template in addition to
load_template.
2013-07-30 14:25:30 -04: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
MinRK 75cf5fc7f0 Added support for IPython.start_ipython in shell
IPython 1.0 introduces an actual stable public API function
for starting a normal (non-embedded) IPython session.

This is an official public API, which is promised to survive implementation changes.
2013-07-30 10:22:41 -07:00
Kirill Zaitsev dafec05548 Updated flatpages tests to override CSRF_FAILURE_VIEW. 2013-07-30 13:04:30 -04:00
Aymeric Augustin 5b47a9c5a0 Fixed a test that could fail depending on PASSWORD_HASHERS.
Thanks Claude. Refs #20760.
2013-07-30 16:14:53 +02: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
Andrew Godwin 68e0a169c4 Rename pre_ and post_syncdb to *_migrate, with aliases from old names 2013-07-30 11:52:52 +01:00
Julien Phalip 53e9ab72e9 Updated some minified admin javascript files. 2013-07-30 00:21:33 -07: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
Shai Berger 6ed579e7eb Fixed #20785 -- Corrected exception caught for Oracle LIKE operator detection
The code that tests to see which LIKE expressions to use now runs
using non-error-wrapped cursor, so cx_Oracle exceptions need to be caught
rather than Django DatabaseErrors.

Thanks Trac user ludo for report and initial patch.
2013-07-30 03:21:06 +03: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
Tim Graham 402b4a7a20 Fixed #14850 -- Cleaned up duplicate code in admin formset handling.
Thanks apollo13 for the report and review.
2013-07-29 12:37:43 -04: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
Serge G. Spaolonzi e07e4030b9 Fixed #18511 -- Cleaned up admin password reset template titles. 2013-07-27 14:23:04 -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
Andrew Godwin c8cbdabfab Fix Python 3 support 2013-07-26 17:08:12 +01:00
Andrew Godwin d5ca169334 Fix "OK" alignment in migrate output 2013-07-26 16:52:17 +01:00
Andrew Godwin 52643a69e3 Add --fake option to migrate 2013-07-26 16:47:00 +01:00
Andrew Godwin 3f7113f1d9 Fix timezone warnings if USE_TZ=True 2013-07-26 16:46:48 +01:00
Andrew Godwin 9c6d57ef5a Prettier imports 2013-07-26 16:40:27 +01:00
Andrew Godwin c1ed21fa9e Use new transaction API in syncdb section of migrate 2013-07-26 16:39:44 +01:00
Andrew Godwin 6b39010d57 Remove nasty error message checking hack 2013-07-26 16:33:32 +01: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
Tim Graham 9b88dd3809 Fixed #20679 -- Corrected CachedFilesMixin.post_process docstring.
Thanks bmispelon for the report.
2013-07-25 12:31:53 -04: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
Tim Graham bd0dcc6c89 Fixed #20766 -- Deprecated FastCGI support. 2013-07-24 13:41:45 -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
ersran9 311c1d2848 Fixed #20761 -- Reworded ForeignKey default error message 2013-07-23 22:16:31 +02:00
Tim Graham ad98b985aa Fixed test failures introduced in e716518ad2
refs #20761
2013-07-23 15:21:29 -04:00
Pedro Mourelle fb052b528a Fixed #19900 -- Updated admin buttons to use CSS3 rounded corners. 2013-07-23 11:28:22 -04:00
Aymeric Augustin 5dbca13f3b Fixed #20760 -- Reduced timing variation in ModelBackend.
Thanks jpaglier and erikr.
2013-07-23 15:43:12 +02:00
Loic Bistuer e716518ad2 Fixed #20761 -- Fixed DatabaseError handling in get_or_create and update_or_create. 2013-07-23 09:20:43 -04:00
Kirill Fomichev 33242fe015 Fixed #19019 -- Fixed UserAdmin to log password change.
Thanks Tuttle for the report.
2013-07-23 08:33:07 -04:00
Anssi Kääriäinen 6b4967e883 Minor change to get_extra_descriptor_filter()
Refs #20611.
2013-07-23 15:34:29 +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 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
Marc Tamlyn 29a09b3638 Merge pull request #1390 from garnertb/master
Fixed small grammatical error in docstring.
2013-07-22 07:34:30 -07:00
Tyler Garner 8e98652416 Fixed small grammatical error in docstring. 2013-07-22 10:32:09 -04:00
Claude Paroz 27c1a72576 Fixed #20773 -- [gis] Fixed regression in GoogleMap output
Thanks Martyn Clement for the report and the initial patch.
2013-07-22 09:55:45 +02: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
Loic Bistuer 3a00229189 Cleaned up UserAdmin.get_form() that worked around a bug fixed in 23e1b59.
Refs #18681.
2013-07-18 23:59:45 +07: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 828359e52d Couple of cleanups in RelatedObjectLookups.js
Thanks George Karpenkov.
2013-07-17 09:32:14 -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
Claude Paroz 7557207983 Fixed #20582 -- Allowed default Form.label_suffix to be translated
Thanks Tim Graham for the review.
2013-07-13 16:19:16 +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
Christopher Medrela b4c61c2665 Added clarification comments to django.utils.image; refs #19934 2013-07-12 12:38:00 +02: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
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
Claude Paroz 6157192b6e Added a test for the envelope() GeoQuerySet method
Refs #20718.
2013-07-09 20:37:01 +02:00
Claude Paroz b96f3043a6 Simplified testing connection type 2013-07-09 19:47:57 +02:00
Claude Paroz 550b6195ed Made an aggregate test pass with spatialite backend
backends.tests.SqliteAggregationTests was failing with spatialite.
2013-07-09 19:47:57 +02:00
Tim Graham 3c736207a3 Fixed #20722 -- Fixed MemcachedCache backend get_many on Python 3. 2013-07-09 11:55:45 -04: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
Claude Paroz 74bc63b109 Isolate geoapp test from sitemaps app being installed or not 2013-07-09 15:14:11 +02:00
Claude Paroz 57815e2630 Partial revert of commit 2bf403ecbd
Homework: write 100 times geoapp is not geogapp.
2013-07-09 13:13:43 +02:00
Tim Graham 95eb68c98f Fixed #17339 -- Factor out has_result into database backend.
Thanks jonash.
2013-07-09 06:41:52 -04:00
Shai Berger c0a4894dca Fixed last_executed_query test failure on Oracle 2013-07-08 23:47:02 +03: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
Claude Paroz 9383e37a76 Completed some more name_local names 2013-07-08 12:03:26 +02:00
Mathias Andre 8c18f6f61c Fixed #20716 --Missing 'name_local' translation
Added 'name_local' translation for Albanian in LANG_INFO
2013-07-08 11:57:28 +02:00
Alex Gaynor 6bdc47f75c Use a more explicit check for whether these ids are None. 2013-07-08 12:44:17 +10:00
Alex Gaynor 43073dbd76 fixed a mis-importt in mysql/base.py 2013-07-08 11:18:06 +10:00
Alex Gaynor 03d9566e0d A large number of stylistic cleanups across django/db/ 2013-07-08 10:39:54 +10:00
Alex Gaynor 0b69a75502 Fixed a bug I introduced in my previosu ommit. 2013-07-08 10:32:04 +10:00
Alex Gaynor df3d7e66da Replaced some dicts with sets. 2013-07-08 09:48:56 +10:00
Alex Gaynor 5ac7f777cd Merge pull request #991 from stockr-labs/feature/email-backends-generators
Fixed #20194 -- Adds generators support for email backends that do not support it.
2013-07-07 16:43:24 -07: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
Alex Gaynor db2727f952 A few cleanups to capture the minimum amount of code in try/except blocks. 2013-07-08 09:26:52 +10:00
Alex Gaynor 126250a4c4 Merge branch 'ticket_20613' of https://github.com/ersran9/django into t20613 2013-07-08 09:23:59 +10:00
Alex Gaynor c8c22ccdcb Removed some logic that wasn't needed following removal of some deprecated code. 2013-07-08 08:49:58 +10:00
SusanTan d63327d843 Fixed #20711 -- Fixed broken link in timesince.py docstring 2013-07-07 12:40:05 -04:00
Claude Paroz c94093c5ba [gis] Dropped official support for GDAL < 1.6 2013-07-06 17:25:46 +02:00
Claude Paroz 4367c637d6 Tweaked proj string regex in gis tests 2013-07-06 14:26:28 +02:00
ersran9 76ee39ce14 Fixed 20613 - moved pickle loads/dumps outside with self._lock.reader()/writer() blocks
Additionaly added pickled=None initially and check for none before
returning in get
2013-07-06 02:09:52 +05:30
Claude Paroz 1116df0751 Deprecate usage of boolean value for widget attributes
Django 1.7 will loudly warn when widget attributes are assigned
boolean values. In Django 1.8, False will mean attribute is not
present while True will mean attribute present without value.
Refs #20684.
2013-07-05 19:33:19 +02:00
Claude Paroz 7442eb1a24 Fixed #20224 -- Update docs examples which mention __unicode__
Thanks Marc Tamlyn and Tim Graham for the review.
2013-07-05 19:27:07 +02: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
Tim Graham f407f75aae Fixed #20673 -- Clarified that HttpRequest.user uses AUTH_USER_MODEL.
Thanks littlepig for the report.
2013-07-04 09:32:32 -04:00
Simon Charette 8759778185 Fixed #20675 -- `check_password` should work when no password is specified.
The regression was introduced by 2c4fe761a. refs #20593.
2013-07-03 14:09:58 -04:00
Tomáš Ehrlich c5bc98d7e1 Fixed #20687 -- Added documentation for django.core.signing API.
Thanks Baptiste Mispelon for the suggestion.
2013-07-03 10:36:21 -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 dbd3e775c1 Fix get_constraints to do multi-column indexes properly on pg 2013-07-02 12:06:00 +01:00
Andrew Godwin f343cbf06c Fix combined alters on PostgreSQL 2013-07-02 11:51:18 +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 b1e0ec06f0 Merge branch 'master' into schema-alteration 2013-07-02 10:49:53 +01:00
Aymeric Augustin 6c66a41c3d Relied on NullHandler from the logging stdlib module. 2013-07-01 23:16:25 +02:00
Aymeric Augustin 72c65fea41 Deprecated django.utils.dictconfig.
The module still exists for whoever uses it in its current state, but it
isn't imported by Django anywhere.
2013-07-01 22:50:58 +02: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 09b446dfe8 This doesn't need to be a package any more.
Refs #20680.
2013-07-01 22:46:35 +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 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 7f264e02f4 Fixed #20680 -- Deprecated django.utils.unittest.
Refs #19204.
2013-07-01 14:29:33 +02:00
Aymeric Augustin d5589b4cd3 Removed some conditional code only needed under Python 2.6. 2013-07-01 12:02:17 +02:00
Alex Gaynor b9ebca6a28 Removed a comment that wasn't adding a value.
In the intervening years, RelatedField has become less of a hack (though it still is one). Anyone who wants to can re-instate the comment, but please add more details.
2013-06-30 23:32:23 -07:00
Aymeric Augustin dd9c6bc359 Introduced getters for connection.autocommit and .needs_rollback.
They ensure that the attributes aren't accessed in conditions where they
don't contain a valid value.

Fixed #20666.
2013-06-30 15:57:00 +02:00
Matt Robenolt 5ff2ffa330 Define the SessionStore inside __init__ instead of process_request
It's unnecessary to run this on every request, since technically, settings *should be* immutable.
2013-06-30 09:43:02 +02:00
Ramiro Morales 64cdea68e7 Report wrongly-typed settings and abort, as originally planned.
Thanks Claude for the heads up. Refs #12493 and commit 5e08b792.
2013-06-29 18:19:20 -03:00
Ramiro Morales 5e3a6532aa Merge pull request #1316 from ramiro/int_pk_pwd_reset 2013-06-29 14:02:08 -07:00
Tim Graham 3fd0ee5b46 Fixed #20677 - Typos in generic_inlineformset_factory docs.
Thanks Riley Strong for the report.
2013-06-29 14:14:32 -04: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