AttributeError: urls when running example code #2

Open
dungtn opened this Issue Sep 26, 2012 · 2 comments

Comments

Projects
None yet
3 participants

dungtn commented Sep 26, 2012

Hi team,

This error happened when api objects try to append 'Resource' urls to pattern_urls:
https://github.com/toastdriven/django-tastypie/blob/master/tastypie/api.py#L98
while ExtendedModelResource's object has no attribute "urls"

I traced through the ExtendedModelResource initial process and see there's no update call for "base_fields" in ExtendedDeclarativeMetaclass which result the new_class.base_fields has only "redirect_url" attribute. And since Resource.init just make a deep copy from "base_fields" to "fields", the newly created object has no attribute "urls".

I would like to fix that, but I'm not certain about what should be updated to the "base_fields". Please give some feedback :)

henward0 commented Dec 5, 2012

Hello - I have run into the same problem. Has there been a fix for it?

Hi, I have the same problem. Can you fix that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment