Thursday, September 1, 2016

Re: Disadvantages of using model name rather than model class for FK field?

On 1 September 2016 at 11:55, James Beith <james@beith.co.uk> wrote:
> By using a model name there are fewer imports at the top of the module and
> fewer occurrences of circular import dependencies between Django
> applications. What are the disadvantages to using a model name and why not
> always use them?


totally a wrong reason, but i like using classes instead of names
because that way it feels more "programming" and less "configuration".

a _possible_ (but not really convincing) reason would be that it makes
it easier for tools (syntax highlight, autocompleting editors, static
analyzers...) to detect typos.

--
Javier

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFkDaoQhr%2BjVo5PRS%2B5x-0j88r-4VEafVk0Pz7Cg-foUsWX7Qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment