Commit Graph

6329 Commits

Author SHA1 Message Date
Claude Paroz be0ad62994 Fixed #21911 -- Made admin views redirect to login when needed
Historically, the Django admin used to pass through the request
from an unauthorized access to the login view directly. Now we
are using a proper redirection, which is also preventing
inadvertantly changing data when POSTing login data to an admin
view when user is already authorized.
Thanks Marc Tamlyn and Tim Graham for the reviews.
2014-02-04 20:02:28 +01:00
Tim Graham 867f8fd6c7 Made some PEP8 fixes in docs/ref/forms/widgets.txt
Thanks Siecje.
2014-02-04 06:24:13 -05:00
Tim Graham d4a5019bef Reordered deprecation timeline and added back old info; refs #21920. 2014-02-03 08:32:32 -05:00
Aymeric Augustin ab2f21080d Added a note about a possible name clash.
Thanks Russell for the advice.
2014-02-02 15:31:34 +01:00
Aymeric Augustin b5fbdf97db Fixed typo. 2014-02-02 15:16:55 +01:00
Ian Foote af64f829d7 Fix typo CRSF -> CSRF 2014-01-29 16:54:02 +00:00
Andrew Godwin 5dc4a8652c Add an extra warning about custom save methods in migrations docs. 2014-01-28 14:10:40 +00:00
Carl Meyer 88a2d39159 Fixed #21874 -- Require Django applications to have a filesystem path.
Wherever possible this filesystem path is derived automatically from the app
module's ``__path__`` and ``__file__`` attributes (this avoids any
backwards-compatibility problems).

AppConfig allows specifying an app's filesystem location explicitly, which
overrides all autodetection based on ``__path__`` and ``__file__``. This
permits Django to support any type of module as an app (namespace packages,
fake modules, modules loaded by other hypothetical non-filesystem module
loaders), as long as the app is configured with an explicit filesystem path.

Thanks Aymeric for review and discussion.
2014-01-27 15:34:22 -07:00
Tim Graham dfa28981ce Added release note stubs for 1.5.6 and 1.4.11. 2014-01-26 17:48:28 -05:00
Tim Graham 2cbe1e28fb Added missing items to 1.6.2 release notes. 2014-01-26 15:40:14 -05:00
Simon Charette 10e3faf191 Fixed #19774 -- Deprecated the contenttypes.generic module.
It contained models, forms and admin objects causing undesirable
import side effects. Refs #16368.

Thanks to Ramiro, Carl and Loïc for the review.
2014-01-26 14:42:30 -05:00
Aymeric Augustin 3c47786cb9 Fixed #21702 -- get_model('app_label.ModelName').
Also added tests for get_model.
2014-01-26 13:01:09 +01:00
Aymeric Augustin 8e1fc03491 Fixed typo. Refs #21836. 2014-01-26 09:30:10 +01:00
Aymeric Augustin 9ffab9cee1 Moved RequestSite and get_current_site.
Following the app-loading refactor, these objects must live outside of
django.contrib.sites.models because they must be available without
importing the django.contrib.sites.models module when
django.contrib.sites isn't installed.

Refs #21680. Thanks Carl and Loic for reporting this issue.
2014-01-26 08:50:47 +01:00
Carl Meyer 8bc3780b67 Docs correction: apps loaded from eggs do not have appconfig.path None. 2014-01-25 20:56:36 -07:00
Carl Meyer 966b186981 Fixed #17304 -- Allow single-path and configured-path namespace packages as apps.
Also document the conditions under which a namespace package may or may not be
a Django app, and raise a clearer error message in those cases where it may not
be.

Thanks Aymeric for review and consultation.
2014-01-25 19:37:05 -07:00
Chris Jerdonek 798fd59fad Fixed #21836 -- Improved transaction docs about autocommit mode
Clarified that queries in autocommit mode are committed immediately
only if a transaction has not already been started. Added to the
main transaction docs that Django's TestCase class implicitly wraps
its tests in transactions.
2014-01-25 21:20:17 +01:00
Aymeric Augustin 2ff93e027c Fixed #21829 -- Added default AppConfigs.
Thanks Russell for the report, Marc for the initial patch, Carl for the
final review, and everyone who contributed to the design discussion.
2014-01-25 10:41:56 +01:00
Tim Graham e1d18b9d2e Fixed #21869 -- Fixed docs building with Sphinx 1.2.1.
Thanks tragiclifestories for the report.
2014-01-24 08:52:43 -05:00
James Turley 4d8209431d Fixed #21824 -- Added reference to LTS in docs/internals/security.txt 2014-01-24 08:13:17 -05:00
Marc Tamlyn 16f3a6a4c7 Fixed #21865 -- Incorrect signs in documented example.
Maths is hard.
2014-01-23 20:32:24 +00:00
Marc Tamlyn d7aa0bd802 We should branch after the first beta.
We did this for 1.6 and it was very effective. 95%+ of fixes which merge
during the alpha are backported, as the policy is "all but really major
features". It's easier to just not merge any really major features.
After beta, we have feature freeze so we need to backport bugs to stable
but not features, so then the branch makes sense.
2014-01-23 20:07:14 +00:00
Tom Atkins 3b869b09d0 Fixed #21847 -- Clarified where ContactForm was defined 2014-01-23 13:48:09 -05:00
Baptiste Mispelon d7ce48f175 Fixed #21864 -- Fixed missing quote in custom lookup example.
Thanks to Chris Barna for the report.
2014-01-23 16:13:20 +01:00
Tim Graham 12303ab738 Fixed #21861 -- Fixed typo in 1.7 release notes.
Thanks marktranchant.
2014-01-23 09:29:09 -05:00
Tim Graham 81830ce34f Fixed some punctuation; thanks Chris Jerdonek. 2014-01-23 09:01:26 -05:00
Andrew Godwin b8c8241945 Add docs about converting from South 2014-01-23 11:45:25 +00:00
Baptiste Mispelon 05d36dc06e Always use parentheses when documenting a method with no arguments. 2014-01-22 22:26:10 +01:00
Baptiste Mispelon 79e1d6ebd7 Don't show `self` in the list of arguments of a method.
This is consistent with Python's official documentation
and it's a sphinx recommendation too[1].

