March 2020
Intermediate to advanced
608 pages
17h 17m
English
Let's create our model mixin:
{# templates/core/includes/meta_field.html #}<meta name="{{ name }}" content="{{ content }}" />
# myproject/apps/core/models.pyfrom django.conf import settingsfrom django.db import modelsfrom django.utils.translation import gettext_lazy as _from django.utils.safestring import mark_safefrom django.template.loader import render_to_stringclass MetaTagsBase(models.Model): """ Abstract ...