I am getting an error in model_factory from trying to POST a new model
object. I am using google appengine if that is relevant.
The collection is defined as:
account_resource = Collection(
queryset = Account.objects.all(),
responder = JSONResponder(),
permitted_methods = ('GET', 'POST', 'PUT', 'DELETE'),
expose_fields = ('aaa', 'bbb', 'ccc')
Does anyone have any idea how to fix it?
The stack trace is:
Environment:
Request Method: POST
Request URL:
http://localhost:8000/data/account/
Django Version: 1.0-beta_2-SVN-268
Python Version: 2.5.2
Installed Applications:
('appengine_django', 'django.contrib.auth', 'moolah')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Traceback:
File "django/core/handlers/base.py" in get_response
86. response = callback(request, *callback_args,
**callback_kwargs)
File "django_restapi/model_resource.py" in __call__
123. return self.dispatch(request, self)
File "django_restapi/resource.py" in dispatch
75. return target.create(request, *args, **kwargs)
File "django_restapi/model_resource.py" in create
142. ResourceForm =
models.modelform_factory(self.queryset._model_class,
form=self.form_class)
File "django/forms/models.py" in modelform_factory
234. 'formfield_callback':
formfield_callback})
File "django/forms/models.py" in __new__
168. attrs)
Exception Type: TypeError at /data/account/
Exception Value: metaclass conflict: the metaclass of a derived class
must be a (non-strict) subclass of the metaclasses of all its bases