Skip to content

Instantly share code, notes, and snippets.

@iamawmrit
Last active October 18, 2022 11:54
Show Gist options
  • Save iamawmrit/748e53cb77a1d23195877d86a70e0fe0 to your computer and use it in GitHub Desktop.
Save iamawmrit/748e53cb77a1d23195877d86a70e0fe0 to your computer and use it in GitHub Desktop.
Code $Profile for oh my poush
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression
Import-Module -Name Terminal-Icons
Import-Module -Name PSReadLine
Set-PSReadLineOPtion -PredictionSource History
function django_runserver {
python manage.py runserver
}
function make_migrations {
python manage.py makemigrations
}
function migrate {
python manage.py migrate
}
function django_shell {
python manage.py shell
}
function django_create_super_user {
python manage.py createsuperuser
}
function django_start_app {
python manage.py startapp $args
}
function django_start_project {
django-admin startproject $args
}
function django_collect_static {
python manage.py collectstatic
}
function django_test {
python manage.py test
}
function create_virtual_environment {
python -m venv .venv
}
function activate_virtual_environment {
.\.venv\Scripts\activate
}
Set-Alias run django_runserver
Set-Alias mkmig make_migrations
Set-Alias mig migrate
Set-Alias shell django_shell
Set-Alias super django_create_super_user
Set-Alias startapp django_start_app
Set-Alias startproject django_start_project
Set-Alias collect django_collect_static
Set-Alias djtest django_test
Set-Alias venv create_virtual_environment
Set-Alias act activate_virtual_environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment