Simple Django app to manage a website social network links
Project description
# Django Tools SocialNetworks
Simple Django app to manage a website social network links
## Installation
1. Install with pip install `django-tools-socialnetworks`.
2. Add `djtools.socialnetworks` to your INSTALLED_APPS setting like this:
```
INSTALLED_APPS = [
...
'djtools.socialnetworks',
]
```
3.1 Add the context processor to your settings file if need the social networks in all your pages.
```
TEMPLATES = [
{
...
'OPTIONS': {
'context_processors': [
...
'djtools.socialnetworks.context_processors.social_networks',
],
},
},
]
```
3.2 Or extend the `get_context` function of your view like this:
```
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['social_networks'] = SocialNetwork.get_social_networks()
return context
```
4. Include social_networks.html snippet in your template or override it.
```
{% include "djtools/socialnetworks/social_networks.html" %}
```
Simple Django app to manage a website social network links
## Installation
1. Install with pip install `django-tools-socialnetworks`.
2. Add `djtools.socialnetworks` to your INSTALLED_APPS setting like this:
```
INSTALLED_APPS = [
...
'djtools.socialnetworks',
]
```
3.1 Add the context processor to your settings file if need the social networks in all your pages.
```
TEMPLATES = [
{
...
'OPTIONS': {
'context_processors': [
...
'djtools.socialnetworks.context_processors.social_networks',
],
},
},
]
```
3.2 Or extend the `get_context` function of your view like this:
```
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['social_networks'] = SocialNetwork.get_social_networks()
return context
```
4. Include social_networks.html snippet in your template or override it.
```
{% include "djtools/socialnetworks/social_networks.html" %}
```
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
Built Distribution
Close
Hashes for django-tools-socialnetworks-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d54f3d2f2bdbf86a5a73d9bc1ca62d7ab412f8ebf82c005d2311845f9fe4ef40 |
|
MD5 | 9290dd39d9cf2bf503a11fc4e41a558c |
|
BLAKE2b-256 | cd6298059e4498f661fbdaa174a31dcc8b2b769f93533379aebe051df971896d |
Close
Hashes for django_tools_socialnetworks-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c3fb4ec6eae34ff62f2310d9fa0a4737d651608a61cdb1e56535f505d9785a5 |
|
MD5 | 79f6de817d66fb3472d1f4279a388ac3 |
|
BLAKE2b-256 | fd7326b95ac4a1f658988bc2cab17a2982b5b2733e3eca9da605283bb4c859dc |