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:
- 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
- Ability to easily expand and flexibly
- 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