Opened 6 years ago

Last modified 6 years ago

#30003 closed Cleanup/optimization

Manage.py entry point — at Initial Version

Reported by: James Pic Owned by: nobody
Component: Core (Management commands) Version: 2.1
Severity: Normal Keywords:
Cc: James Pic Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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 entry_point feature of setup.py.

To add support for entry_point in manage.py-tpl we only need to move the code from the if block into a new function ie. main() and call in it in the if-block.

Then, manage.py-tlp will also work as entry_point with yourproject.manage:main and using manage.py as script will also still work.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top