Django blog project ideas, django blog ideas

Source: Internet
Author: User

Django blog project ideas, django blog ideas

First of all, it is clear that I am studying Django to create a blog, so if I want to practice it with the goal of blog, follow
Consider the following things in the order of Django's MTV model:
(Models)
1. Various data models in the blog:
A. Blog Model
Attributes include title, release time, body part, abstract, label, and directory.
The body and abstract should support various text formats and syntax highlighting. In this regard, I chose markdown for rendering.
B. Consider the relationship between the blog model and the label and the directory. They are multi-to-many and multi-to-one, so they are labels.
Separate models with Directories
C. Comment Model
Attributes: reviewer name, comment subject, comment time
(Template)
2. The second step is to consider the overall blog interface and layout. In short, we need to consider the frontend. In this regard, I plan to temporarily
The next html template is modified to create a django template. After all, the front-end knowledge is profound and needs to be learned again.
It consumes a lot of energy.
(View)
3. Step 3 consider the key part of django, the view part, and respond to various URLs and forms for submission. View Functions
It is also necessary to pass key information (blog information and comment information in the database) to the django template for display to read.
See.
(Other tasks)
4. Configure the url and pass some parameters to the view function when the user accesses the url, such as accessing the http://myblog.com/post/1
You can pass the value 1 at the end to the view function as a parameter, and then let the view function find the blog model instance with id = 1 in the database.
Pass the information to the template and use the template to present the data to the user.

Related Article

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.