Skip to main content

The django application, that allows attach title, keywords and description meta tags for site's pages.

Project description

The django application, that allows attach title, keywords and description meta tags for site’s pages.


$ pip install django-simple-metatags


  1. Add ‘metatags’ to your INSTALLED_APPS:
    # ...
  1. Run migrate to create the application table:
$ python migrate metatags

3. Include meta tags for model, add MetaTagInline in inlines of your ModelAdmin subclass (also django-simple-metatags has the own ModelAdmin class, that allows add meta tags for URL-paths):

from metatags.admin import MetaTagInline

class CustomModelAdmin(admin.ModelAdmin):
    # ...
    inlines = (MetaTagInline,)

4. Load meta_tags template library and create meta_tags template block in HTML head section. Add include_meta_tags template tag in meta_tags block:

{% load meta_tags %}
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    {% block meta_tags %}
        {% include_meta_tags %}
    {% endblock %}

Arguments of include_meta_tags template tag

All arguments are optional.

model_instance - Model instance, to get meta tags. None by default.

model_title_field - Model’s field, that can be used as title if meta tags title field is blank. ‘title’ by default.

default_title - Title of page by default. Used with URL-path. No sense, when the model_instance argument was passed. ‘’ by default.

default_keywords - Keywords by default.

default_description - Description by default.

Management command

syncmetatags - adds translation fields, when the django-modeltranslation application is used.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-simple-metatags, version 0.9.2
Filename, size File type Python version Upload date Hashes
Filename, size django_simple_metatags-0.9.2-py2-none-any.whl (16.3 kB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size django-simple-metatags-0.9.2.tar.gz (8.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page