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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c44d35aa080fd3fb544f7b9f40c73ee90dc0d379a9e78efc740fabd8087894eb |
|
MD5 | 5774da3b828edf9d95f56c4666f57434 |
|
BLAKE2b-256 | c9f10e85a3aac3c7cab37b909f28e5881c40e26a5a7d9dedafd3d1825c2eab84 |
Close
Hashes for django_tools_socialnetworks-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 414e5436bfa33e5ece7bdbf88141213cc6213b0ecfec7916fdc8b0d1ab13dd2b |
|
MD5 | ae44fdb213fa07aeff38e16982e310b5 |
|
BLAKE2b-256 | 1ad58b71f288fbfa22a7e457f2f41d41d573c1b746162bb7287b58ec02233d07 |