[GSOC 2024] Auto-importing in the shell

Happy with the plan - will add small comments

Agreed
I think I this was discussed here and as long as the precedence is documented and clear - I think it’s wise to treat handling of collisions as a new feature which we should wait till folks say they need it before we provide a solution

A new flag is added and documented to avoid auto imports altogether (--no-imports).

Happy with this or a variation of this :+1:

An idea could be to have something like --imports which defaults to 0, and 1 would have the model imports (2 could have models + more stuff in future :thinking:). Then in a future release we could change the default to 1 if this was wanted (so it’s adds this in steps). But might not be a good idea :+1:

Due to conflicting/duplicate names, I think only print the ones that end up in the name space (so no Model is mentioned twice) and maybe ModelA (myapp.models) and mention the format like <object name> (path).

2 Likes

I think the current output already aligns closely with this suggestion since it includes the module name. For example, in the case of ModelA, it would print something like from myapps.models import ModelA. Does this meet your expectations, or is there a specific tweak you’d like to see?

I agree, I think this is good
I wasn’t sure if the suggestion to update the -v 2 output was asking for the paths to be removed

It wasn’t the intention to remote the paths, sorry for the confusion in how I presented the proposal. But I would like the list to be intended one level in so it’s clearly visible what’s the “phrase/intro” and what’s the list.