Skip to main content

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
  1. Run migrations commands python manage.py migrate

  2. 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.

Files for django-tools-socialnetworks, version 1.1.4
Filename, size File type Python version Upload date Hashes
Filename, size django_tools_socialnetworks-1.1.4-py3-none-any.whl (6.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size django-tools-socialnetworks-1.1.4.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page