Commit Graph

2562 Commits

Author SHA1 Message Date
Vishal Lal 8f621b83e9 Fixed #22380 -- Missing SECRET_KEY variable in sample settings file for testing 2014-04-04 07:25:55 +00:00
Vishal Lal a8e2ec0e82 Fixed #22372 -- Improved description of WizardView.get_context_data().
Thanks simon29 for the report.
2014-04-03 08:25:11 -04:00
Tim Graham d73d0e071c Fixed #22218 -- Deprecated django.conf.urls.patterns.
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2014-04-03 07:28:10 -04:00
Vishal Lal ca93f02c62 Fixed #22347 -- Unified FileSystemStorage documentation.
Thanks nliberg for the report.
2014-04-02 12:58:37 -04:00
Tim Graham 981b864fbd Replaced urllib/urlparse imports with from django.utils.six.moves. 2014-03-31 07:54:22 -04:00
Claude Paroz 41903d025a Dropped support for GDAL 1.6 2014-03-29 11:08:52 +01:00
Claude Paroz c5d1df70a4 Dropped support for GEOS 3.1 2014-03-29 11:08:52 +01:00
Claude Paroz c6ffa4cab6 Added note in geo library docs 2014-03-29 11:08:52 +01:00
Claude Paroz e62dea9ad5 Confirmed Spatialite 4 support 2014-03-29 11:08:52 +01:00
Claude Paroz 0f1f12c564 Confirmed GEOS 3.4 support 2014-03-29 11:08:52 +01:00
Tim Martin a779757706 Fixed #21941 -- Documented the kwargs param of django.conf.urls.url().
Thanks cjerdonek for the report.
2014-03-27 07:01:47 -04:00
Tim Graham 5233b36693 Fixed #22029 -- Removed obsolete advice on registering migrate/syncdb signal handlers.
All signals should now be registered in AppConfig.ready().

Thanks un33k for the report.
2014-03-26 10:39:52 -04:00
Tim Graham 9b7ba8af1b Fixed #22322 -- Fixed incorrect explanation of what managed=False does.
refs #14305.

Thanks Adrian Klaver for the report.
2014-03-25 14:01:37 -04:00
Tim Graham e3c4205b79 flake8 and doc fixes for refs #22257. 2014-03-25 09:44:59 -04:00
Marc Tamlyn 09ab447d08 Merge pull request #2465 from coder9042/ticket_22258
Fixed #22257 -- Added file output option to dumpdata command.
2014-03-25 11:42:03 +00:00
Anubhav Joshi f34e8fc890 Fixed #22257 -- Added file output option to dumpdata command. 2014-03-25 13:47:03 +05:30
Tim Graham 51c8045145 Removed versionadded/changed annotations for 1.6. 2014-03-24 11:42:56 -04:00
Adam Kaliński ec08d62a20 Fixed #22048 - Enhanced docs to cover nonexistent one-to-one relationships.
Thanks EvilDMP for the suggestion.
2014-03-24 09:41:04 -04:00
Anubhav Joshi 416a858023 Fixed #17922 -- Added required_css_class to form label.
Thanks hanson2010 for the suggestion.
2014-03-24 08:11:54 -04:00
Loic Bistuer 7ac8380799 Fixed #22318 -- Added Form.has_error() to easily check if a given error has happened. 2014-03-24 07:21:32 -04:00
Claude Paroz 3f7615cddc Fixed #22317 -- Fixed documented handler400 default value 2014-03-23 21:18:39 +01:00
Simon Charette fa8b473528 Fixed #22299 -- Cleanup wizard temp files when possible.
Thanks to @erikr for the review.
2014-03-22 17:48:12 -04:00
Claude Paroz 3a97f992fb Fixed #22313 -- Removed 'u' prefixes from documentation 2014-03-22 21:32:20 +01:00
Claude Paroz 74b3467646 Removed GeoRSSSitemap
Refs #18531.
2014-03-22 19:58:50 +01:00
Loic Bistuer e61d99d96d Fixed #20684 -- Added support for HTML5 boolean attributes to form widgets. 2014-03-22 14:28:12 -04:00
Claude Paroz bc315266c8 Fixed #22294 -- Prevented converting length filter output to string
Thanks Steve Pike for the report.
2014-03-22 16:39:46 +01:00
Tim Graham ee4edb1eda Made ModelForms raise ImproperlyConfigured if the list of fields is not specified.
Also applies to modelform(set)_factory and generic model views.

refs #19733.
2014-03-22 07:56:48 -04:00
Claude Paroz 6ca6c36f82 Improved strip_tags and clarified documentation
The fact that strip_tags cannot guarantee to really strip all
non-safe HTML content was not clear enough. Also see:
https://www.djangoproject.com/weblog/2014/mar/22/strip-tags-advisory/
2014-03-22 10:59:18 +01:00
Aymeric Augustin 253e8ac29f Removed django.middleware.doc. Refs #20126.
Small doc changes missed in 66076268.
2014-03-21 22:07:39 +01:00
Aymeric Augustin 06160cb945 Removed deprecated TRANSACTIONS_MANAGED setting. 2014-03-21 21:34:47 +01:00
Thomas Schreiber 907ac64641 Fixed typos in docs (django.contrib.site) 2014-03-21 19:56:31 +01:00
Tim Graham bf5430a20b Removed django.test.simple and django.test._doctest per deprecation timeline.
refs #17365, #17366, #18727.
2014-03-21 13:36:46 -04:00
Tim Graham 1ea44a3abd Switched {% cycle %} and {% firstof %} tags to auto-escape their variables per deprecation timeline.
refs #17906.
2014-03-21 13:17:10 -04:00
Tim Graham 4965a77407 Removed PIL compatability layer per deprecation timeline.
refs #19934.
2014-03-21 10:54:53 -04:00
Tim Graham f567d04b24 Removed settings.CACHE_MIDDLEWARE_ANONYMOUS_ONLY per deprecation timeline.
refs #15201.
2014-03-21 09:46:17 -04:00
Tim Graham 8b81dee60c Removed fix_ampersands template filter per deprecation timeline.
Also removed related utility functions:
* django.utils.html.fix_ampersands
* django.utils.html.clean_html
2014-03-21 08:50:43 -04:00
Tim Graham 11e22129d5 Removed settings.SEND_BROKEN_LINK_EMAILS per deprecation timeline. 2014-03-21 07:15:58 -04:00
Tim Graham aa93a1890f Removed contrib.comments per deprecation timeline. 2014-03-21 07:05:36 -04:00
Dejan Noveski 4d0c5f6142 Fixed #22255 -- Added support for specifying re flags in RegexValidator 2014-03-21 11:12:36 +01:00
Bryan Helmig f2eea960e0 Fixed minor syntax error in Queryset docs 2014-03-21 11:02:15 +01:00
Daniel Hahler ac9c7701a7 Replaced reference to ModelAdmin.get_formsets() (deprecated) with get_formsets_with_inlines(). 2014-03-19 20:37:00 -04:00
zedr fad47367bf Fixed #21179 -- Added a StreamingHttpResponse example for CSV files.
Thanks charettes for the suggestion.
2014-03-17 07:22:27 -04:00
Anubhav Joshi ad43fdaa00 Fixed #21860 -- Added to_field_name to ModelChoiceField docs.
Thanks Keryn Knight for the suggestion.
2014-03-16 15:40:52 -04:00
Daniel Pyrathon 885e7adf56 Fixed #22242 -- Documented common cookie size limit. 2014-03-16 10:40:59 -04:00
Akis Kesoglou aaad3e27ac Fixed #22217 - ManyToManyField.through_fields fixes.
- Docs description of arguments mix up.
- Keep it from erroneously masking E332 check.
- Add checks E338 and E339, tweak message of E337.
2014-03-11 19:33:04 -03:00
Tim Graham ce3d9f847d Fixed typo in docs/ref/django-admin.txt
Thanks Wes Kendall for the report.
2014-03-11 08:09:44 -04:00
Aymeric Augustin 3315535ae8 Fixed an example to match the code. 2014-03-09 21:20:34 +01:00
Shai Berger 41afae4ce9 Reorganized the database test settings
Change database test settings from "TEST_"-prefixed entries in the
database settings dictionary to setting in a dictionary that is itself
an entry "TEST" in the database settings.

Refs #21775

Thanks Josh Smeaton for review.
2014-03-09 03:57:18 +02:00
Russell Keith-Magee 70ec4d776e Fixed #22034 -- Added a specific set of relation checks for GenericInlineModelAdmin.
Thanks to jwa for the report.
2014-03-08 11:25:23 +08:00
Anssi Kääriäinen 219d928852 Fixed #21863 -- supplemented get_lookup() with get_transform()
Also fixed #22124 -- Expanded explanation of exactly what is going on in
as_sql() methods.
2014-03-07 14:52:13 +00:00
Tim Graham 8f9c3d0565 Fixed typo in docs/ref/checks.txt 2014-03-07 09:18:06 -05:00
Roger Hu 9b729ddd8f Fixed #22185 -- Added settings.CSRF_COOKIE_AGE
Thanks Paul McMillan for the review.
2014-03-06 08:28:43 -05:00
Claude Paroz 06efeae598 Added --previous flag to msgmerge command used by makemessages
Also took the opportunity to slightly refactor gettext options
so as to ease customization by subclassing the command.
Thanks Michal Čihař for the report and initial patch.
2014-03-06 10:20:01 +01:00
Gabe Jackson b77f26313c Fixed #22207 -- Added support for GenericRelation reverse lookups
GenericRelation now supports an optional related_query_name argument.
Setting related_query_name adds a relation from the related object back to
the content type for filtering, ordering and other query operations.

