burke-software / django-report-utils

Common functions used for reporting needs. Used by django-report-builder and django-report-scaffold.
Other
10 stars 27 forks source link

model_name does not exist in _meta, object_name does #5

Closed joshcartme closed 10 years ago

joshcartme commented 10 years ago

I was setting up django-admin-export with Django 1.6 and came across an attribute error. It seems that model_name should be object_name.

bufke commented 10 years ago

Hello, I'd like to understand this a bit more. Under what circumstances does model_name not exist? We use 1.6 in production and it hasn't been an issue.

If you can provide some evidence that object_name is more correct I'd be happy to accept this. It appears object_name is just a lowercase of model_name.

https://github.com/django/django/blob/master/django/db/models/options.py#L121

joshcartme commented 10 years ago

You know what, I thought I was running this against 1.6, but now that I'm looking more closely, that wasn't the case, I was on 1.5. Sorry for the noise and thanks for admin-export!