An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

[![](https://img.shields.io/pypi/v/django-meta-tag-view.svg?maxAge=3600)](https://pypi.org/project/django-meta-tag-view/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)
[![](https://github.com/andrewp-as-is/django-meta-tag-view.py/workflows/tests42/badge.svg)](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 }}

```


readme42.com