Thanks to Loic Bistuer for spotting a couple of important issues in
his review.
2014-03-05 22:37:53 +02:00
Akis Kesoglou c627da0ccc Fixed #14549 - Removed restriction of single FKs on intermediary tables
Thanks to Loic Bistuer for review. Minor changes to error messages
done by committer.
2014-03-05 22:33:58 +02:00
Chris Wilson 95c74b9d69 Fixed #22206 -- Passed models.TextField.max_length to forms.CharField.maxlength 2014-03-05 20:09:28 +01:00
zedr 6fe22b30e0 Fixed #22085 -- Added a feature for setting non-expiring keys as the default.
This feature allows the default `TIMEOUT` Cache argument to be set to `None`,
so that cache instances can set a non-expiring key as the default,
instead of using the default value of 5 minutes.

Previously, this was possible only by passing `None` as an argument to
the set() method of objects of type `BaseCache` (and subtypes).
2014-03-04 21:16:35 +01:00
Loic Bistuer 7bbb6958dc Allowed custom querysets when prefetching single valued relations
The original patch for custom prefetches didn't allow usage of custom
queryset for single valued relations (along ForeignKey or OneToOneKey).
Allowing these enables calling performance oriented queryset methods like
select_related or defer/only.

Thanks @akaariai and @timgraham for the reviews. Refs #17001.
2014-03-03 21:35:19 +02:00
Tim Graham 5a4f1298cf Fixed #21908 -- Added example usage for ModelAdmin.get_inline_instances().
Thanks matt at schinckel.net for the suggestion.
2014-03-03 10:40:06 -05:00
Tim Graham eae4f16177 Removed doc newlines added in previous commit that caused build errors. 2014-03-03 08:49:18 -05:00
Rodolfo Carvalho 2b6436e2d5 Fixed some typos and formatting issues in docs. 2014-03-03 08:37:17 -05:00
Greg Chapple 6acaa52386 Fixed #22135 -- Added ModelAdmin.get_changeform_initial_data().
Allows custom behavior for setting initial form data in ModelAdmin.
By default, initial data is set via GET params. The new method allows
this behavior to be overridden.

Thanks egasimus for the suggestion.
2014-03-03 07:28:24 -05:00
Russell Keith-Magee c41335fa27 Added backwards compatibliity checks to reference documentation. 2014-03-03 19:20:48 +08:00
Russell Keith-Magee 5679fce87c Added first cut at reference documentation for the checks framework. 2014-03-03 18:56:11 +08:00
Baptiste Mispelon ea4da8e63c Fixed some typos in the documentation.
Thanks to Rodolfo Carvalho and Piotr Kasprzyk
for the patch.
2014-03-02 17:05:57 +01:00
Anubhav Joshi bb2ca9fe6c Fixed #22172 -- Allowed index_together to be a single list (rather than list of lists)..
Thanks EmilStenstrom for the suggestion.
2014-03-01 15:44:42 -05:00
Erik Romijn 775975f15d Fixed #22130 -- Deprecated fix_ampersands, removed utils.clean_html() 2014-03-01 14:07:57 +01:00
Sergey Kolosov 8c98f39624 Fixed #15318 -- Added settings for language cookie max-age, path, domain
Introduced a number of settings to configure max-age, path, and domain
for the language cookie: LANGUAGE_COOKIE_AGE, LANGUAGE_COOKIE_PATH and
LANGUAGE_COOKIE_DOMAIN.

Thanks sahid for the suggestion.
2014-03-01 07:52:45 -05:00
Tim Graham 1f5f015c32 Fixed spelling mistakes in docs. 2014-02-28 21:03:46 -05:00
Alex de Landgraaf ea869b5148 Fixed #21948 -- Noted TEMPLATE_LOADERS requirement when overriding admin templates.
Thanks django at patjack.co.uk for the suggestion.
2014-02-28 16:38:25 -05:00
Tim Graham 7f2505ad9e Fixed doc typos. 2014-02-28 11:44:03 -05:00
Tim Graham 55fb162588 Fixed #22028 -- Documented that database signals aren't emitted for apps that laack a models module.
Thanks un33k for the suggestion and donjpacheco for the draft patch.
2014-02-28 09:22:33 -05:00
vvojvoda c23b3717be Fixed #21962 -- Added escape_html flag to ErrorDict.as_json() 2014-02-28 07:05:55 -05:00
navneet suman 3390550f6f Fixed #22145 -- Clarified docs on Field.blank and Field.null options.
Thanks skipjack at peru.com for the suggestion.
2014-02-25 20:59:34 -05:00
Szczepan Cieślik e816198034 Fixed docs typos. 2014-02-25 10:28:32 -05:00
Iacopo Spalletti 65b4626528 Fixed #22142 -- Documented PostGIS 2 database creation during tests 2014-02-25 13:41:50 +01:00
Alex de Landgraaf b645be80e9 Fixed #22063 -- Added reference to NoReverseMatch from the reverse() documentation 2014-02-23 13:45:52 +01:00
Baptiste Mispelon 072fb923e1 Fixed #21881 -- Clarify behavior of {% ssi %} template tag.
When using the `parsed` option, {% ssi %} has the same limitation
as {% include %}, namely that the rendering of the included
template is done separately.

Thanks to trac user nagyv for the report and to alextreme for
the patch.
2014-02-23 12:00:24 +01:00
Marcin Sokół b887408486 Fixed #22113 -- changed object_name to model_name in CBV docs.
Thanks to trac user nikunj.sg for the report.
2014-02-22 23:36:54 +01:00
Baptiste Mispelon 1d3ae4760b Fixed warnings when building the documentation. 2014-02-22 21:43:50 +01:00
Greg Chapple ede99f0ec3 Fixed #22032 -- added documentation for settings.MIGRATION_MODULES 2014-02-22 20:14:41 +01:00
Jochem Oosterveen 271929dd9d Fixed #22092 -- Documented ResolverMatch.view_name 2014-02-22 18:31:40 +01:00
Erik Romijn 8cd32f0965 Fixed #22120 -- Documented persistent activation of languages and cleaned up language session key use 2014-02-22 18:29:06 +01:00
Marcin Sokół 09b725f51b Fixed #21902 -- Documented search order for list_display. 2014-02-22 18:11:43 +01:00
Alasdair Nicol 462edd22e5 Fixed #22112 -- Added RedirectView.pattern_name to CBV flattened index
Also moved accessor method get_redirect_url next to its attribute url
for consistency with the other views.

Thanks nikunj.sg for the report
2014-02-21 22:23:06 +01:00
Artur Frysiak faf6a911ad Fixed #22023 -- Raised an error for values() followed by defer() or only().
Previously, doing so resulted in invalid data or crash.

Thanks jtiai for the report and Karol Jochelson,
Jakub Nowak, Loic Bistuer, and Baptiste Mispelon for reviews.
2014-02-17 14:46:13 -05:00
Marek Wywiał 8274fa60f8 Made the new template.Context.flatten() method a public API.
That method was introduced in 9db4271bd1.

Refs #21765.
2014-02-16 15:18:45 +01:00
Zbigniew Siciarz 94b5bc361a Fixed #22002 -- Documented avoiding database interaction in AppConfig.ready().
Thanks Marc Tamlyn for the suggestion.
2014-02-15 13:50:31 -05:00
Zbigniew Siciarz 44814e78cc Fixed #22013 -- Documented difference between SERVER_EMAIL and DEFAULT_FROM_EMAIL. 2014-02-15 19:11:46 +01:00
chomik 985ae732b2 Fixed #21884 -- Mentioned that exact is the defaut QuerySet lookup type
Thanks to cjerdonek for the suggestion.
2014-02-15 17:17:58 +01:00
Michal Prusek 00da02cbfd Fixed #22052 -- Corrected a misspelling of ellipsoid 2014-02-15 13:02:16 +01:00
djendrju 4ac4c98cbd Fixed #22049 -- Corrected a misspelling of dimensional 2014-02-15 12:08:01 +01:00
Klemens Mantzos f683cb90be Fixed #21924 -- Added the ability to specify a reverse order for admin_order_field.
Thanks Klemens Mantzos for the report and initial patch.
2014-02-14 19:53:44 -05:00
Lukasz Balcerzak 0242134d32 Fixed #17942 -- Added a JsonResponse class to more easily create JSON encoded responses.
Thanks leahculver for the suggestion and Erik Romijn,
Simon Charette, and Marc Tamlyn for the reviews.
2014-02-14 18:25:19 -05:00
Loic Bistuer 2e4200b5c7 Fixed #21654 -- Documented a use-case for Form.errors.as_data().
Thanks selwin for the suggestion.
2014-02-14 06:52:50 -05:00
Simon Meers 007c5cd367 Updated docs that misreported django.apps.apps.ready as being a method. 2014-02-14 12:50:27 +11:00
Jeremy f94f466cd3 Fixed #19496 -- Added truncatechars_html filter.
Thanks esevece for the suggestion and  Nick Sandford and Martin Warne
for the inital work on the patch.
2014-02-13 10:27:27 -05:00
Alasdair Nicol 8aa1efff6d Fixed #21951 -- Updated docs to use __str__ for Python 3
Thanks Tim Graham for the report and recommendations
2014-02-13 07:12:40 -05:00
Andrew Godwin dbe82e74f2 Add reference documentation for operations and stubs for schemaeditor. 2014-02-12 18:53:35 +00:00
Christopher Adams eefc88feef Fixed #2445 -- Allowed limit_choices_to attribute to be a callable.
ForeignKey or ManyToManyField attribute ``limit_choices_to`` can now
be a callable that returns either a ``Q`` object or a dict.

