Page MenuHomeFreeBSD

New port: www/py-django-common-helpers: Common things every Django app needs
ClosedPublic

Authored by kai on Mar 11 2019, 1:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 8:25 AM
Unknown Object (File)
Fri, Apr 12, 8:20 AM
Unknown Object (File)
Fri, Apr 12, 8:20 AM
Unknown Object (File)
Wed, Apr 10, 6:26 AM
Unknown Object (File)
Mar 19 2024, 11:30 AM
Unknown Object (File)
Mar 17 2024, 3:38 AM
Unknown Object (File)
Mar 5 2024, 7:13 PM
Unknown Object (File)
Jan 14 2024, 1:21 PM
Subscribers
None

Details

Summary

py-django-common consists of the following things:

  • Middleware that makes sure a web-app runs either on or without "www" in the domain.
  • "SessionManagerBase" base class, that helps in keeping session related code object-oriented and clean.
  • "EmailBackend" for authenticating users based on their email, apart from username.
  • Custom db fields that can be used in models including a "UniqueHashField" and "RandomHashField".
  • Bunch of helpful functions in helper.py
  • "render_form_field" template tag that makes rendering form fields easy and DRY.
  • Couple of dry response classes: "JsonResponse" and "XMLResponse" in the django_common.http that can be used in views that give json/xml responses.

WWW: https://github.com/tivix/django-common/

Test Plan
  • poudriere (11.2-, 12.0-RELEASE, 13.0-CURRENT@r344874 amd64 + i386) for each py27 + py36 flavor -> OK
  • portlint -> OK
  • Runtime tests -> OK

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 23008
Build 22081: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 14 2019, 12:37 PM
This revision was automatically updated to reflect the committed changes.