1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.
An implementation of model-attribute-value for Django, without using generic relations.
Installation
Install using pip (soon - use GitHub for now):
pip install django-mav
Alternatively, you can install download or clone this repo and call pip install -e ..
Add to INSTALLED_APPS in your settings.py:
'mav',
In your models, decorate models that need to store model-attribute-values with @mav.
Example code (foo/models.py)
from django.db import models
from mav.decorators import mav
@mav
class Foo(models.Model):
name = models.CharField(max_length=100)
# The @mav decorator will generate a FooAttr class in mav.attrs:
class FooAttr(AbstractModelAttribute):
# Inherited from AbstractModelAttribute
attribute = models.ForeignKey(Attribute)
value = models.TextField(...)
# Generated
object = models.ForeignKey(Foo, related_name='attrs')
Documentation
TODO
Requirements
Python 2.6, 2.7, 3.2 or 3.3
Django >= 1.4
Contributions and pull requests for other Django and Python versions are welcome.
Bugs and requests
If you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.
License
You can use this under the MIT License. See LICENSE file for details.
Metadata
Release files for django-mav 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
File added late
1 file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-mav-0.1.tar.gz | 9.4 kB | Details |
Release files / django-mav-0.1.tar.gz
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | django-mav-0.1.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86eee67658842495f9a6a973deb1d359c5616519c98f57684ffdcb91dca910af
|
|
BLAKE2b-256 checksum How to use checksums |
cf1d42820be415d82f79a4e22e600a3ee34f4e18518527eb0fd87a670c8f1e5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |