diff --git a/rememB/balanceapp/migrations/0001_initial.py b/rememB/balanceapp/migrations/0001_initial.py new file mode 100644 index 0000000..39f7c8b --- /dev/null +++ b/rememB/balanceapp/migrations/0001_initial.py @@ -0,0 +1,39 @@ +# Generated by Django 4.0.6 on 2022-07-18 12:06 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('mainapp', '0002_user_delete_blog'), + ] + + operations = [ + migrations.CreateModel( + name='Answer', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('answer_content', models.CharField(max_length=200)), + ], + ), + migrations.CreateModel( + name='Question', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('question_content', models.CharField(max_length=200)), + ], + ), + migrations.CreateModel( + name='Balance', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('answer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='balanceapp.answer')), + ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='balanceapp.question')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainapp.user')), + ], + ), + ] diff --git a/rememB/letterapp/migrations/0001_initial.py b/rememB/letterapp/migrations/0001_initial.py new file mode 100644 index 0000000..84c56c4 --- /dev/null +++ b/rememB/letterapp/migrations/0001_initial.py @@ -0,0 +1,28 @@ +# Generated by Django 4.0.6 on 2022-07-18 12:06 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('mainapp', '0002_user_delete_blog'), + ] + + operations = [ + migrations.CreateModel( + name='Letter', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('letter_content', models.CharField(max_length=300)), + ('img_no', models.IntegerField()), + ('created_at', models.DateTimeField(auto_now=True)), + ('position_x', models.IntegerField()), + ('position_y', models.IntegerField()), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainapp.user')), + ], + ), + ] diff --git a/rememB/letterapp/serializers.py b/rememB/letterapp/serializers.py new file mode 100644 index 0000000..e69de29 diff --git a/rememB/mainapp/migrations/0002_user_delete_blog.py b/rememB/mainapp/migrations/0002_user_delete_blog.py new file mode 100644 index 0000000..75cc6b8 --- /dev/null +++ b/rememB/mainapp/migrations/0002_user_delete_blog.py @@ -0,0 +1,27 @@ +# Generated by Django 4.0.6 on 2022-07-18 12:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('mainapp', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='User', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.CharField(max_length=100)), + ('name', models.CharField(max_length=100)), + ('birthyear', models.CharField(max_length=100)), + ('birthday', models.CharField(max_length=100)), + ('email', models.CharField(max_length=100)), + ], + ), + migrations.DeleteModel( + name='Blog', + ), + ] diff --git a/rememB/mainapp/models.py b/rememB/mainapp/models.py index 5751157..f57f666 100644 --- a/rememB/mainapp/models.py +++ b/rememB/mainapp/models.py @@ -1,6 +1,4 @@ from django.db import models -<<<<<<< HEAD -======= class User(models.Model): uuid = models.CharField(max_length=100) @@ -9,4 +7,3 @@ class User(models.Model): birthday = models.CharField(max_length=100) email = models.CharField(max_length=100) ->>>>>>> develop diff --git a/rememB/rememB/settings.py b/rememB/rememB/settings.py index d9eebb5..b67f747 100644 --- a/rememB/rememB/settings.py +++ b/rememB/rememB/settings.py @@ -50,9 +50,10 @@ #provider 'allauth.socialaccount.providers.google', 'allauth.socialaccount.providers.naver', + 'allauth.socialaccount.providers.kakao', #restframework - 'rest_famework', + 'rest_framework', ] MIDDLEWARE = [ @@ -143,5 +144,7 @@ 'allauth.account.auth_backends.AuthenticationBackend' ) -SITE_ID=1 -LOGIN_REDIRECT_URL='/' +SITE_ID = 1 +LOGIN_REDIRECT_URL = '/' #로그인 후 리디렉션할 페이지 +ACCOUNT_LOGOUT_REDIRECT_URL ='/' #로그아웃 후 리디렉션 할 페이지 +ACCOUNT_LOGOUT_ON_GET = True #로그아웃 버튼 클릭 시 자동 로그아웃 diff --git a/rememB/userapp/templates/userapp/login.html b/rememB/userapp/templates/userapp/login.html index 40a9171..c632825 100644 --- a/rememB/userapp/templates/userapp/login.html +++ b/rememB/userapp/templates/userapp/login.html @@ -13,5 +13,7 @@ 구글 로그인
네이버 로그인 +
+ 카카오 로그인 {% endif %} \ No newline at end of file