You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to mongoengine 0.10.x I get this error:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/init.py", line 37, in import_module import(name)
File "/data/crits/crits/urls.py", line 46, in
from crits.actors.api import ActorResource, ActorIdentifierResource
File "/data/crits/crits/actors/api.py", line 11, in
class ActorResource(CRITsAPIResource):
File "/Library/Python/2.7/site-packages/tastypie_mongoengine/resources.py", line 225, in new
new_class.base_fields.update(new_class.get_fields(include_fields, excludes))
File "/Library/Python/2.7/site-packages/tastypie_mongoengine/resources.py", line 725, in get_fields
'help_text': f.help_text ,
AttributeError: 'StringField' object has no attribute 'help_text'
If I comment out the line 725 in resources.py, it fixes it for me, but perhaps there's something that I'm missing in my app, that could fix it.
Thanks,
-A
The text was updated successfully, but these errors were encountered:
Perhaps changing the code in resources.py to something like this would help:
kwargs = {
'attribute': name,
'unique': f.unique or primary_key,
'null': not f.required and not primary_key,
}
if hasattr(f, 'help_text'):
kwargs['help_text'] = f.help_text
It fixes it for me.
Thanks!
pavanv
added a commit
to pavanv/django-tastypie-mongoengine
that referenced
this issue
Jul 22, 2016
After upgrading to mongoengine 0.10.x I get this error:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/data/crits/crits/urls.py", line 46, in
from crits.actors.api import ActorResource, ActorIdentifierResource
File "/data/crits/crits/actors/api.py", line 11, in
class ActorResource(CRITsAPIResource):
File "/Library/Python/2.7/site-packages/tastypie_mongoengine/resources.py", line 225, in new
new_class.base_fields.update(new_class.get_fields(include_fields, excludes))
File "/Library/Python/2.7/site-packages/tastypie_mongoengine/resources.py", line 725, in get_fields
'help_text': f.help_text ,
AttributeError: 'StringField' object has no attribute 'help_text'
If I comment out the line 725 in resources.py, it fixes it for me, but perhaps there's something that I'm missing in my app, that could fix it.
Thanks,
-A
The text was updated successfully, but these errors were encountered: