Neew-admin registration syntax used on other apps?

1 view
Skip to first unread message

flo...@gmail.com

unread,
Mar 5, 2007, 4:32:35 PM3/5/07
to django-hotclub
It occurs to me that the new syntax [1] for the new-admin branch is
just a generally good way of associating various models with some
application. I think that this could be generalized with some sort of
object/app registration class. At the very least, a standard could be
decided upon for syntax.

As a toy example, let's say I have an app which generates metadata
about all models (maybe how many there are of each model or
something).

from django.db import models
from django.contrib import registration

class Poll(models.Model):
some_field = models.CharField(maxlength=100)

registration.site.register(Poll, 'mysite.metadata')

What does everyone think about this?

[1] http://groups.google.com/group/django-developers/browse_thread/thread/f002f89b656973c4

Reply all
Reply to author
Forward
0 new messages