Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/montylounge/django-proxy
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.
https://github.com/montylounge/django-proxy
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/montylounge/django-proxy
- Owner: montylounge
- License: bsd-3-clause
- Created: 2009-05-27T16:34:32.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-01-30T18:31:19.000Z (almost 15 years ago)
- Last Synced: 2024-07-15T15:42:26.190Z (5 months ago)
- Language: Python
- Homepage:
- Size: 98.6 KB
- Stars: 20
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.textile
- License: LICENSE
Awesome Lists containing this project
README
h1. 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)h2. Dependencies
Nothing external. No contrib apps. Just Django proper.
h2. TODO
* Decouple further via signals possibly, removing ProxyMeta from the design
h3. Examples
To see this project in use, take a peek at "Django-Mingus":http://github.com/montylounge/django-mingus and how combined with django-basic-apps it leverages the solution.