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
-
Run migrations commands
python manage.py migrate
-
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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5355fdcefcb4333f97f92ec424dfe399249850eb9d88af47f6b90de76b34ff6c |
|
MD5 | de4544a115db40208125b520f21ce0f1 |
|
BLAKE2b-256 | 191fcb367b256e53168be002b1b3bc6907e71fbaf905d5680ff4d125488b32ab |
Close
Hashes for django_tools_socialnetworks-1.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cb6c2edb4021e51b21acda9c4b5d2456ed0539ebb830a00cc45d9349291bf21 |
|
MD5 | c9f4cfe8656dc532c4819dee9ec85e29 |
|
BLAKE2b-256 | 3bd72a5a576792ec967db5b05f88d35b97ca4576a794bd1ff997d61c70880c60 |