This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
A collection of Django 1.5+ and Django Rest Framework 3.0+ utilities

installation

You can use pip to install the package:

$ pip install djenerics

Then add it to the list of installed apps:

INSTALLED_APPS = (
    'djenerics'
)

model mixins

The following mixins are available for your model classes:

Timestampable
Provides created_at and updated_at fields.
Ownerable
Provides a owner field which references settings.AUTH_USER_MODEL

view mixins

The following mixins are available for your view classes:

SelectRelatable
Provides a class variable select_related that allows you to provide a tuple or list of related models to perform a select_related on.

django-rest-framework filter backend

A custom filter backend that provides a generic filter query string parameter.

Convert a search query into a dictionary.

A search query like this one:

party: stakker is akker category:"hiha hoi"

Will be converted to a python dict:

{
    'category': 'hiha hoi',
    'party': None,
    'search': 'stakker is akker'
}

It uses a regular expression to split every token on the : separator instead of using the string.split() function. This is important to distinguish between the following use cases:

- 'party:'        => {'party': None}
- 'party:tester'  => {'party': 'tester'}
- 'party: tester' => {'search': 'party: tester'}

django-rest-framework serializer mixins

The following mixins are available for your serializer classes:

Projectable

Gives your api consumers the ability to control what fields are included in the api response using a configurable query string parameter (defaults to _fields).

E.g. a GET /resources?_fields=name,description,count will only return the specified 3 fields of the resource.

Ownerable
Limit the related field options to only those records owned by the current logged in user.
Release History

Release History

1.2.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
djenerics-1.2.0.tar.gz (5.2 kB) Copy SHA256 Checksum SHA256 Source Oct 22, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting