Skip to main content

No project description provided

Project description

An implementation of model-attribute-value for Django, without using generic relations.

Installation

  1. 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 ..

  2. Add to INSTALLED_APPS in your settings.py:

    'mav',

  3. 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.

https://github.com/zostera/django-mav/issues

License

You can use this under the MIT License. See LICENSE file for details.

Author

Developed and maintained by Zostera.

Original author & Development lead: Dylan Verheul.

Thanks to everybody that has contributed pull requests, ideas, issues, comments and kind words.

Please see AUTHORS.rst for a list of contributors.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-mav-0.1.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file django-mav-0.1.tar.gz.

File metadata

  • Download URL: django-mav-0.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-mav-0.1.tar.gz
Algorithm Hash digest
SHA256 86eee67658842495f9a6a973deb1d359c5616519c98f57684ffdcb91dca910af
MD5 a3f281297bd49d9e40dfce651e2a59df
BLAKE2b-256 cf1d42820be415d82f79a4e22e600a3ee34f4e18518527eb0fd87a670c8f1e5b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page