Skip to content

Commit

Permalink
Add support for Django >= 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus Laube committed Dec 11, 2019
1 parent 1a37b16 commit 50fc241
Show file tree
Hide file tree
Showing 17 changed files with 356 additions and 193 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
dist
build
eggs
.eggs
parts
bin
var
Expand Down
22 changes: 9 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
language: python

python:
- "2.6"
- "2.7"
env:
- DJANGO_VERSION=1.3.7
- DJANGO_VERSION=1.4.6
- DJANGO_VERSION=1.5
- DJANGO_VERSION=1.5.2
- "3.6"
- "3.7"

install:
- pip install coveralls coverage
- pip install Django==$DJANGO_VERSION
- python setup.py install
script: coverage run --source=seohelper setup.py test
after_script:
- coveralls
- pip install pipenv
- pipenv install --dev

script:
- pipenv run tox
15 changes: 15 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
django = "*"
tox = "*"
tox-pyenv = "*"
tox-travis = "*"

[packages]

[requires]
python_version = "3.7"
152 changes: 152 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 13 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
django-seohelper
================
# django-seohelper

[![Travis CI](https://secure.travis-ci.org/kplaube/django-seohelper.png)](https://travis-ci.org/kplaube/django-seohelper)
[![Coverage Status](https://coveralls.io/repos/kplaube/django-seohelper/badge.png)](https://coveralls.io/r/kplaube/django-seohelper)
[![PyPI version](https://badge.fury.io/py/django-seohelper.png)](http://badge.fury.io/py/django-seohelper)
[![Downloads](http://pypip.in/d/django-seohelper/badge.png)](https://crate.io/packages/django-seohelper/)

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

Soon, more information about usage.


Installation
------------
## Installation

Using pip:

Expand All @@ -23,20 +19,18 @@ Using the source code:

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

Configuring

* Add `seohelper` to your `INSTALLED_APPS`
* Run `syncdb` to create all necessary tables
- Add `seohelper` to your `INSTALLED_APPS`

Adding the code to your Template
--------------------------------
## 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 %}

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

<html>
<head>
Expand All @@ -53,15 +47,14 @@ You need to put the code below in your template file:

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
---------------
## 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
- **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.
59 changes: 0 additions & 59 deletions runtests.py

This file was deleted.

4 changes: 2 additions & 2 deletions seohelper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION = (0, 0, 1)
VERSION = (1, 0, 0)


def get_version():
"""
Returns the version as a human-format string.
"""
return '.'.join([str(i) for i in VERSION])
return ".".join([str(i) for i in VERSION])
Loading

0 comments on commit 50fc241

Please sign in to comment.