Thanks michael at actrix.gen.nz for the original suggestion.
2014-02-11 14:05:12 -05:00
Julian Wachholz 9a4ee8ddb8 Fixed #21994 -- Added form_dict argument to calls of WizardView.done()
Added an additional keyword argument ``form_dict`` to calls of
WizardView.done() implementations which allows easier access to validated
forms by their step name.
2014-02-10 07:28:39 -05:00
Si Feng b102c27ff4 Fixed #20784 -- Added inverse_match parameter to RegexValidator. 2014-02-10 05:38:43 -05:00
Tim Graham 29345390b8 Minor edits to new findstatic functionality; refs #19879.
Hopefully fixes a test failure on Jenkins.
2014-02-09 15:39:04 -05:00
Claude Paroz 95ede98e60 Removed double word in model docs 2014-02-09 20:30:34 +01:00
Vajrasky Kok 6a9ed7d403 Fixed #19879 -- Have 'findstatic' says on which directories it searched the relative paths.
Added searched_locations in finders module. Added verbosity flag level 2 on 'findstatic'
command that will output the directories on which it searched the relative paths.

Reported by ccurvey. Initial patch by Jonas Svensson and Vajrasky Kok.
2014-02-09 14:22:22 +00:00
Andrew Godwin d5df7a0515 Fixed #21969: Fix behaviour of initial_data with migrated apps 2014-02-09 12:22:59 +00:00
Baptiste Mispelon a5391db76a Fixed inaccuracies in generic mixins documentation. 2014-02-09 10:59:18 +00:00
Berker Peksag 5d263dee30 Fixed #21674 -- Deprecated the import_by_path() function in favor of import_string().
Thanks Aymeric Augustin for the suggestion and review.
2014-02-08 11:12:19 -05:00
Claude Paroz fcc21837dc Removed extra backquote in field docs 2014-02-08 14:20:56 +01:00
Loic Bistuer 8847a0c601 Fixed #16192 -- Made unique error messages in ModelForm customizable.
Overriding the error messages now works for both unique fields, unique_together
and unique_for_date.

This patch changed the overriding logic to allow customizing NON_FIELD_ERRORS
since previously only fields' errors were customizable.

Refs #20199.

Thanks leahculver for the suggestion.
2014-02-08 04:59:09 -05:00
Christopher Medrela b22d6c47a7 Fixed #17005 -- Added CurrentSiteMiddleware to set the current site on each request.
Thanks jordan at aace.org for the suggestion.
2014-02-06 04:45:49 -05:00
Tim Graham 867f8fd6c7 Made some PEP8 fixes in docs/ref/forms/widgets.txt
Thanks Siecje.
2014-02-04 06:24:13 -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
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
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 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
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
Marc Tamlyn 16f3a6a4c7 Fixed #21865 -- Incorrect signs in documented example.
Maths is hard.
2014-01-23 20:32:24 +00: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 81830ce34f Fixed some punctuation; thanks Chris Jerdonek. 2014-01-23 09:01:26 -05: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 dfc092622e Fixed #21529 -- Noted that {% url %} encodes its output (refs #13260). 2014-01-22 10:44:50 -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 c9de1b4a55 Implement swappable model support for migrations 2014-01-19 16:43:12 +00: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 9173d2cb74 Fixed #18285 -- Documented that bulk_create doesn't work with M2M relationships. 2014-01-16 20:47:02 -05:00
Tim Graham a6e3fb80b0 Fixed #21343 -- Noted many-to-many restrictions with intermediate model.
Thanks EvilDMP for the report.
2014-01-16 08:38:40 -05:00
Tim Graham c05b2f58e7 Fixed #21768 -- Corrected TemplateView context section.
Thanks nedbatchelder for the report and claudep for the patch.
2014-01-16 07:58:08 -05:00
Kevin Wood 82f466b571 Fix typo in storage docs 2014-01-15 13:17:08 -08:00
Aymeric Augustin d562527a16 Fixed #21477 -- Renamed db to using in pre/post_migrate signals. 2014-01-12 22:24:33 +01:00
Claude Paroz 3d4ed28dce Fixed #21547 -- Updated GeoDjango tutorial with PostGIS 2 output
Thanks awilliams at cironline.org for the report.
2014-01-11 17:58:29 +01:00
Claude Paroz 0179852d7f Fixed #8898 -- Obsoleted SplitDateTimeWidget usage with DateTimeField
Thanks Tim Graham for the review.
2014-01-11 15:50:34 +01:00
Aymeric Augustin 3326a412cc Deprecated importing a model before loading its application.
Refs #21719, #21680.
2014-01-10 23:43:10 +01:00
Aymeric Augustin 6a320cc14a Fixed #21718 -- Renamed has_app to is_installed. 2014-01-06 22:48:41 +01:00
Vajrasky Kok ea83102d0f Fixed #21319 -- Added documentation for the Form.fields attribute.
Thanks pydanny for the report. Also, added documentation about
base_fields attribute and its difference with fields attribute.
2014-01-02 19:43:26 -05:00
Aymeric Augustin 449ede03b8 Changed convention for modules storing AppConfigs.
The app/apps dichotomy was more confusing than valuable.
2014-01-02 23:07:33 +01:00
Nathan Smith 44d40ba521 Fixed minor typos. 2014-01-02 15:14:11 -05:00
Aymeric Augustin 1386075f62 Updated release notes on app_label.
Django determines automatically which application models belong to,
provided the application can be imported without importing models.
2014-01-01 19:45:43 +01:00
Aymeric Augustin 0ce945a671 Fixed #21018 -- Reversed precedence order for management commands. 2014-01-01 18:11:15 +01:00
Aymeric Augustin 8a2f304a79 Documented unicity rules in INSTALLED_APPS.
Refs #12288, #21679.
2014-01-01 16:51:58 +01:00
Loic Bistuer 4befb3015c Fixed #21581 -- Fixed a number of issues with collectstatic.
When STATIC_ROOT wasn't set, collectstatic --clear would delete
every files within the current directory and its descendants.

This patch makes the following changes:

Prevent collectstatic from running if STATIC_ROOT isn't set.

Fixed an issue that prevented collectstatic from displaying the
destination directory.

Changed the warning header to notify when the command is run
in dry-run mode.
2013-12-31 14:58:49 -05:00
Aymeric Augustin 1d23d766ab Renamed AppConfig.setup to ready.
Thanks Jannis and Marc for the feedback.

Fixed #21717.
2013-12-31 18:04:54 +01:00
Aymeric Augustin c40209dcc0 Made it possible to change an application's label in its configuration.
Fixed #21683.
2013-12-31 17:30:58 +01:00
Aymeric Augustin bfcc686d22 Removed the only_with_models_module argument of get_model[s].
Now that the refactorings are complete, it isn't particularly useful any
more, nor very well named. Let's keep the API as simple as possible.

Fixed #21689.
2013-12-30 23:59:34 +01:00
Tim Graham 0150830687 Fixed #21710 -- Documented User.get_short_name()
Thanks Keryn Knight for the report.
2013-12-30 17:42:11 -05:00
Aymeric Augustin 80d74097b4 Stopped populating the app registry as a side effect.
Since it triggers imports, it shouldn't be done lightly.

This commit adds a public API for doing it explicitly, django.setup(),
and does it automatically when using manage.py and wsgi.py.
2013-12-30 22:11:17 +01:00
Aymeric Augustin c31d7c4813 Updated advice on connecting signals at startup. 2013-12-30 22:11:17 +01:00
Aymeric Augustin e187caa3af Added AppConfig.setup() to run setup code. 2013-12-30 22:11:16 +01:00
Aymeric Augustin 7b88a96553 Added AppConfig.get_models(). 2013-12-29 20:31:59 +01:00
Aymeric Augustin 00110904ac Refactored the migration signals to use app configs.
De-aliased pre/post_syncdb to pre/post_migrate to increase
backwards-compatibility.
2013-12-29 17:53:42 +01:00
Claude Paroz 6d66ba5948 Fixed #21242 -- Allowed more IANA schemes in URLValidator
Thanks Sascha Peilicke for the report and initial patch, and
Tim Graham for the review.
2013-12-28 21:25:32 +01:00
Aymeric Augustin ba7206cd81 Changed get_model to raise an exception on errors.
Returning None on errors required unpythonic error checking and was
inconsistent with get_app_config.

get_model was a private API until the previous commit, but given that it
was certainly used in third party software, the change is explained in
the release notes.

