Skip to main content

Manager the meta information of your pages in Django

Project description

django-seohelper

Travis CI Coverage Status PyPI version

Django SeoHelper is a pluggable application that helps you to add meta-information to your Django templates.

Soon, more information about usage.

Installation

Using pip:

pip install django-seohelper

Using the source code:

git clone https://github.com/kplaube/django-seohelper.git
cd django-seohelper/
python setup.py install

Configuring

  • Add seohelper to your INSTALLED_APPS

Adding the code to your Template

You need to put the code below in your template file:

{% load seo_helper %} {% seo_helper request.path as meta %}

<html>
<head>
    <title>{{ meta.title }}</title>

    <meta name="description" content="{{ meta.description }}" />
    <meta name="keywords" content="{{ meta.keywords }}" />
    <meta name="robots" content="{{ meta.robot_tags }}" />
</head>

...

</html>

Where seo_helper is the templatetag, request.path is the complete path of the document and meta is the variable where SeoHelper will keep the document's metadata.

Using the admin

Let's suppose we want to add metadata to http://myblog.com/2013/01/01/hello/. So, we need to access /admin/seohelper/document/add/ and create a record with these parameters:

  • URL: /2013/01/01/hello-world/
  • Title: Hello World!
  • Description: My first post.
  • Keywords: index,follow

Now, when we access the http://myblog.com/2013/01/01/hello/, SeoHelper will restore those data from database and will show these in your page.

Project details


Download files

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

Source Distribution

django-seohelper-1.0.0.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file django-seohelper-1.0.0.tar.gz.

File metadata

  • Download URL: django-seohelper-1.0.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for django-seohelper-1.0.0.tar.gz
Algorithm Hash digest
SHA256 841ed1522dbca6d48b6e0c6a2e5c62bc4b04fcda16a2f882091116c547b16eff
MD5 a80d4a63b11fa070087334712d3cdff2
BLAKE2b-256 a888534c1530328a13d2e088f776e198c4fdb9e00ce55cc90f336f065eab6e3b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page