A CLI tool to bootstrap a production-ready Django REST Framework project in seconds.
Project description
Django Shortcut
A command-line tool for bootstrapping a production-ready Django REST Framework project.
Features
- Creates a Python virtual environment
- Installs Django and Django REST Framework
- Configures JWT Authentication
- Creates a
.envfile - Configures CORS, Static, and Media settings
- Runs initial database migrations
- Initializes a Git repository
- Generates a
requirements.txtfile
Requirements
- Python 3.8+
- Git (optional, for repository initialization)
Installation
Install from PyPI:
pip install django-shortcut
Verify the installation:
dj-shortcuts --help
Usage
Create a new project:
dj-shortcuts <project_name>
Example:
dj-shortcuts ecommerce_api
Create a project in a custom directory:
dj-shortcuts ecommerce_api --target C:\Projects
or
dj-shortcuts ecommerce_api -t C:\Projects
Alternative Usage
If the CLI command is unavailable (for example, if your Python Scripts directory is not in your system PATH), run the module directly:
python -m django_shortcuts.cli <project_name>
Example:
python -m django_shortcuts.cli ecommerce_api
Generated Project
The generated project includes:
- Python virtual environment
- Django project structure
- Django REST Framework
- JWT Authentication
- CORS configuration
- Environment variable support
- Static and Media configuration
- Git repository
requirements.txt
After Project Creation
Navigate to the project directory:
cd ecommerce_api
Activate the virtual environment.
Windows
venv\Scripts\activate
Linux/macOS
source venv/bin/activate
Start the development server:
python manage.py runserver
Visit:
http://127.0.0.1:8000/
Admin panel:
http://127.0.0.1:8000/admin/
Updating
Upgrade to the latest version:
pip install --upgrade django-shortcut
Troubleshooting
Command not found
If you receive:
'dj-shortcuts' is not recognized as an internal or external command
Run the CLI directly:
python -m django_shortcuts.cli <project_name>
Alternatively, add your Python Scripts directory to your system PATH.
Repository
GitHub:
https://github.com/ihmnoyon/django-shortcut
License
Released under the MIT License.
Author
Mahedi Hasan Noyon
- GitHub: https://github.com/imhnoyon/
- Portfolio: https://mahed.pythonanywhere.com/
- Email: mahedi.dev2002@gmail.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_shortcut-0.1.3.tar.gz.
File metadata
- Download URL: django_shortcut-0.1.3.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee02ba2236626fc5b88c9c59f98ea70d6ac62265e0f05b0b6285bcc0f89de70f
|
|
| MD5 |
4470be39ac7591a6aa7dd9a14f4c6131
|
|
| BLAKE2b-256 |
b55829c48e0059931eeaa4daa891b930717229e9b0fb7a7d7c19f148f6a0492e
|
File details
Details for the file django_shortcut-0.1.3-py3-none-any.whl.
File metadata
- Download URL: django_shortcut-0.1.3-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
622e4eae93c711e476b6bd14b4ba303451266e88906e6e803f7ffc3df914bd8d
|
|
| MD5 |
5f351abf710f74c1c54a303b1dcdc464
|
|
| BLAKE2b-256 |
66134f5095f6ad54430b501c03468b99bf334f1064e7c1c2d79ad7252112ac60
|