﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30003	Manage.py entry point	James Pic	nobody	"Currently, manage.py-tpl executes in an 
{{{
if __name__ == '__main__':
}}}
 block.

While this might work when declaring manage.py as script in setup.py, a popular convention is to use the console_scripts entry_point in setup.py to define commands.

For manage.py-tpl to support console_scripts entry_point we only need to move the code from the if block into a new function ie. main(), then call main() it in the if-block.

Then, manage.py-tlp will also work as console_scripts entry_point with yourproject.manage:main, and using manage.py as script will also still work.

This removes a manual effort every time a project defines a console_scripts entry_point for the management CLI, without having to set DJANGO_SETTINGS_MODULE."	New feature	new	Core (Management commands)	2.1	Normal			James Pic	Unreviewed	1	0	0	0	0	0
