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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15f76391c1d8cb9984be1d3af21534fa4cdbf69d6e46c3f4f5fdbaca97fad9af |
|
MD5 | 191fbe833fa3a587033505cdc5d234c7 |
|
BLAKE2b-256 | 936662d73c8aefafb5948d25c86b64f81912f935a9f9bfa2489c0397e624c475 |
Close
Hashes for django_tools_socialnetworks-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9662426e08a1e923f7625beb596589f2eda6b81118c5b39f664de1b6c3cd4da3 |
|
MD5 | 1aa2d42493d11f9f7915a8da56c06c0f |
|
BLAKE2b-256 | a99dac980ac50f0b9afc6b808883fb7be93005dac3ade43843853aa95b645d5d |