forms.Field.help_text

Field.help_text The help_text argument lets you specify descriptive text for this Field. If you provide help_text, it will be displayed next to the Field when the Field is rendered by one of the convenience Form methods (e.g., as_ul()). Like the model field’s help_text, this value isn’t HTML-escaped in automatically-generated forms. Here’s a full example Form that implements help_text for two of its fields. We’ve specified auto_id=False to simplify the output: >>> from django import

db.models.Field.help_text

Field.help_text Extra “help” text to be displayed with the form widget. It’s useful for documentation even if your field isn’t used on a form. Note that this value is not HTML-escaped in automatically-generated forms. This lets you include HTML in help_text if you so desire. For example: help_text="Please use the following format: <em>YYYY-MM-DD</em>." Alternatively you can use plain text and django.utils.html.escape() to escape any HTML special characters. Ensure that you escap

admin.InlineModelAdmin.min_num

InlineModelAdmin.min_num This controls the minimum number of forms to show in the inline. See modelformset_factory() for more information. InlineModelAdmin.get_min_num() also allows you to customize the minimum number of displayed forms.

postgres.forms.RangeWidget.base_widget

base_widget A RangeWidget comprises a 2-tuple of base_widget.

db.models.FilePathField.allow_files

FilePathField.allow_files Optional. Either True or False. Default is True. Specifies whether files in the specified location should be included. Either this or allow_folders must be True.

views.generic.detail.SingleObjectMixin.get_context_data()

get_context_data(**kwargs) Returns context data for displaying the list of objects. The base implementation of this method requires that the self.object attribute be set by the view (even if None). Be sure to do this if you are using this mixin without one of the built-in views that does so. It returns a dictionary with these contents: object: The object that this view is displaying (self.object). context_object_name: self.object will also be stored under the name returned by get_context_o

forms.CharField

class CharField(**kwargs) [source] Default widget: TextInput Empty value: '' (an empty string) Normalizes to: A Unicode object. Validates max_length or min_length, if they are provided. Otherwise, all inputs are valid. Error message keys: required, max_length, min_length Has three optional arguments for validation: max_length min_length If provided, these arguments ensure that the string is at most or at least the given length. strip New in Django 1.9. If True (default), t

sitemaps.Sitemap.changefreq

changefreq Optional. Either a method or attribute. If it’s a method, it should take one argument – an object as returned by items() – and return that object’s change frequency as a string. If it’s an attribute, its value should be a string representing the change frequency of every object returned by items(). Possible values for changefreq, whether you use a method or attribute, are: 'always' 'hourly' 'daily' 'weekly' 'monthly' 'yearly' 'never'

shortcuts.render()

render(request, template_name, context=None, content_type=None, status=None, using=None) [source] Combines a given template with a given context dictionary and returns an HttpResponse object with that rendered text. Django does not provide a shortcut function which returns a TemplateResponse because the constructor of TemplateResponse offers the same level of convenience as render().

admin.ModelAdmin.radio_fields

ModelAdmin.radio_fields By default, Django’s admin uses a select-box interface (<select>) for fields that are ForeignKey or have choices set. If a field is present in radio_fields, Django will use a radio-button interface instead. Assuming group is a ForeignKey on the Person model: class PersonAdmin(admin.ModelAdmin): radio_fields = {"group": admin.VERTICAL} You have the choice of using HORIZONTAL or VERTICAL from the django.contrib.admin module. Don’t include a field in radio_fie