Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A reusable django application to create a proxy object for your models. Intended to aggregate various content types into a model for reuse. A poor man's django-tumbleweed.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 django_proxy
Octocat-spinner-32 docs
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 AUTHORS
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.textile
Octocat-spinner-32 runtests.py
Octocat-spinner-32 setup.py
README.textile

Introduction

A reusable Django application to create a proxy object for your models.
Intended to aggregate various content types into a model for reuse.

Current implementation example:

    from django.db import models
    from django.db.models import signals
    from django_proxy.signals import proxy_save, proxy_delete
    ...

    class Post(models.Model):
        STATUS_CHOICES = (
            (1, _('Draft')),
            (2, _('Public')),
        )

        title = models.CharField(max_length=150)
        body = models.TextField()
        tag_data = TagField()
        status = models.IntegerField(_('status'), choices=STATUS_CHOICES, 
                                    default=2)

        class ProxyMeta:
            title = 'title'
            description = 'body'
            tags = 'tag_data'
            active = {'status':2}


    signals.post_save.connect(proxy_save, Post, True)
    signals.post_delete.connect(proxy_delete, Post)

Dependencies

Nothing external. No contrib apps. Just Django proper.

TODO

  • Decouple further via signals possibly, removing ProxyMeta from the design

Examples

To see this project in use, take a peek at Django-Mingus and how combined with django-basic-apps it leverages the solution.

Something went wrong with that request. Please try again.