.. _introduction-blitz-tutorial: ======================================== Django-seo2 Framework 60-Second-Tutorial ======================================== This is an inordinately brief tutorial, for Django experts who don't like to waste time. Step One -------- * Add ``djangoseo`` to ``INSTALLED_APPS`` * Make sure ``"django.core.context_processors.request"`` is listed in ``TEMPLATE_CONTEXT_PROCESSORS`` Step Two: Definition -------------------- Create a file ``seo.py`` in any app, with the following simple definition: .. code-block:: python from djangoseo import seo class MyMetadata(seo.Metadata): title = seo.Tag(head=True, max_length=68) description = seo.MetaTag(max_length=155) keywords = seo.KeywordTag() heading = seo.Tag(name="h1") Run ``migrate`` Step Three: Admin ----------------- To edit the data in the admin, call ``register_seo_admin`` with the admin site and the metadata definition: .. code-block:: python from djangoseo.admin import register_seo_admin from django.contrib import admin from myapp.seo import MyMetadata register_seo_admin(admin.site, MyMetadata) Step Four: Adding to templates ------------------------------ To get the metadata in your templates, use the ``{% get_metadata %}`` template tag: .. code-block:: html {% load seo %} {% get_metadata %} The above renders like this: .. code-block:: html