dlamotte / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

Admin-field doesn't display on - TagField property named like an existing method #176

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I today searched for this issue for quite some time: When I have a property
"tags" which is a TagField, and also a model-method named "tags" for
retrieving those models tags, then the TagField doesn't get displayed in
the auto-admin. 

If you renamed the "tags"-method to "get_tags", it works. Django natively
supports functions named like properties. 

Original issue reported on code.google.com by tim.ad...@gmx.de on 25 Nov 2008 at 5:29

GoogleCodeExporter commented 8 years ago
This sounds like fundamental Python mishap. You can't name a field and method 
the same thing and expect 
them to work independently. They are all still attributes of the same class. 
One will override the other.

Original comment by bros...@gmail.com on 22 Jan 2010 at 9:57