Customizing admin edit filed

Hidden some filed, make them un-editable

http://localhost:8080/admin/books/book/1/
Customizing admin filter horizon for many2many section

http://localhost:8080/admin/books/book/1/
Customizing admin raw id field

http://localhost:8080/admin/books/book/1/
Request Information About the URL, UA, META

http://localhost:8080/current_url_view_good/

http://localhost:8080/display_meta/
Basic Search Form

http://localhost:8080/search-form/
Get Method

http://localhost:8080/search/?q=ddd
Get Method, Search book from db

http://localhost:8080/search/?q=ddd
Get Method, Search book from db, add error info with color

http://localhost:8080/search/?q=
Get Method, Search book from db, Search result & form same page

In this updated view, if a user visits /search/ with no GET parameters, he’ll see the search form with no error message.

Remove search_form view.

http://localhost:8080/search/
Get Method, Search book from db, Simple validation

localhost:8080/search/?q=fffffffffffffffffffffffffffffffffffffffffffffffff
Get Method, Contact

http://localhost:8080/contact/
Get Method, Contact, Error keep previous data

http://localhost:8080/contact/
First Form Class

Also create mysite/contact dir same level with mysite/book
Tying Form Objects Into Views

localhost:8080/contact/
Changing text filed to textarea, add max_length to char field.

localhost:8080/contact/
Setting Initial Values

localhost:8080/contact/
Custom Validation Rules

localhost:8080/contact/

Here clean_message map to member var: message, if you want to validate subject

    1. change name to clean_subject
    2. change self.cleaned_data['message'] to self.cleaned_data['subject']
Specifying labels

localhost:8080/contact/
Customizing Form Design

localhost:8080/contact/

Error show as red.

{{ form.message.errors }} displays a <ul class="errorlist"> if errors are present
Customizing Form Design: error

localhost:8080/contact/

{% for error in form.message.errors %}