Hi All,
Others have experiemented with using the zope component architecture
in Django, with great results:
http://www.stereoplex.com/two-voices/adapters-in-django-and-the-revenge-of-zope
I'd really like to make use of it too, but I'm finding whenever I say
one of my Django models implements an interface, various Django
internal functions appear to be introspecting the model object and
having problems with the interface declaration.
If you're not familiar with what an implements declaration looks like,
it looks like this. e.g. for an Article model
from zope.interface import implements
from django.db import models
class Article(models.Model):
implements(IArticle)
title = models.CharField(max_length=100, help_text="The title of the
article.")
....
And when I try to bring up a page using this model:
Exception Type: ImproperlyConfigured
Exception Value: Error while importing URLconf '<myproject>.urls':
'__implements_advice_data__'
Exception Location: /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/django/core/urlresolvers.py in
_get_urlconf_module, line 255
It works fine when I get rid of the interface decalaration on the
article. I've also seen the similar error using
django.db.models.permalink.
Sorry for the bad analysis here, but first I'd like to see if anyone
else is using zope.interface in their models?
Robert
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---