The selection of Django form fields and the management of the background interface

Source: Internet
Author: User



All fields, default Blank=false, so all are required cannot be empty

All fields, default Null=false, front-end fields automatically insert empty strings (date, time, and numeric fields do not accept empty strings, for these three types, either display a default value, or display a set null=true)

Create a new in the app directory to register the MODELS,EG that requires background management:

From models import bookfrom django.contrib import (book)

Django.contrib.admin.ModelAdmin: Classes for managing background pages in the following two lines of the role is to let the admin actively discover the app's file

From Django.contrib import Adminadmin.autodiscover ()

The selection of Django form fields and the management of the background interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.