Django Tutorial Study Notes

Source: Internet
Author: User
Tags django tutorial
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

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: info-contact@alibabacloud.com 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.