Closed joshblum closed 8 years ago
Good idea, I can vouch for that. Could they be set to default values, though? :)
I'm having the issue that my source code has classes with the same name and no related_name
specified so having unique names for the library would be best
Well you can always argue if that's a problem with django-nyt or your application ;) I don't know if there is any best practices about these things, but I would agree that it's not nice if two third parties started clashing on something like this, so maybe let's make them unique and hope we don't create too much misery :)
On 22 September 2014 22:25, Joshua Blum notifications@github.com wrote:
I'm having the issue that my source code has classes with the same name and no related_name specified so having unique names for the library would be best
— Reply to this email directly or view it on GitHub https://github.com/benjaoming/django-nyt/issues/4#issuecomment-56437157.
Prefixing whatever the key is with django_nyt
is probably best. I think the library should take care of it since you want a simple integration and not have to modify your source beyond settings.py
and urls.py
:)
I would prefer not using django_nyt
as a prefix, since code that uses reverse relations would look quite ugly. Having "pretty" related_names shouldn't be that hard.
This will be fixed in the 1.0 release.
Can a
related_name
field be added to the different models ? There is the possibility of conflict with other django applications when these are not specified.