I have actually completed the examples in the Django getting started tutorial and have a clearer understanding of some details. I feel that it is impossible to read documents without manual operations. I can't really grasp the relationship between the elements of documents. I can't do it after reading the documents many times. I have to do it first. At the same time, this exercise was conducted in the eclipse + pydev environment to learn about the support for Django in this development environment. Getting started with Django Web site: https://docs.djangoproject.com/en/1.6/intro/tutorial01/
Database Structure in the tutorialPoll {question, pub_date} CHOICE {poll, choice_text, votes} choice. Poll = poll. ID
This tutorial completes the processing of the following pages1. views. indexhttp: // 127.0.0.1: 8000/polls/display all records in the poll table 2. views. detailhttp: // 127.0.0.1: 8000/polls/1/display all choice under a poll and provide the vote entry. Note that in views. Detail () processing, the poll data table is used. In the template, the corresponding choice table data is obtained through poll. choice_set. 3. Views. votehttp: // 127.0.0.1: 8000/polls/1/vote/this page is not displayed. It is the processing of the click button vote. 4. Views. resultshttp: // 127.0.0.1: 8000/polls/1/results/vote after processing, go to the results page.
Relationship processing between data tablesThe related manager object is used to conveniently manage the relationships between tables. This saves you the trouble of manually maintaining the field relationship. Provides a convenient mutual access mechanism. You can use poll to directly access the relevant choice data. Poll. choice_set.addchoice.poll
About AdminAdmin provides rich customization functions. It is described in template. 2014.10.3
Django Tutorial Study Notes