Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

Downloads Latest Version Wheel Status Egg Status Download format License

This reusable app contains functionality I use across my projects. Feel free to use and expand.

The package is also on PyPI: https://pypi.python.org/pypi/django-shared/

Changelog

  • 0.0.1
    • initial release

Usage

Add to your INSTALLED_APPS setting:

INSTALLED_APPS = [
    ...
    'shared',
]

Contents

Utils for django-configurations

shared.configurations.ExternalCredentials

Mixin for a Configuration class of django-configurations. Enables one to load specific variables from <myproject>/configs/<DJANGO_CONFIGURATION>.py. Good to separate critical information from the settings itself. Usually you do not check the configs into your code versioning system!

Usage example:

# in settings.py (following the default django-configurations setup)
class Common(Configurations):
    DATABASES = {
        'default': ExternalCredentials.get_credentials_module().DATABASE,
    }

# in <myproject>/configs/<DJANGO_CONFIGURATION>.py; e.g. sampleproject/configs/Dev.py
DATABASE = {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'db_name',
    'USER': 'db_user',
    'PASSWORD': 'db_password',
}

Module utils

function list_remove_duplicates(seq, idfun=None)

Removes duplicates from a list. To preserve the list order, specify a function for the list ids as idfun.

Management Commands

python manage.py settings <SOMESETTING>

Print the given setting value using pprint.

Template Tags

copyrights

contains

  • copyright_years
    • displays are year span from settings.COPYRIGHT_YEAR_START (default: 2012) until now, e.g. 2012 - 2014

Release files for django-shared 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for django-shared 0.0.1
File Size Uploaded
django-shared-0.0.1.tar.gz 3.4 kB Details

Release files / django-shared-0.0.1.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL django-shared-0.0.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
19da92c92ad85651c3c142b016076fa553fe48c87a3129271e270846a09d77de
BLAKE2b-256 checksum
How to use checksums
101d981e498c646f63e4bd69bf48d0791e2b71200c4e6b27afd943a5ad2ee689
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page