| Age | Commit message (Collapse) | Author |
|
ModelAdmin.readonly_fields
This issue was fixed by refs #24464.
|
|
Dropped the DJANGO_TEST_TEMP_DIR environment variable.
Before this change, proper removal depended on the developer passing
dir=os.environ['DJANGO_TEST_TMP_DIR'] to tempfile functions.
Backport of 934400759de817471ff37d736686201d7ae34e82 from master
|
|
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
|
|
Thanks to Collin Anderson for the review and suggestions and Tim for the
final review.
|
|
|
|
This change allows dynamically created inlines "Add related" button to work
correcly as long as their associated foreign key is pointing to the primary
key of the related model.
Thanks to amorce for the report, Julien Phalip for the initial patch,
and Collin Anderson for the review.
|
|
Thanks Simon Charette for review.
|
|
Thanks lidaobing for the suggestion.
|
|
This fixes a regression introduced by the 53ff096982 security fix.
Thanks to @a1tus for the report and Tim for the review.
refs #23329.
|
|
Thanks to Trac alias Markush2010 and ross for the detailed reports.
|
|
Thanks romankrv for the suggestion.
|
|
The reason for the regression was that the GenericForeignKey field isn't
something meta.get_field_by_name() should return. The reason is that a
couple of places in Django expects get_field_by_name() to work this way.
It could make sense to return GFKs from get_field_by_name(), but that
should likely be done as part of meta refactoring or virtual fields
refactoring patches.
Thanks to glicerinu@gmail.com for the report and to Tim for working on
the issue.
|
|
Thanks chrj for the suggestion.
|
|
|
|
|
|
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
|
|
|
|
When content is supposed to contain HTML, we do not try to add
line breaks in read-only contents.
Thanks Alexander Todorov for the report.
|
|
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.
|
|
admin_order_field.
Thanks Klemens Mantzos for the report and initial patch.
|
|
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.
|
|
Surprisingly, this commit doesn't change any behavior at all. When a
model is defined with the same name as another model in the same app,
the definition of the first class is bound to the name of the class
regardless of the definition of the second class.
|
|
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.
|
|
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
|
|
|
``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.
|
|
|
|
|
|
|
|
|
|
Thanks bartTC for the report.
|
|
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor Kołodziej for the initial patch.
|
|
admin history view.
|
|
admin crash.
Thanks chris at cogdon.org for the report and admackin for the patch.
|
|
The default delete action resulted in a NoReverseMatch if it were to
list any Model with a ModelAdmin with `get_urls` overridden to remove
the change url. Catching the error and not displaying the link in that
case, as was already done for models with no registered admins.
Thanks Keryn Knight for the report.
|
|
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
|
|
Thanks Collin Anderson for the report.
|
|
Thanks Edwin.
|
|
Thanks Benjie Chen.
|
|
This adds a get_search_results method that users can override to
provide custom search strategies.
Thanks to Daniele Procida for help with the docs.
|
|
return a QuerySet.
|
|
|