- Django 2 Web Development Cookbook
- Jake Kronika Aidas Bendoraitis
- 94字
- 2021-06-10 19:31:34
Creating a model mixin to take care of meta tags
When you optimize your site for search engines, you not only have to use semantic markup for each page, but you also have to include appropriate meta tags. For maximum flexibility, it helps to have a way to define content for common meta tags, specific to objects that have their own detail pages on your website. In this recipe, we will look at how to create a model mixin for the fields and methods related to keyword, description, author, and copyright meta tags.