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
-
Install with pip install
django-tools-socialnetworks
. -
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
- 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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c2c002c06e6033bd39d0ebc6c8237a633ddf5f78c60a9c28b1156572562899e |
|
MD5 | 58c690d68c9771f896afb8cc0ac819e9 |
|
BLAKE2b-256 | 81513f5f49894dc85b13cf5350381cf43da489c61522c6ea87ae42489c2258bb |
Close
Hashes for django_tools_socialnetworks-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9c088f067874c7060b7a9ef9ecf3ae8eb8fdf822e8919471df6e8990c563892 |
|
MD5 | ebb6da7e4e40a337bb1221b9d8135cea |
|
BLAKE2b-256 | 8eb86241cb6b4e3145464e4986caf2c6602de22438a245ccdd12a669c2b8c7de |