https://github.com/redsolution/django-seo
Add SEO fields
https://github.com/redsolution/django-seo
Last synced: 10 months ago
JSON representation
Add SEO fields
- Host: GitHub
- URL: https://github.com/redsolution/django-seo
- Owner: redsolution
- License: gpl-3.0
- Created: 2010-07-16T12:40:07.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2024-08-12T12:47:30.000Z (over 1 year ago)
- Last Synced: 2025-03-23T06:41:27.453Z (11 months ago)
- Language: Python
- Homepage:
- Size: 63.5 KB
- Stars: 17
- Watchers: 11
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django SEO application
Open source SEO management system based on the Django framework
## Features
- Easy SEO fields attachment to any site page
- Several ways to render seo-fields
- Query caching for faster page loading
## Requirements
- Django >= 2.2
- Python >= 3.5
## Installation and basic usage
1. Install package:
`` pip install git+git://github.com/oldroute/django-seo.git``
2. Configure your settings file:
**SEO_FOR_MODELS** - list of models for attaching seo-fields in format: ..
Simple settings configuration:
```python
INSTALLED_APPS += ['seo']
SEO_FOR_MODELS = [
'pages.Page',
'easy_news.News',
]
```
3. 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.
```html
...
{% seo %}
...
```
**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:
```html
...
{% seo object %}
...
```
4. Apply migrations and run local server:
```python
python manage.py migrate seo
python manage.py runserver
```
5. Fill seo-fields in admin interface
**Configure is done!**
## Advanced template tag usage
**Use case 3**: Setting default values for fields through parameters: ``title_default``, ``desc_default``, ``keys_default``:
```html
...
{% seo current_page title_default='My title' %}
...
```
**Use case 4**: Setting text postfix through parameters: ``title_postfix``, ``desc_postfix``, ``keys_postfix``:
```html
...
{% seo current_page title_postfix=' my postfix' %}
...
```
Your can combine any parameters together