Applied the same change to get_registered_model, which is a new private
API introduced during the recent refactoring.
2013-12-28 20:53:00 +01:00
Aymeric Augustin 54790e669d Simplified Apps.get_model and added AppConfig.get_model.
Documented them as public APIs.
2013-12-28 20:43:29 +01:00
Claude Paroz b7a7baa554 Fixed #21618 -- Added hints about openlayers.js hosting
Thanks kz26 for the report and Tim Graham for the excellent
review.
2013-12-28 11:08:50 +01:00
Aymeric Augustin c81fae6b95 Used app_label instead of appname.
The last component of the dotted path to the application module is
consistently referenced as the application "label". For instance it's
AppConfig.label. appname could be confused with AppConfig.name, which is
the full dotted path.
2013-12-28 09:53:02 +01:00
Tim Graham d8d83777eb Fixed #21629 -- Added instructions for loading MySQL time zone definitions.
Thanks Aymeric for the suggestion.
2013-12-26 15:50:33 -05:00
Aymeric Augustin ce1bc2c94b Made the AppConfig API marginally more consistent.
Eliminated the app_ prefix that was more confusing than useful.
2013-12-26 19:25:09 +01:00
Aymeric Augustin 7df049c417 Swapped app registry and app config API docs.
Thanks David Larlet for the suggestion.

Also fixed some Sphinx warnings and improved ReST markup.
2013-12-25 21:57:52 +01:00
Yaroslav Halchenko 80027d2c38 Unified listing of shell commands/code
- use code-block:: bash
- prefix the command with $
2013-12-25 15:19:14 -05:00
Tim Graham b798d2bf97 Added versionadded annotations for redirect middleware attributes.
refs #19321
2013-12-25 09:56:41 -05:00
Tim Graham 5d82658657 Fixed #21669 -- Typo in docs/ref/forms/fields.txt.
Thanks alex_koval for the report.
2013-12-25 06:02:43 -05:00
Aymeric Augustin 8c78cba47f Copy-edited previous commit.
Thanks Tim for the review.
2013-12-24 23:48:22 +01:00
Aymeric Augustin 285e765891 Added release notes for app loading changes. 2013-12-24 20:16:56 +01:00
Aymeric Augustin 9b8192ce51 Updated a few doc paragraphs following the app-loading refactor. 2013-12-24 17:20:11 +01:00
Aymeric Augustin f326720a73 Documented the Apps and AppConfig APIs. 2013-12-24 17:20:11 +01:00
Claude Paroz 9267fb88ef Added more spatial predicates for prepared geometries
GEOS 3.3 added crosses, disjoint, overlaps, touches and within
predicates on prepared geometries.
2013-12-24 16:53:09 +01:00
Claude Paroz d17404aa90 Dropped support for GEOS < 3.1 2013-12-24 15:57:13 +01:00
Tim Graham 23d9f517dc Fixed #21585 -- Updated some links to 3rd party database projects.
Thanks graeme.perrow at sap.com for the original report.
2013-12-18 18:48:21 -05:00
Bouke Haarsma a39d672ec7 Fixed #21386 -- Removed admindocs dependence on sites framework
* Removed ADMIN_FOR setting and warn warning
* Group view functions by namespace instead of site
* Added a test verifying namespaces are listed

Thanks to Claude Paroz for reviewing and ideas for improvement.
2013-12-18 19:44:04 +01:00
Kevin Christopher Henry d34c8c338a Fixed #21632 -- Docs: Removed example with callable as query parameter
Using callables as query parameters is undocumented and not working,
so this changes an example from the ForeignKey.limit_choices_to
documentation that uses it.
2013-12-18 12:37:11 -05:00
Denis Moskalets d4e578d0f6 Fixed #21552 -- Allowed the use of None for the iexact lookup.
Thanks Anubhav Joshi for the documentation.
2013-12-18 09:34:53 -05:00
Loic Bistuer 3ce9829b61 Fixed #17413 -- Serialization of form errors along with all metadata. 2013-12-16 16:33:28 -05:00
Baptiste Mispelon 1689744aee Added some internal links to render_to_string documentation. 2013-12-15 23:02:20 +01:00
Andrew Godwin dfc95d240d Fix docs typo 2013-12-15 12:11:02 +00:00
Baptiste Mispelon d4d0dd7416 Changed documentation of HttpResponse.content to indicate it's a bytestring 2013-12-13 11:42:14 +01:00
Rémy HUBSCHER 24fcca6bdd Fixed #21591 -- Added documentation about contrib.messages.get_messages.
Refs https://code.djangoproject.com/ticket/21591
Thanks to track user merb for the report.
2013-12-12 14:56:34 +01:00
Claude Paroz 626bdf648a Updated a bunch of hyperlinks in documentation 2013-12-08 18:40:09 +01:00
Ramiro Morales f876552f4b (Re-)added GeoDjango instructions for building pysqlite2 correctly.
This is a partial undo of 1b142ef5dd.
2013-12-08 11:14:18 -03:00
Ramiro Morales 12615dab78 Fixed #13476 -- Added support for color in console output under Windows.
Detect and use the services of the ANSICON third-party tool if it's
available.
2013-12-02 23:18:04 -03:00
Tim Graham f3e7ab366c Removed gender-based pronouns per [c0a2daad78]. 2013-11-30 08:37:15 -05:00
Claude Paroz 50a8ab7cd1 Enabled makemessages to support several translation directories
Thanks Rémy Hubscher, Ramiro Morales, Unai Zalakain and
Tim Graham for the reviews.
Also fixes #16084.
2013-11-30 11:00:23 +01:00
Loic Bistuer b72b85af15 Removed Form._errors from the docs in favor of the add_error API. 2013-11-30 01:00:53 +07:00
Loic Bistuer f563c339ca Fixed #20867 -- Added the Form.add_error() method.
Refs #20199 #16986.

Thanks @akaariai, @bmispelon, @mjtamlyn, @timgraham for the reviews.
2013-11-30 01:00:53 +07:00
Vajrasky Kok 7e2d61a972 Fixed #21380 -- Added a way to set different permission for static directories.
Previously when collecting static files, the directories would receive permissions
from the global umask. Now the default permission comes from FILE_UPLOAD_DIRECTORY_PERMISSIONS
and there's an option to specify the permissions by subclassing any of the
static files storage classes and setting the directory_permissions_mode parameter.
2013-11-29 08:01:30 -05:00
Baptiste Mispelon 077af42139 Fixed #21515 -- Corrected example of template.Context in documentation.
Thanks to trac user oubiga for the report.
2013-11-28 00:57:13 +01:00
Tim Graham df6760f12c Added a warning regarding risks in serving user uploaded media.
Thanks Preston Holmes for the draft text.
2013-11-27 16:35:25 -05:00
Loic Bistuer f450bc9f44 Added a bulk option to RelatedManager remove() and clear() methods
Refs #21169
2013-11-27 19:45:22 +02:00
Loic Bistuer 17c3997f68 Fixed #21169 -- Reworked RelatedManager methods use default filtering
The `remove()` and `clear()` methods of the related managers created by
`ForeignKey`, `GenericForeignKey`, and `ManyToManyField` suffered from a
number of issues. Some operations ran multiple data modifying queries without
wrapping them in a transaction, and some operations didn't respect default
filtering when it was present (i.e. when the default manager on the related
model implemented a custom `get_queryset()`).

Fixing the issues introduced some backward incompatible changes:

- The implementation of `remove()` for `ForeignKey` related managers changed
  from a series of `Model.save()` calls to a single `QuerySet.update()` call.
  The change means that `pre_save` and `post_save` signals aren't called anymore.

- The `remove()` and `clear()` methods for `GenericForeignKey` related
  managers now perform bulk delete so `Model.delete()` isn't called anymore.

- The `remove()` and `clear()` methods for `ManyToManyField` related
  managers perform nested queries when filtering is involved, which may
  or may not be an issue depending on the database and the data itself.

Refs. #3871, #21174.

Thanks Anssi Kääriäinen and Tim Graham for the reviews.
2013-11-27 19:44:18 +02:00
Alex Gaynor bb5ab908cc Fixed a typo in the documentation 2013-11-26 13:49:54 -06:00
Jay Leadbetter c74504c2dd Fixed #20522 - Allowed use of partially validated object in ModelAdmin.add_view formset validation.
Updated ModelAdmin to use form.instance when passing parent model to
child inlines for add_view. There is effectively no change in the
change_view since the previously passed 'obj' is the same as form.instance.

Thanks to meshy for report, and EvilDMP and timo for review.
2013-11-25 20:01:16 -05:00
Ludwik Trammer 70e61310d6 Fixed #21507 -- Corrected default widget information for FileField 2013-11-25 08:26:10 -05:00
Simon Charette eb38257e51 Fixed #21391 -- Allow model signals to lazily reference their senders. 2013-11-24 17:51:22 -05:00
Tim Graham 03bc0a8ac5 Fixed typo in previous commit; refs #21490. 2013-11-24 16:28:29 -05:00
Tim Graham bfe7377adb Fixed #21490 -- Fixed custom admin URL reverse example.
Thanks glarrain for the report.
2013-11-24 15:19:05 -05:00
Loic Bistuer 2a0ae9b9ec Removed confusing comments from the docs.
The settings reference documentation doesn't seem the right place to
invite users to write their own db and cache backends.

