Skip to main content

Various sugars and goodies for projects.

Project description

Various sugars and goodies for projects. They are mainly for Presslabs internal use, but can be proven usefull for any other projects.

Use as django app

To use sugar in your django app, add “pl_sugar” to your INSTALLED_APPS setting before django.contrib.admin:

INSTALLED_APPS = [
    ...
    'pl_sugar',
    'django.contrib.admin',
    ...
]

It provides the folowing goodies:

  1. Admin filters with more than 5 items are dropdowns

  2. Adds header pagination for django rest framework in pl_sugar.rest_framework.pagination.LinkHeaderPagination

  3. If you install social-auth it displays the Google Login button on admin login page. Also it provides pl_sugar.social_auth.pipeline.set_admin_perms which sets as super admins users defined in SOCIAL_AUTH_ADMIN_EMAILS

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

presslabs-sugar-1.0.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

presslabs_sugar-1.0.0-py2.py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 2 Python 3

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