LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

django-admin

Django command-line utility for administrative tasks

TLDR

Start a new project
$ django-admin startproject [project_name]
copy
Start a new app
$ django-admin startapp [app_name]
copy
Run development server
$ django-admin runserver
copy
Create database migrations
$ django-admin makemigrations
copy
Apply database migrations
$ django-admin migrate
copy
Create superuser
$ django-admin createsuperuser
copy
Open Django shell
$ django-admin shell
copy

SYNOPSIS

django-admin command [options]

DESCRIPTION

django-admin is Django's command-line utility for administrative tasks. It provides commands for project setup, database management, testing, and development server operation.The tool requires a Django settings module to function. When inside a project directory, it automatically discovers the settings; otherwise, the DJANGOSETTINGSMODULE environment variable or --settings flag specifies the configuration.django-admin is typically aliased or replaced by manage.py within projects, which automatically configures the settings module. Both provide identical functionality.

PARAMETERS

COMMAND

Django management command to execute.
startproject NAME
Create new Django project.
startapp NAME
Create new Django app.
runserver [PORT]
Run development server.
makemigrations [APP]
Create migration files.
migrate [APP]
Apply migrations.
createsuperuser
Create admin user.
shell
Open interactive Python shell with Django context.
--settings MODULE
Settings module to use.
--help
Display help information.

CONFIGURATION

settings.py

Django project settings module controlling database, installed apps, middleware, and all configuration.
manage.py
Project-specific wrapper around django-admin that sets the settings module automatically.

INSTALL

sudo apk add py3-django
copy

CAVEATS

Requires Django installed. Some commands require configured settings and database. Development server not suitable for production. Migration commands require database access.

HISTORY

django-admin is part of Django, created by Adrian Holovaty and Simon Willison at the Lawrence Journal-World newspaper. Django was released as open source in 2005 and has become one of the most popular Python web frameworks.

SEE ALSO

python(1), pip(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid