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.

Source Distribution

django-tools-socialnetworks-1.1.4.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-tools-socialnetworks-1.1.4.tar.gz.

File metadata

  • Download URL: django-tools-socialnetworks-1.1.4.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for django-tools-socialnetworks-1.1.4.tar.gz
Algorithm Hash digest
SHA256 5355fdcefcb4333f97f92ec424dfe399249850eb9d88af47f6b90de76b34ff6c
MD5 de4544a115db40208125b520f21ce0f1
BLAKE2b-256 191fcb367b256e53168be002b1b3bc6907e71fbaf905d5680ff4d125488b32ab

See more details on using hashes here.

File details

Details for the file django_tools_socialnetworks-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: django_tools_socialnetworks-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for django_tools_socialnetworks-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6cb6c2edb4021e51b21acda9c4b5d2456ed0539ebb830a00cc45d9349291bf21
MD5 c9f4cfe8656dc532c4819dee9ec85e29
BLAKE2b-256 3bd72a5a576792ec967db5b05f88d35b97ca4576a794bd1ff997d61c70880c60

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page