[1] http://sphinx-doc.org/markup/desc.html#dir-method

Refs #21855.
2014-01-22 22:17:32 +01:00
Tim Graham 5f9790072d Fixed #20834 -- Described how caching of user permissions works.
Thanks Giggaflop and Jennifer Casavantes.
2014-01-22 13:08:51 -05:00
Tim Graham 4416aa1d3f Added a link to the 1.6 release notes which also fixed a rendering issue. 2014-01-22 11:04:44 -05:00
Tim Graham dfc092622e Fixed #21529 -- Noted that {% url %} encodes its output (refs #13260). 2014-01-22 10:44:50 -05:00
Tim Graham 6f06c749b7 Fixed #21726 -- Clarified that password should not be included in REQUIRED_FIELDS.
Thanks russellm for the report.
2014-01-22 10:17:44 -05:00
Tim Graham 03395b4277 Fixed some markup that caused broken links in the static files docs. 2014-01-22 10:15:27 -05:00
Jannis Leidel 8efd20f96d Added ManifestStaticFilesStorage to staticfiles contrib app.
It uses a static manifest file that is created when running
collectstatic in the JSON format.
2014-01-20 19:32:07 +01:00
Russell Keith-Magee e8920e96d0 Added a missing command to the command line examples for check.
Thanks to Bruno Renie for the report.
2014-01-20 20:46:21 +08:00
Russell Keith-Magee b0602e935c Corrected documentation typo.
Thanks to @cjerdonek for the report.
2014-01-20 19:48:06 +08:00
Russell Keith-Magee 9ddc358e8d Corrected minor typo.
Thanks to @cjerdonek for the report.
2014-01-20 13:13:16 +08:00
Russell Keith-Magee d818e0c9b2 Fixed #16905 -- Added extensible checks (nee validation) framework
This is the result of Christopher Medrela's 2013 Summer of Code project.

Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian
Apolloner, and Alex Gaynor for review notes along the way.

Also: Fixes #8579, fixes #3055, fixes #19844.
2014-01-20 10:45:21 +08:00
Tim Graham 6e7bd0b63b Fixed some admin sphinx definitions so links work properly. 2014-01-19 20:29:09 -05:00
Andrew Godwin 6bbb820014 Fixed #21290: Documented migration serializing and improved error 2014-01-19 19:27:30 +00:00
Andrew Godwin c9de1b4a55 Implement swappable model support for migrations 2014-01-19 16:43:12 +00:00
Tim Graham 5c7ac7494a Fixed #18907 -- Correct docs regard population of model backrefs.
Thanks simonpercivall for the report and Aymeric for the patch.
2014-01-19 09:35:59 -05:00
Aymeric Augustin 10e0cfc0e4 Fixed #21712 -- Moved autodiscover() to AdminConfig.ready().
Thanks Marc Tamlyn for the initial version of the patch.
2014-01-18 23:06:00 +01:00
Anssi Kääriäinen 4dc3be2506 Fixed typos spotted by Claude Paroz 2014-01-18 22:31:35 +02:00
Anssi Kääriäinen 20bab2cf9d Fixed #16187 -- refactored ORM lookup system
Allowed users to specify which lookups or transforms ("nested lookus")
are available for fields. The implementation is now class based.

Squashed commit of the following:

commit fa7a7195f1
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Jan 18 10:53:24 2014 +0200

    Added lookup registration API docs

commit eb1c8ce164
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Tue Jan 14 18:59:36 2014 +0200

    Release notes and other minor docs changes

commit 11501c29c9
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Jan 12 20:53:03 2014 +0200

    Forgot to add custom_lookups tests in prev commit

