django-exmodel
The ex-model lets you extend models in apps by adding mixins to them. The mixins can override fields and methods of the original model.
Example:
# file: staff.models
from django.db import models
from exmodel import Model, extend_model
class Person(Model):
name = models.CharField(max_lenth=10)
def __unicode__(self):
return self.name
class Meta:
app_label = 'staff'
verbose_name = 'Person name'
class PersonMixin(object):
name = models.CharField(max_lenth=500)
alias = models.CharField(max_lenth=500)
def __unicode__(self):
return u'%s (%s)' % (self.name, self.alias)
class Meta:
verbose_name = 'Person name and alias'
extend_model('staff.Person', PersonMixin)
Metadata
Release files for django-exmodel 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-exmodel-0.0.2.tar.gz | 8.0 kB | Without provenance | Details |
Release files / django-exmodel-0.0.2.tar.gz
| Download URL | django-exmodel-0.0.2.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e165f51f54b9d1e16dd778cef466f1f02fbbc858b164a24ebc60373e07752259
|
|
BLAKE2b-256 checksum How to use checksums |
1e6c48705a6cff7f72c2855e99151500b41cc0df6457704ae34158c7e1ccb954
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-exmodel 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.