Also the actual wording makes the task sound trivial, which is hardly
the case; writing a custom db backend is a very difficult task, and
writing a custom cache backend is full of gotcha.
2013-11-24 20:22:22 +01:00
Thomas Orozco 957d22b850 Add missing commas in Prefetch docs 2013-11-23 23:48:34 +01:00
Ramiro Morales 62b393c5ae Fixed #21488 -- Multiple locales treatment in i18n commands.
Removed multiple locales separated by commas variation (that wasn't
working as documented) in favor of simply allowing use of the
``--locale``/``-l`` options more than once for ``makemessages`` and
``compilemessages``.

Thanks Romain Beylerian for the report and Claude, Simon for their help.

8750296918 from stable/1.6.x.
2013-11-23 11:53:47 -03:00
Loic Bistuer 82a58ce5b6 Fixed #21491 -- Removed documented workaround for a known issue.
The issue was that two M2M hidden reverse managers
(related_name ending with a '+') could clash with each other.

Refs #21375 and #15932. Thanks Baptiste.
2013-11-23 01:29:09 +07:00
Loic Bistuer 27f04e79b1 Fixed #21479 -- Favor 'migrate' over 'syncdb' in the docs. 2013-11-21 15:12:39 +01:00
Markus Amalthea Magnuson b6a6cf4ab7 Fixed #21427 -- Clearly state integer field value ranges in docs
Added an explicit mention of the exact value ranges for integer type
fields that are safe in all databases supported by Django. Also, put
all value numbers inside double ticks.
2013-11-21 14:15:23 +01:00
Julia Antokhine 3c3be2e8ec fixed typo in builtins.txt 2013-11-19 12:53:28 -05:00
Rocky Meza 42197e31aa Fixed the base class note in the Date Views docs. 2013-11-19 10:23:59 -05:00
Baptiste Mispelon bc0413cbc6 Added more internal links in the management command documentation. 2013-11-18 19:25:28 +01:00
Claude Paroz a0f3eeccf3 Fixed #21397 -- Re-added flexibility to TypedChoiceField coercion
Thanks Elec for the report and Simon Charette for the review.
2013-11-18 18:24:56 +01:00
DanSears 8ca3963ab2 Clarified MySQL Connector note. 2013-11-15 08:51:17 -05:00
Baptiste Mispelon 0048ed77c7 Fixed typos in previous commit (9aa6d4bdb6). 2013-11-12 20:42:44 +01:00
Baptiste Mispelon 9aa6d4bdb6 Removed a mention of `Form._errors` from the documentation.
Also removed a sentence that was incorrect: raising a
`ValidationError` inside `Form.clean` doesn't clear the
`cleaned_data` attribute.