commit 83173b960e
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Jan 12 19:59:12 2014 +0200

    Renamed Extract -> Transform

commit 3b18d9f3a1
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Jan 12 19:51:53 2014 +0200

    Removed suggestion of temporary lookup registration from docs

commit 21d0c7631c
Merge: 2509006 f2dc442
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Jan 12 09:38:23 2014 -0800

    Merge pull request #2 from mjtamlyn/lookups_3

    Reworked custom lookups docs.

commit f2dc4429a1
Author: Marc Tamlyn <marc.tamlyn@gmail.com>
Date:   Sun Jan 12 13:15:05 2014 +0000

    Reworked custom lookups docs.

    Mostly just formatting and rewording, but also replaced the example
    using ``YearExtract`` to  use an example which is unlikely to ever be
    possible directly in the ORM.

commit 2509006506
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Jan 12 13:19:13 2014 +0200

    Removed unused import

commit 4fba5dfaa0
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Jan 11 22:34:41 2014 +0200

    Added docs to index

commit 6d53963f37
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Jan 11 22:10:24 2014 +0200

    Dead code removal

commit f9cc039007
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Jan 11 19:00:43 2014 +0200

    A new try for docs

commit 33aa18a6e3
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Jan 11 14:57:12 2014 +0200

    Renamed get_cols to get_group_by_cols

commit c7d5f8661b
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Jan 11 14:45:53 2014 +0200

    Altered query string customization for backends vendors

    The new way is trying to call first method 'as_' + connection.vendor.
    If that doesn't exist, then call as_sql().

    Also altered how lookup registration is done. There is now
    RegisterLookupMixin class that is used by Field, Extract and
    sql.Aggregate. This allows one to register lookups for extracts and
    aggregates in the same way lookup registration is done for fields.

commit 90e7004ec1
Merge: 66649ff f7c2c0a
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Jan 11 13:21:01 2014 +0200

    Merge branch 'master' into lookups_3

commit 66649ff891
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Jan 11 13:16:01 2014 +0200

    Some rewording in docs

commit 31b8faa627
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Dec 29 15:52:29 2013 +0200

    Cleanup based on review comments

commit 1016159f34
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Dec 28 18:37:04 2013 +0200

    Proof-of-concept fix for #16731

    Implemented only for SQLite and PostgreSQL, and only for startswith
    and istartswith lookups.

commit 193cd097ca
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Dec 28 17:57:58 2013 +0200

    Fixed #11722 -- iexact=F() produced invalid SQL

commit 08ed3c3b49
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Dec 21 23:59:52 2013 +0200

    Made Lookup and Extract available from django.db.models

commit b99c8d83c9
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Dec 21 23:06:29 2013 +0200

    Fixed review notes by Loic

commit 049eebc070
Merge: ed8fab7 b80a835
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Dec 21 22:53:10 2013 +0200

    Merge branch 'master' into lookups_3

    Conflicts:
    	django/db/models/fields/__init__.py
    	django/db/models/sql/compiler.py
    	django/db/models/sql/query.py
    	tests/null_queries/tests.py

commit ed8fab7fe8
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Dec 21 22:47:23 2013 +0200

    Made Extracts aware of full lookup path

commit 27a57b7aed
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Dec 1 21:10:11 2013 +0200

    Removed debugger import

commit 074e0f5aca
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Dec 1 21:02:16 2013 +0200

    GIS lookup support added

commit 760e28e72b
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Dec 1 20:04:31 2013 +0200

    Removed usage of Constraint, used Lookup instead

commit eac4776684
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Dec 1 02:22:30 2013 +0200

    Minor cleanup of Lookup API

commit 2adf50428d
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sun Dec 1 02:14:19 2013 +0200

    Added documentation, polished implementation

commit 32c04357a8
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Nov 30 23:10:15 2013 +0200

    Avoid OrderedDict creation on lookup aggregate check

commit 7c8b3a32cc
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Nov 30 23:04:34 2013 +0200

    Implemented nested lookups

    But there is no support of using lookups outside filtering yet.

commit 4d219d4cde
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Wed Nov 27 22:07:30 2013 +0200

    Initial implementation of custom lookups
2014-01-18 11:46:19 +02:00
Tim Graham b87c59b04b Removed some unnecessary __exact operators in filters. 2014-01-17 18:12:45 -05:00
Tim Graham bc7668eb51 Fixed #18942 -- Clarified usage of {% get_static_prefix %}.
Thanks Aymeric for the suggestion.
2014-01-17 16:06:11 -05:00
Tim Graham 4a5aac47a6 Fixed #13116 -- Described scope of variables created by {% url ... as var %} syntax.
Thanks leif_p for the suggestion.
2014-01-17 14:50:47 -05:00
Tim Graham a67e327db5 Fixed #20052 -- Discouraged use of Jython given the current state of django-jython.
Thanks Josh Juneau (maintainer of django-jython) for the review.
2014-01-17 09:21:34 -05:00