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.2.0.tar.gz (4.7 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page