LogEntry.get_edited_object() A shortcut that returns the referenced object.
LogEntry.get_change_message() New in Django 1.10. Formats and translates change_message into the current user language. Messages created before Django 1.10 will always be displayed in the language in which they were logged.
LogEntry.content_type The ContentType of the modified object.
LogEntry.change_message The detailed description of the modification. In the case of an edit, for example, the message contains a list of the edited fields. The Django admin site formats this content as a JSON structure, so that get_change_message() can recompose a message translated in the current user language. Custom code might set this as a plain string though. You are advised to use the get_change_message() method to retrieve this value instead of accessing it directly. Changed in Djan
LogEntry.action_time The date and time of the action.
LogEntry.action_flag The type of action logged: ADDITION, CHANGE, DELETION. For example, to get a list of all additions done through the admin: from django.contrib.admin.models import LogEntry, ADDITION LogEntry.objects.filter(action_flag=ADDITION)
class models.LogEntry The LogEntry class tracks additions, changes, and deletions of objects done through the admin interface.
ModelAdmin.view_on_site Set view_on_site to control whether or not to display the “View on site” link. This link should bring you to a URL where you can display the saved object. This value can be either a boolean flag or a callable. If True (the default), the object’s get_absolute_url() method will be used to generate the url. If your model has a get_absolute_url() method but you don’t want the “View on site” button to appear, you only need to set view_on_site to False: from django.contrib
ModelAdmin.show_full_result_count Set show_full_result_count to control whether the full count of objects should be displayed on a filtered admin page (e.g. 99 results (103 total)). If this option is set to False, a text like 99 results (Show all) is displayed instead. The default of show_full_result_count=True generates a query to perform a full count on the table which can be expensive if the table contains a large number of rows.
ModelAdmin.search_fields Set search_fields to enable a search box on the admin change list page. This should be set to a list of field names that will be searched whenever somebody submits a search query in that text box. These fields should be some kind of text field, such as CharField or TextField. You can also perform a related lookup on a ForeignKey or ManyToManyField with the lookup API “follow” notation: search_fields = ['foreign_key__related_fieldname'] For example, if you have a blo
Page 214 of 226