Open source SEO management system based on the Django framework
- Easy SEO fields attachment to any site page
- Several ways to render seo-fields
- Query caching for faster page loading
- Django >= 2.2
- Python >= 3.5
-
Install package:
pip install git+git://github.com/oldroute/django-seo.git
-
Configure your settings file:
SEO_FOR_MODELS - list of models for attaching seo-fields in format: <app_name>.<model_name>.
Simple settings configuration:
INSTALLED_APPS += ['seo'] SEO_FOR_MODELS = [ 'pages.Page', 'easy_news.News', ]
-
Call template tag in html template:
Use case 1: Call for specified url. In this case you must fill seo fields for specified url address in the admin of seo application.
<head> ... {% seo %} ... </head>
Use case 2: Call for specified object (model instance declared in SEO_FOR_MODELS). In this case you must fill seo fields in the admin page of the object:
<head> ... {% seo object %} ... </head>
-
Apply migrations and run local server:
python manage.py migrate seo python manage.py runserver
-
Fill seo-fields in admin interface
Configure is done!
Use case 3: Setting default values for fields through parameters: title_default
, desc_default
, keys_default
:
<head>
...
{% seo current_page title_default='My title' %}
...
</head>
Use case 4: Setting text postfix through parameters: title_postfix
, desc_postfix
, keys_postfix
:
<head>
...
{% seo current_page title_postfix=' my postfix' %}
...
</head>
Your can combine any parameters together