https://github.com/andrewpetrochenkov/django-meta-tag-view.py
Django <meta /> tag view mixin
https://github.com/andrewpetrochenkov/django-meta-tag-view.py
Last synced: 10 months ago
JSON representation
Django <meta /> tag view mixin
- Host: GitHub
- URL: https://github.com/andrewpetrochenkov/django-meta-tag-view.py
- Owner: andrewpetrochenkov
- License: unlicense
- Created: 2020-08-07T15:09:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-03T20:00:26.000Z (about 5 years ago)
- Last Synced: 2025-02-26T09:41:57.345Z (10 months ago)
- Language: Python
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://pypi.org/project/django-meta-tag-view/)
[](https://unlicense.org/)
[](https://github.com/andrewp-as-is/django-meta-tag-view.py/actions)
### Installation
```bash
$ [sudo] pip install django-meta-tag-view
```
##### `views.py`
```python
from django_meta_tag_view.views import MetaTagMixin
class View(MetaTagMixin,...):
meta_tags = {'robots': 'noindex'}
```
```python
class View(MetaTagMixin,...):
def get_meta_tags(self):
return {
'description': 'description ...',
'keywords': 'keywords ...'
}
```
##### Templates
```html
{{ meta_tags }}
```