Thanks to loic84 and timograham for the review.
2013-11-12 20:27:21 +01:00
Sjoerd Langkemper d87127655f Fixed #21421 -- Added level_tag attribute on messages.
Exposing the level name (e.g. "info") makes it possible to prepend
something to the class name. For example, Twitter Bootstrap has
an alert-info class. This class can now be added to the message
using `class="alert-{{ message.level_tag }}".
Because the level_tag was on the end of the `tags` property, it
could not be used in this fashion when extra_tags were given.
2013-11-11 17:58:02 +01:00
DanSears a17fc36231 added description of MySQL Connector/Python
Reorganized the MySQLdb section into a "MySQL DB API Drivers" section that describes both MySQLdb and MySQL Connector/Python. Included description of the Django adaptors for these DB API drivers.
2013-11-10 23:46:54 -08:00
Bernardo Pires 8bc350b385 Fixed #21372 -- Corrected docs regarding translating LANGUAGES.
Corrected LANGUAGES documentation on how to translate language
names. Now using django.utils.translation.ugettext_lazy instead
of a dummy gettext() function.

Thanks to Salvatore for the report.
2013-11-09 23:56:53 +01:00
Tim Graham 98de90d3d8 Fixed spelling of compatibility. 2013-11-09 10:17:17 -05:00
Baptiste Mispelon c82e850eed Fixed versionadded misuse in the admin documentation. 2013-11-09 15:08:57 +01:00
glts 413307fe35 Added missing parameter in npgettext_lazy docs 2013-11-08 23:20:50 +01:00
Baptiste Mispelon f2e0266be7 Fixed #21396: Document backwards-incompatible change in RedirectView.get_redirect_url.
Thanks to Tim for the review.
2013-11-08 10:47:36 +01:00
Loic Bistuer f51c1f5900 Fixed #17001 -- Custom querysets for prefetch_related.
This patch introduces the Prefetch object which allows customizing prefetch
operations.

This enables things like filtering prefetched relations, calling select_related
from a prefetched relation, or prefetching the same relation multiple times
with different querysets.

When a Prefetch instance specifies a to_attr argument, the result is stored
in a list rather than a QuerySet. This has the fortunate consequence of being
significantly faster. The preformance improvement is due to the fact that we
save the costly creation of a QuerySet instance.

Thanks @akaariai for the original patch and @bmispelon and @timgraham
for the reviews.
2013-11-07 14:49:49 +02:00
Baptiste Mispelon 366bdc4566 Fixed typos in documentation. 2013-11-06 10:47:07 +01:00
Baptiste Mispelon 3c4832214f Fixed another typo introduced by b914991b37.
Thanks Claude for catching it.
2013-11-06 10:22:29 +01:00
Simon Charette 87908b4fc2 Fixed a documentation typo introduced by b914991b37. 2013-11-05 19:38:46 -05:00
Baptiste Mispelon b914991b37 Added more tests and documentation for dictsort.
It's possible to use something like {{ foo|dictsort:'bar.baz' }}
but this wasn't tested or documented.
2013-11-06 00:26:58 +01:00
Bouke Haarsma 9367b9e828 Django should be capitalized in text 2013-11-02 20:15:40 +01:00
Aymeric Augustin 8b3d9d96ed Merge pull request #1799 from Bouke/tickets/9523
Fixed #9523 -- Restart runserver after translation MO files change
2013-11-02 06:57:50 -07:00
Bouke Haarsma 073b974e66 Fixed #21354 -- Documented contrib.redirects defaults to 301 redirects
Thanks glarrain for the suggestion.
2013-11-02 09:52:28 -04:00
Bouke Haarsma c3936c0d79 Fixed #9523 -- Restart runserver after translation MO files change
Thanks to Krzysztof Kulewski for the initial patch.
2013-11-02 10:29:07 +01:00
Tim Graham 090315f5df Fixed spelling ("dependant" -> "dependent")
Dependent means reliant on.
A dependant is a person like a child or spouse.

Thanks Andrew Wilcox for the report.
2013-11-01 21:29:39 -04:00
Claude Paroz 89116cf24a Fixed #21364 -- Specified InnoDB full-text support from MySQL 5.6.4 on
Thanks thevlad at gmail.com for the report.
2013-11-01 10:59:16 +01:00
Claude Paroz 67c6c1a7cb Fixed #21359 -- Corrected MySQL collation name in databases docs
Thanks k_sze for the report.
2013-11-01 10:46:03 +01:00
Unai Zalakain 15f82c7011 Fixed #9722 - used pyinotify as change detection system when available
Used pyinotify (when available) to replace the "pool-every-one-second"
mechanism in `django.utils.autoreload`.

Thanks Chris Lamb and Pascal Hartig for work on the patch.
2013-10-30 11:45:43 -04:00
Tim Graham eafe279120 Fixed #21306 -- Documented lower-casing behavior of title filter. 2013-10-30 09:33:28 -04:00
Baptiste Mispelon 9fde42a69a Fixed #20610: Added a message level dict to contrib.message context processor. 2013-10-30 13:54:07 +01:00
Tim Graham 1edef50880 Fixed #21316 -- Documented that modifying safe strings makes them unsafe.
Thanks dev@simon.net.nz for the suggestion and vijay_shanker for the patch.
2013-10-30 08:11:31 -04:00
Unai Zalakain fd219fa24c Fixed #8261 -- ModelAdmin hook for customising the "show on site" button
``ModelAdmin.view_on_site`` defines wether to show a link to the object on the
admin detail page. If ``True``, cleverness (i.e. ``Model.get_absolute_url``) is
used to get the url. If it's a callable, the callable is called with the object
as the only parameter. If ``False``, not link is displayed.

With the aim of maitaining backwards compatibility, ``True`` is the default.
2013-10-29 17:10:12 -04:00
Alex Gaynor 6b560b50b9 Mark this as a python code-block 2013-10-29 07:26:06 -07:00
Tim Graham ffcfb4cdcc Fixed #21344 -- Typo in docs/ref/models/queries.txt 2013-10-28 14:52:26 -04:00
Vajrasky Kok 9eecb91695 Fixed #21219 -- Added a way to set different permission for static files.
Previously, when collecting static files, the files would receive permission
from FILE_UPLOAD_PERMISSIONS. Now, there's an option to give different
permission from uploaded files permission by subclassing any of the static
files storage classes and setting the file_permissions_mode parameter.

Thanks dblack at atlassian.com for the suggestion.
2013-10-24 17:40:01 -04:00
Claude Paroz c052699be3 Fixed #20338 -- Stripped ending dot during host validation
Thanks manfre for the report and Timo Graham for the review.
2013-10-24 21:24:04 +02:00
Shai Berger 317040a73b Fixed #13245: Explained Oracle's behavior w.r.t db_table
and how to prevent table-name truncation

Thanks russellm & timo for discussion, and timo for review.
2013-10-23 14:51:22 +03:00
Florian Hahn 5240b83462 Fixed #17027 -- Added support for the power operator in F expressions.
Thanks dan at dlo.me for the initial patch.

- Added __pow__ and __rpow__ to ExpressionNode
- Added oracle and mysql specific power expressions
- Added used-defined power function for sqlite
2013-10-22 10:29:57 -04:00
Riccardo Magliocchetti 1e39982b6e Fixed #21296 -- Added docs for PostgreSQL and unix domains sockets. 2013-10-21 13:02:21 -04:00
Juergen Schackmann f8632572ad Fixed #21212 -- Documented the reverse name for OneToOneField.
Thanks bjb at credil.org for the report.
2013-10-18 16:19:05 -04:00
Bouke Haarsma 2fb5a51fa3 Fixed #18659 -- Deprecated request.REQUEST and MergeDict
Thanks Aymeric Augustin for the suggestion.
2013-10-17 09:42:28 -04:00
Marc Tamlyn 349c12d3f5 Fixed #16855 -- select_related() chains as expected.
select_related('foo').select_related('bar') is now equivalent to
select_related('foo', 'bar').

Also reworded docs to recommend select_related(*fields) over select_related()
2013-10-15 15:59:36 +01:00
Unai Zalakain c7634cd7fe Fixed #7603 -- Added a 'scheme' property to the HttpRequest object
`HttpRequest.scheme` is `https` if `settings.SECURE_PROXY_SSL_HEADER` is
appropriately set and falls back to `HttpRequest._get_scheme()` (a hook
for subclasses to implement) otherwise.

`WSGIRequest._get_scheme()` makes use of the `wsgi.url_scheme` WSGI
environ variable to determine the request scheme.

`HttpRequest.is_secure()` simply checks if `HttpRequest.scheme` is
`https`.

This provides a way to check the current scheme in templates, for example.
It also allows us to deal with other schemes.

Thanks nslater for the suggestion.
2013-10-15 09:04:12 -04:00
Loic Bistuer b16dd1fe01 Fixed #8620 -- Updated the Form metaclass to support excluding fields by shadowing them. 2013-10-14 22:42:33 +07:00
Bouke Haarsma 9b7d38ed5a Fixed #21210 -- Documented when runserver doesn't auto-restart.
Thanks gergely at polonkai.eu for the suggestion.
2013-10-14 10:36:18 -04:00
Claude Paroz 1e8eadc94e Fixed #15888 -- Made tablename argument of createcachetable optional
Thanks Aymeric Augustin for the report and the documentation and
Tim Graham for the review.
2013-10-14 13:24:40 +02:00
Ramiro Morales 18ea1c473b Forms docs: More emphasis in 'id' value customizability. 2013-10-12 13:29:11 -03:00
Tai Lee e527c0b6d8 Fixed #13252 -- Added ability to serialize with natural primary keys.
Added ``--natural-foreign`` and ``--natural-primary`` options and
deprecated the ``--natural`` option to the ``dumpdata`` management
command.

Added ``use_natural_foreign_keys`` and ``use_natural_primary_keys``
arguments and deprecated the ``use_natural_keys`` argument to
``django.core.serializers.Serializer.serialize()``.

Thanks SmileyChris for the suggestion.
2013-10-11 12:52:57 -04:00
Tim Graham 945e033a69 Fixed #8918 -- Made FileField.upload_to optional.
Thanks leahculver for the suggestion and dc and vajrasky for work
on the patch.
2013-10-11 08:07:25 -04:00
Tim Graham 1dae4ac177 Whitespace cleanup.
* Removed trailing whitespace.
* Added newline to EOF if missing.
* Removed blank lines at EOF.
* Removed some stray tabs.
2013-10-10 16:49:20 -04:00
Unai Zalakain 3895d8899d Fixed #21213 -- Added docs for Django's mailing lists.
Added docs/internals/mailing-lists.txt documenting the use of django's
mailing lists. All references across docs changed to point to this page.

The referencing makes use of substitution because there's no way to make
a :ref: link in a non-inline fashion in Sphinx. It also makes use of
rst_epilog Sphinx conf for making this substitutions across all the
docs.
2013-10-04 10:00:36 -04:00
Ryan Kaskel 8b0014869f Fixed #19321 -- Allowed redirect middleware HTTP responses to be overridden.
Thanks Melevir for the suggestion.
2013-10-04 07:36:39 -04:00
Emil Stenström 7a97df190c Fixed #19277 -- Added LocaleMiddleware.response_redirect_class
Thanks ppetrid at yawd.eu for the suggestion.
2013-10-03 16:15:29 -04:00
Tim Graham 75bb6ba966 Fixed #10913 -- Documented how related_name affects QuerySet filtering
Thanks neithere for the suggestion.
2013-10-02 12:12:53 -04:00
Baptiste Mispelon e1b7723817 Changed the doc to use gender-neutral pronouns when possible. 2013-10-02 16:41:04 +02:00
Ramiro Morales 1d0fc61b1c Fixed #15185 -- Allowed ModelAdmin.list_display_links=None to disable change list links.
Thanks rm_ for the suggestion.
2013-10-01 14:25:54 -04:00
Curtis Maloney c39c9f2ad8 Fixed #21154 -- Updated TemplateResponse docs to better explain context.
Thanks mrmachine for the report.
2013-09-30 10:19:56 -04:00
Ramiro Morales 5866a49369 Note about static files dirs paths on Windows.
Added it to the settings reference. We used to have it in comment form
in our old, bigger default project template settings.py file.
2013-09-28 20:32:55 -03:00
Erik Romijn 1a63092981 Fixed #20439 -- Started deprecation of IPAddressField 2013-09-28 10:55:32 +02:00
Carl Meyer 8a4f5de4b6 Fixed malformed directive in CBV date-based-mixins docs. 2013-09-27 11:58:41 -06:00
Brett Koonce 946a2226ea Removed extra p (topppings->toppings) 2013-09-23 19:24:40 -04:00
Louis Fill e15f7f31d0 Fixed #21070 -- Added a more complex database configuration example.
Thanks joejasinski for the suggestion.
2013-09-23 12:18:00 -04:00
Ben Huckvale 98e0453f00 Fixed #21120 -- Added more explicit text on using validators and link to writing validators.
Thanks nicolas at niconomicon.net for the suggestion.
2013-09-23 10:37:41 -04:00
Ramiro Morales bebb449ac3 Added docs for changes in commit dd3a883894.
Refs #20693.
2013-09-22 15:43:27 -03:00
Ramiro Morales ce0c5c38ea A few doc additions for changes from d228c1192e. 2013-09-22 13:46:16 -03:00
mlissner d8f2d940cc Correct very minor typo
Just changed as to has.
2013-09-21 13:34:45 -07:00
Curtis Maloney 43a2ec7999 Fixed #21133 --Clarifed documentation about strftime formatting. 2013-09-21 06:42:11 -04:00
evildmp dc8f95b639 Fixed #20877 -- added a performance optimization guide 2013-09-20 23:21:49 +01:00
tschilling 0d1ba84d13 Fixed #20702 -- Deprecated get_formsets in favor of get_formsets_with_inlines.
Thanks stanislas.guerra at gmail.com for the report.
2013-09-20 07:47:24 -04:00
yokomizor df27803a55 Fixed #9532 -- Added min_num and validate_min on formsets.
Thanks gsf for the suggestion.
2013-09-19 13:11:49 -04:00
Brian Holdefehr 98514849dc Fixed #19414 -- Added admin registration decorator
Thanks stavros for the suggestion.
2013-09-18 11:44:10 -04:00
Tim Graham d1c9802811 Fixed #21116 -- Made usage of manage.py in docs more consistent.
Thanks daniel.quattro at gmail.com for the report.
2013-09-18 10:35:41 -04:00
Berker Peksag 2f0566fa61 Fixed #4278 -- Added a dirs parameter to a few functions to override TEMPLATE_DIRS.
* django.template.loader.get_template()
* django.template.loader.select_template()
* django.shortcuts.render()
* django.shortcuts.render_to_response()

Thanks amcnabb for the suggestion.
2013-09-18 07:37:08 -04:00
Tim Graham 18ffdb1772 Fixed #17627 -- Renamed util.py files to utils.py
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor Kołodziej for the initial patch.
2013-09-16 12:52:05 -04:00
Goetz 39b49fd339 Fixed #21101 -- Updated urlize documentation to mention email addresses 2013-09-13 12:42:06 -04:00
Matt Austin 9451d8d558 Fixed #21095 -- Documented new requirement for dates lookups.
Day, month, and week_day lookups now require time zone definitions in the database.
2013-09-13 09:56:19 +02:00
Ramiro Morales 8b366a50f4 Fixed a couple of typos in GeoDjango docs. 2013-09-12 19:36:45 -03:00
Phaneendra Chiruvella bd72c2acb6 Minor typo fix in django.contrib.auth.models.User docs 2013-09-12 03:15:00 +05:30
Tim Graham da843e7dba Fixed #20887 -- Added a warning to GzipMiddleware in light of BREACH.
Thanks EvilDMP for the report and Russell Keith-Magee
for the draft text.
2013-09-11 08:17:15 -04:00
oz123 fca4c4826e Fixed #21075 - Improved doc for calling call_command with arguments. 2013-09-10 09:17:47 -04: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
Tim Graham fb51c9a0f2 Fixed spelling; refs #16895.
Thanks Panagiotis Issaris for the report.
2013-09-09 11:30:31 -04:00
e0ne cbf08c6b0c Fixed #16895 -- Warned about cost of QuerySet ordering
Thanks outofculture at gmail.com for the suggestion.
2013-09-09 09:47:18 -04:00
Aymeric Augustin e192739b3e Fixed #20409 -- Clarified how unique_for_date works when USE_TZ is set. 2013-09-07 14:08:54 -05:00
Tim Graham a86ecc80a2 Fixed #20005 -- Documented that Oracle databases need execute permission on SYS.DBMS_LOB.
Thanks jafula for the suggestion.
2013-09-07 13:59:57 -04:00
Tim Graham ff49449425 Merge pull request #1592 from pablomouzo/fix-admin-view-response-methods-docs
Improved docs for `contrib.admin.options.ModelAdmin.response_*`
2013-09-07 09:38:48 -07:00
Pablo Mouzo 2223b83a55 Improved docs for `contrib.admin.options.ModelAdmin.response_*`
Added links to code references in the docs for `response_add`,
`response_change` and `response_delete`.
2013-09-07 11:33:10 -05:00
Keith Edmiston c54fa1a7bc Fixed 16992 -- Added InnoDB warning regarding reuse of AUTO_INCREMENT values.
Thanks kent at nsc.liu.se for the report.
2013-09-07 12:13:45 -04:00
Pablo Mouzo 9079436b00 Add docs for `response_add`, `response_change` and `response_delete` 2013-09-07 11:01:35 -05:00
Keith Edmiston 028db97503 Fixed #19295 -- Documented that CachedStaticFilesStorage isn't compatible with runserver --insecure. 2013-09-06 17:26:15 -04:00
Andrew Godwin efd1e6096e Adding 'sqlmigrate' command and quote_parameter to support it. 2013-09-06 15:28:12 -05:00
Tim Graham 5ca290f5db Fixed some sphinx errors and added some links. 2013-09-06 16:15:35 -04:00
Adrian Holovaty d179fc72cf Fixed versionadded and ordering of note in admin/index.txt 2013-09-06 14:23:29 -05:00
Tim Graham 38d2e7c225 Merge pull request #1567 from technivore/ticket_20970
re-indented method documentation within RelatedManager
2013-09-06 12:07:25 -07:00
Matthew Rich af67b93c02 re-indented method documentation within RelatedManager 2013-09-06 13:44:40 -05:00
Daniele Procida 263eecc583 Merge pull request #1544 from evildmp/ticket_20920_rebase
Fixed #20920 -- Consolidated F() and Q() documentation
2013-09-06 11:27:58 -07:00
evildmp 79cc66692a Consolidated documentation for F() and Q() 2013-09-06 12:57:25 -05:00
Adrian Holovaty a962286b74 Added AdminSite attributes for easily changing admin title.
AdminSite now has overridable site_header, site_title and index_title attributes. Changed
each admin view to pass these to the context (in a new AdminSite.each_context() method).
The intent here is to make it easier to override these things in the common case, instead of
having to override a template, which is a bigger burden.
2013-09-06 12:31:50 -05:00
Matthew Rich a5bcc09c8f documented RelatedManager calling save() behind the scenes, added section on direct replacement of related object set 2013-09-06 11:37:08 -05: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
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
Tim Graham eacf060e01 Fixed #21044 -- Documented django.core.urlresolvers.Resolver404
Thanks Keryn Knight for the suggestion.
2013-09-05 08:45:33 -04:00
Tim Graham ebfe42d018 Fixed #21009 -- Added a versionchanged note regarding changes to clean().
refs [fb1dd6b13a] and [1c4a9bd9ad]
2013-09-05 05:47:45 -04:00
Tim Graham 533d1ab334 Fixed #20958 -- Documented that GenericForeignKey fields can't be accessed in forms.
Thanks marky1991.
2013-09-04 13:18:08 -04:00
Paul C. Anagnostopoulos 1ccdc08189 Clarified docs for some tags and filters 2013-09-04 12:32:05 -04:00
Loic Bistuer 7b04038a7f Fixed #20973 -- Document serving static files without django.contrib.staticfiles 2013-09-03 08:59:08 -04:00
Claude Paroz 102f26c929 Fixed #20998 -- Allow custom (de)serialization for GIS widgets
Thanks Mathieu Leplatre for the report and the initial patch.
2013-09-02 13:32:00 +02: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 e87997dd33 Fixed copy/paste error in measurement docs 2013-08-31 10:33:14 +02:00
Tim Graham a89c856a7a Fixed typo in docs/ref/models/options.txt 2013-08-30 21:05:36 -04: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
Jorge C. Leitão d72f83c410 Added links to file docs. 2013-08-29 12:48:59 -04: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
Erik Romijn fa57266699 Fixed #20972 -- Make messages cookie follow session cookie secure/httponly 2013-08-26 21:34:29 +02: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
Ramiro Morales 57c82f909b Typos introduced in 297f5af222. 2013-08-22 21:25:35 -03: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
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
Marc Tamlyn bac4d03ce6 Fixed #20944 -- Removed inaccurate statement about View.dispatch(). 2013-08-22 09:20:50 -04:00
Ramiro Morales 297f5af222 Made description of LANGUAGE_CODE setting more clear. 2013-08-22 08:27:04 -03:00
Kevin Christopher Henry 7775ced938 Documentation - Noted that OneToOneField doesn't respect unique.
Added OneToOneField to the list of model fields for which the unique
argument isn't valid. (OneToOneFields are inherently unique, and if
the user supplies a value for unique it is ignored / overwritten.)
2013-08-21 22:32:04 +01:00
Kevin Christopher Henry bb011cf809 Documentation -- Corrected error about Model.full_clean()
Although the ModelForm validation code was changed to call
Model.full_clean(), the documentation still said otherwise. The
offending phrase was removed.
2013-08-21 15:38:07 -04:00
Kevin Christopher Henry 83e434a2c2 Documentation - Noted that OneToOneField doesn't respect unique.
Added OneToOneField to the list of model fields for which the unique
argument isn't valid. (OneToOneFields are inherently unique, and if
the user supplies a value for unique it is ignored / overwritten.)
2013-08-20 21:20:29 -07: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
Tim Graham 7b69c3e775 Removed versionadded/changed annotations for 1.5 2013-08-19 09:09:41 -04: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
Tim Graham 29255fcb4f Fixed some ReST errors regarding backticks 2013-08-15 07:14:10 -04:00
Alasdair Nicol 354009d67e Updated docs following deprecation of django.views.defaults.shortcut
Follows 3f2befc
2013-08-15 00:27:16 +01:00
Tim Graham b6178fa24b Added some doc links for django.contrib.messages 2013-08-14 12:57:55 -04: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
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
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 7970d97a70 Docs tweaks (thanks timgraham) 2013-08-10 20:00:12 +01: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
Loic Bistuer f8a6a4eba1 Improved queryset handling and docs for (Single|Multiple)ObjectMixin. 2013-08-09 17:51:58 +07:00
Tim Graham 8442268869 Added an anchor for django.forms.Form.clean in docs 2013-08-08 14:13:52 -04:00
Tim Graham 58e4fe464c Merge pull request #1457 from jaimeirurzun/master
Clarified meaning of models.User.is_authenticated()
2013-08-08 07:27:08 -07:00
Daniele Procida 7e6af9d40c Added more on @cached_property, refs #20870 2013-08-08 09:45:26 -04: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
Jaime Irurzun f96fe3cd1e Clarify meaning of models.User.is_authenticated() 2013-08-08 12:45:06 +01:00
Daniele Procida 7a2296eb5b Fixed #20870 -- Documented django.utils.functional.cached_property 2013-08-08 05:36:17 -04:00
Preston Holmes cf041b883c Merge pull request #1453 from chrismedrela/ticket20484-improvement
Fixed #20484 again -- added note to field documentation
2013-08-07 14:10:24 -07:00
Christopher Medrela fb26c4996a Fixed #20484 again -- added note to field documentation 2013-08-07 20:57:56 +02: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
Dominic Rodger c33d1ca1d9 Fixed #20852 - Fixed incorrectly generated left quotes in docs.
Sphinx generates left single quotes for apostrophes after
code markup, when right single quotes are required. The
easiest way to fix this is just by inserting the unicode
character for a right single quote.

Instances of the problem were found by looking for
">&#8216;" in the generated HTML.
2013-08-06 07:13:17 -04:00
Jimmy Song 94d7fed775 Fixed #20859 - Clarified Model.clean() example. 2013-08-05 09:06:09 -04:00
Julien Phalip 0b071ba7df Fixed a small formatting issue. 2013-08-04 17:29:55 -07:00
Tim Graham 1593a86494 Fixed #20860 -- Removed references to defunct chicagocrime.org 2013-08-04 14:46:06 -04:00
Daniele Procida e8183a8193 Fixed #20842 and #20845 - Added a note on order_by() and improved prefetch_related() docs. 2013-08-04 12:34:28 -04: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
Loic Bistuer 0bcdcc7eb9 Added ModelAdmin.get_search_fields. 2013-08-03 20:02:43 -04:00
Dominic Rodger 920b242e30 Fixed #20786 -- Cleaned up docs/ref/exceptions.txt
Thanks Daniele Procida for the suggestion and edits.
2013-08-02 09:42:46 -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
Loic Bistuer acd1d439fd Fixed #20826 -- Moved Manager.raw() and Manager._insert() to the QuerySet class. 2013-07-31 09:54:00 -04:00
Julian Bez 8f5533ab25 Fixed #20793 -- Added Last-Modified header to sitemaps. 2013-07-31 07:42:30 -04:00
Tim Graham 4d8ecbdfda Fixed some ReST errors; refs #20819. 2013-07-31 07:22:38 -04:00
SusanTan 7de35a9ef3 Fixed #20779 -- Documented AdminSite.app_index_template; refs #8498.
Thanks CollinAnderson for the report.
2013-07-31 07:09:12 -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
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 68e0a169c4 Rename pre_ and post_syncdb to *_migrate, with aliases from old names 2013-07-30 11:52:52 +01:00
Tim Graham 05ea5a2139 Fixed #20823 -- Typo in docs/ref/forms/validation.txt 2013-07-29 18:41:08 -04:00
minusf 70c080fcdb Misc doc cleanups. 2013-07-29 06:57:33 -04:00
Julien Phalip 47c755327b Fixed a number of minor misspellings. 2013-07-27 18:46:03 -07: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
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
Aymeric Augustin 5ed7ec99b6 Added versionadded directive missing from b7bd708. 2013-07-25 20:14:51 +02:00
Andrew Godwin f8297f6323 More migration docs, and conversion of all easy syncdb references 2013-07-25 16:19:36 +01:00
mark hellewell 8c9240222f Fixed #18315 -- Documented QueryDict.popitem and QueryDict.pop
Thanks gcbirzan for the report.
2013-07-25 11:06:41 -04:00
Andrew Godwin 06103c8ef5 Small start to migrations documentation 2013-07-25 14:45:38 +01:00
Brenton Cleeland dab52d99fc Fixed #20792 -- Corrected DISALLOWED_USER_AGENTS docs.
Thanks simonb for the report.
2013-07-25 07:38:14 -04:00
Preston Holmes 10f8a21002 Fixed #18168 -- clarified precedence of validation
any choices set by formfield_for_choice_field are still subject
to model validation of the model field's choices attribute
2013-07-24 14:58:14 -07:00
Tim Graham bd0dcc6c89 Fixed #20766 -- Deprecated FastCGI support. 2013-07-24 13:41:45 -04: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
Matt Deacalion Stevens fa217d14a0 Updated the `databases` documentation
+ Removed a reference about MySQL storage engines also being
   called 'table types', as this term has been deprecated for
   8 years and is no longer used.

 + Fixed the link to the official InnoDB storage engine docs.

 + Apache (versions >= 2.4) will always choose a multi-threaded
   MPM module on modern operating systems (later than 2002).
2013-07-19 09:01:13 +01:00
Matt Deacalion Stevens beefc97171 Atom specification URL updated
Changed to the URL of the official RFC for Atom, since Atomenabled.org
is just a holding page.
2013-07-18 12:53:54 +01:00
Alasdair Nicol 1131d4191f Fixed typo in inspectdb docs 2013-07-18 11:37:01 +01: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 862a04a56d Fixed some markup in docs/ref/templates/api.txt 2013-07-15 11:31:06 -04:00
Claude Paroz 1b142ef5dd Removed Python 2.6 references in GIS docs
Refs #20746.
2013-07-13 23:08:48 +02: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 a7d97a6778 Fixed #20653 -- Renamed checksetup -> check missed in [03465639]
Thanks CollinAnderson for the report.
2013-07-12 12:48:49 -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
Tim Graham 3cdeb572d7 Fixed #17528 -- Documented that add() and remove() with a many-to-many relationship do not call Model.save() 2013-07-12 06:19:16 -04:00
Christopher Medrela ac223ff6d1 Fixed #20735 -- clarified ManyToManyField constructor doc 2013-07-12 11:50:08 +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
Tim Graham ecd746191c Fixed #20733 -- Typo in docs/ref/class-based-views/generic-display.txt
Thanks ijl20@ for the report.
2013-07-11 07:36:25 -04:00
James Bennett c0f03175ce Fixed #19695 -- Retitle "Form Media" to "Form Assets". 2013-07-08 13:59:54 -04:00
Tim Graham 181f63c22d Fixed #12346 -- Added a note on how to validate InlineFormSets.
Thanks johnsmith for the suggestion.
2013-07-08 08:29:28 -04:00
Claude Paroz c94093c5ba [gis] Dropped official support for GDAL < 1.6 2013-07-06 17:25:46 +02:00
Claude Paroz de676f94b7 Added release dates for gis libs as doc comments 2013-07-06 17:18:53 +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 577b0f9189 Fixed #20561 -- Emphasized that QuerySet.distinct([*fields]) is only supported by Postgres.
Thanks jtiai for the suggestion.
2013-07-05 07:20:37 -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
Tim Graham 428de2e339 Fixed #12579 -- Noted QuerySet.get_or_create() depends on database unique constraints.
Thanks timmolendijk, jdunck, vijay_shanker, and loic84.
2013-07-04 07:53:13 -04:00
Tim Graham 8a679386c3 Fixed #20691 -- Added a note for __str__() vs. __unicode__() and Python 3.
Thanks garrison for the suggestion.
2013-07-03 08:44:03 -04:00
Tim Graham 3632d289de A couple more semicolon -> colon fixes; refs #18134. 2013-07-02 14:14:56 -04:00
Aymeric Augustin 6a0374d037 Reflected the new default value of LOGGING_CONFIG in docs. 2013-07-01 23:16:25 +02: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 7415176507 Simplified description of HttpResponse(<iterator>)
Related to 8b9b8d3b.
2013-06-29 18:56:00 +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 24bbf1367a Removed django.utils.encoding.StrAndUnicode class, deprecated in Django 1.5. 2013-06-28 23:16:28 -03: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 8eadbc5a03 Removed 'mimetype' arguments from a few places, as per deprecation TL.
This includes HttpResponse and co. __init__() methods,
django.shortcuts.render_to_response() and the index(), sitemap() sitemap
app views.
2013-06-28 21:48:16 -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 f73d04dda9 Removed 'cleanup' management command as per deprecation TL. 2013-06-28 21:48:16 -03: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
Ken Bolton 6fcb7ba842 Fix typo 2013-06-27 12:39:50 -04:00
Andrew Godwin 12cb0df10f Docs for related_query_name 2013-06-27 15:44:22 +01:00
Claude Paroz 8db264cbc8 Fixed LOGGING setting docs 2013-06-27 16:29:26 +02:00
Baptiste Mispelon 5005303ae7 Fixed #20665 -- Missing backslash in sitemaps documentation
Thanks to roman for the report.
2013-06-27 09:42:09 +02:00
Tim Graham 1184d07789 Fixed #14881 -- Modified password reset to work with a non-integer UserModel.pk.
uid is now base64 encoded in password reset URLs/views. A backwards compatible
password_reset_confirm view/URL will allow password reset links generated before
this change to continue to work. This view will be removed in Django 1.7.

Thanks jonash for the initial patch and claudep for the review.
2013-06-26 13:11:47 -04:00
Tim Graham e10757ff4d Doc cleanup for FormMixin.prefix; refs #18872. 2013-06-25 07:50:43 -04:00
Daniel Izquierdo 9a2b07f1b4 Fixed #20654 -- Fixed type of `m2m_changed`'s `pk_set` arg in docs 2013-06-25 09:46:17 +02:00
Baptiste Mispelon 299983616f Fixed #20644 -- Add ModelFormMixin.fields to the CBV flattened index
Thanks to Tim Graham for the report and review.
2013-06-24 11:59:08 +02:00
Simon Charette ecf63d5d89 Added missing `versionadded` for `FormMixin.prefix`. 2013-06-22 16:49:24 -04: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
Tim Graham 9be93aa809 Fixed #20634 - Corrected doc mistake re: staticfiles finders strategy.
Thanks claudep for the catch and bmispelon for the research.
2013-06-21 14:57:12 -04:00
James Bennett ba610cb319 Fixed #19881 -- Documented that get_next/previous_by_FOO uses default manager. 2013-06-21 13:14:05 -04: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 2c4fe761a0 Fixed #20593 -- Allow blank passwords in check_password() and set_password() 2013-06-18 13:32:54 -04:00
Loic Bistuer ee77d4b253 Fixed #20199 -- Allow ModelForm fields to override error_messages from model fields 2013-06-18 08:01:17 -04:00
Baptiste Darthenay 39b245fd76 Fixed #20614 -- Typo in documentation. 2013-06-17 11:35:07 +02:00
Daniel Lindsley b3532f7df9 Adjusted the docs to reflect when the checksetup command was added. 2013-06-15 10:14:48 -07:00