diff --git a/Watcher/Watcher/accounts/migrations/0001_initial.py b/Watcher/Watcher/accounts/migrations/0001_initial.py new file mode 100644 index 0000000..443e1e6 --- /dev/null +++ b/Watcher/Watcher/accounts/migrations/0001_initial.py @@ -0,0 +1,27 @@ +# Generated by Django 5.0.2 on 2024-07-24 12:07 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('knox', '0008_remove_authtoken_salt'), + ] + + operations = [ + migrations.CreateModel( + name='APIKey', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('auth_token', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='knox.authtoken')), + ], + options={ + 'verbose_name': 'API Key', + 'verbose_name_plural': 'API Keys', + }, + ), + ] diff --git a/Watcher/Watcher/accounts/models.py b/Watcher/Watcher/accounts/models.py index a1eeaf9..f50ec32 100644 --- a/Watcher/Watcher/accounts/models.py +++ b/Watcher/Watcher/accounts/models.py @@ -16,7 +16,7 @@ def __str__(self): class Meta: verbose_name = "API Key" verbose_name_plural = "API Keys" - app_label = 'auth' + app_label = 'accounts' def make_inactive(sender, user, **kwargs):