Exec is new command scoped under compose. It allows sending commands directly into appserver container. I will make this customizable/controllable in the future.
38 lines
719 B
Rust
38 lines
719 B
Rust
use std::path::PathBuf;
|
|
|
|
use clap::Parser;
|
|
|
|
// TODO: (matej) dsu template command
|
|
|
|
#[derive(Parser, Debug)]
|
|
pub enum Django {
|
|
/// Prepare empty management command 'command' in app 'app'.
|
|
MakeCommand {
|
|
#[arg(value_enum)]
|
|
app: PathBuf,
|
|
#[arg(value_enum)]
|
|
name: String,
|
|
},
|
|
|
|
/// Run Django's manage.py makemigrations.
|
|
Makemigrations,
|
|
|
|
/// Pass arguments to Django's manage.py.
|
|
Manage {
|
|
#[arg(value_enum)]
|
|
rest: Vec<String>,
|
|
},
|
|
|
|
/// Run Django's manage.py migrate.
|
|
Migrate {
|
|
#[arg(value_enum)]
|
|
rest: Vec<String>,
|
|
},
|
|
|
|
/// Run Django's manage.py shell.
|
|
Shell,
|
|
|
|
/// Run Django's manage.py test.
|
|
Test,
|
|
}
|