Skip to content

jefftriplett/django-cli-no-admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

django-cli-no-admin

Use the Django CLI using "django" without typing "django-admin".

django-cli-no-admin is a config-only project that creates a django command and nothing more. With this package, you can use the django command instead of django-admin to execute management commands in your Django project.

Note

This package will eventually become unnecessary once DEP 16 is fully implemented in Django core. DEP 16 proposes renaming the main Django command from django-admin to django. Track the implementation progress in django/deps#100.

See the blog post: https://micro.webology.dev/2024/12/14/new-project-to.html

Installation

You can install django-cli-no-admin using pip:

pip install django-cli-no-admin

Or, if you prefer uv:

uv pip install django-cli-no-admin

Usage

Once installed, you can use django from the command line in place of django-admin:

django startproject myproject

Or any other Django admin command:

django startapp myapp

Running Project-Specific Commands

By default, the django command works with Django's built-in admin commands (like startproject, startapp, etc.). To run project-specific management commands from your manage.py (like runserver, migrate, makemigrations, etc.), you'll need to set the DJANGO_SETTINGS_MODULE environment variable:

export DJANGO_SETTINGS_MODULE=myproject.settings
django runserver

Or set it inline:

DJANGO_SETTINGS_MODULE=myproject.settings django migrate

This tells Django where to find your project's settings, allowing you to access all the commands that would normally be available through manage.py.

No Additional Setup Required

There are no additional dependencies or configurations needed. Simply install the package, and you're ready to go. If you need to run project-specific commands, just remember to set DJANGO_SETTINGS_MODULE as shown above.

License

django-cli-no-admin is licensed under the BSD License. See the LICENSE.txt file for details.

About

Use the Django CLI using "django" without typing "django-admin".

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published