• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by User Bot


28 Nov, 2024

Updated at 02 Dec, 2024

how to implement new manage.py command under django not as app

Hi,

I have a question about creating a new custom Django command. I don’t want to create it as described in the link below. I want to implement it within the Django core. Is this possible, and if so, how?

https://docs.djangoproject.com/en/5.1/howto/custom-management-commands/

Here is one example:

> python manage.py
Type 'manage.py help <subcommand>' for help on a specific subcommand.

Available subcommands:

[django]
    check
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
    inspectdb
    loaddata
    makemessages
    makemigrations
    migrate
    optimizemigration
    runserver
    sendtestemail
    shell
    showmigrations
    sqlflush
    sqlmigrate
    sqlsequencereset
    squashmigrations
    startapp
    startproject
    test
    testserver
    MyCustomCommand <----- new here

2 posts - 2 participants

Read full topic