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.socialnetworksto 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters