The 14th day of Python learning is added

Source: Internet
Author: User

Custom Template Tags

Middleware

Crsf

Rights Management

Pagination

Django Paging

https://docs.djangoproject.com/en/1.9/topics/pagination/

Custom Template Tags

https://docs.djangoproject.com/es/1.9/howto/custom-template-tags/

Rights Management

Django comes with basic rights management, but granularity and restricted permission dimensions are only for specific tables, and if we want to restrict permissions based on business functions, we have to write them ourselves, but we don't have to write them all ourselves, and we can easily extend them on the basis of Django's own permissions.

Write your own permission to note:

    1. The design of the privilege system is transparent to the developers and users, that is, they do not need to change their original use of the system or the way to invoke the interface
    2. Ability to easily expand and flexibly
    3. Permission to be able to achieve very small granularity of control, even meticulous to a button whether a user can press.

Want to a function to implement permissions control, to do can only over the views method to add an adorner on the line, such as:

+ View Code

Code implementation of Check_permission

50 rows for fine-grained permission control

  

Middleware middleware

Https://docs.djangoproject.com/es/1.9/topics/http/middleware/#process_request

Classification:the path to Python's automated development

The 14th day of Python learning is added

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.