diff --git a/deploy.sh b/deploy.sh index d39ae9a..de49444 100755 --- a/deploy.sh +++ b/deploy.sh @@ -85,14 +85,14 @@ function validate { # note: this logic is duplicated in the `./github/workflows/lint_python.yml` config # if you update this file, you should update that as well echo "running black" - black --diff --color --check -l 79 "$check_path" + black --exclude "migrations/*" --diff --color --check -l 79 "$check_path" echo "running codespell" codespell --skip="./.git,./package.json,./package-lock.json,./node_modules" "$check_path" echo "running flake8" - flake8 "$check_path" --count --max-complexity=10 --max-line-length=79 \ - --show-source --statistics + flake8 "$check_path" --exclude "migrations" --count --max-complexity=10 \ + --max-line-length=79 --show-source --statistics echo "running isort" - isort --check-only --diff --profile black -l 79 "$check_path" + isort --skip "migrations" --check-only --diff --profile black -l 79 "$check_path" printf " \n> all validations passed\n" } diff --git a/docker_assets/run.sh b/docker_assets/run.sh index e8a4cd2..686624e 100644 --- a/docker_assets/run.sh +++ b/docker_assets/run.sh @@ -4,7 +4,6 @@ set -e # django setup -python manage.py makemigrations python manage.py migrate if [[ -z "$DJANGO_DEBUG" ]]; then diff --git a/tubearchivist/home/migrations/0001_initial.py b/tubearchivist/home/migrations/0001_initial.py new file mode 100644 index 0000000..fb51fff --- /dev/null +++ b/tubearchivist/home/migrations/0001_initial.py @@ -0,0 +1,35 @@ +# Generated by Django 4.1.5 on 2023-02-02 06:49 + +from django.db import migrations, models +import home.models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ] + + operations = [ + migrations.CreateModel( + name='Account', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('name', models.CharField(max_length=150, unique=True)), + ('is_staff', models.BooleanField(default=False)), + ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), + ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), + ], + options={ + 'abstract': False, + }, + managers=[ + ('objects', home.models.AccountManager()), + ], + ), + ]