diff --git a/rememB/balanceapp/migrations/0001_initial.py b/rememB/balanceapp/migrations/0001_initial.py deleted file mode 100644 index 39f7c8b..0000000 --- a/rememB/balanceapp/migrations/0001_initial.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 deleted file mode 100644 index 84c56c4..0000000 --- a/rememB/letterapp/migrations/0001_initial.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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/mainapp/migrations/0002_user_delete_blog.py b/rememB/mainapp/migrations/0002_user_delete_blog.py deleted file mode 100644 index 75cc6b8..0000000 --- a/rememB/mainapp/migrations/0002_user_delete_blog.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 f57f666..5751157 100644 --- a/rememB/mainapp/models.py +++ b/rememB/mainapp/models.py @@ -1,4 +1,6 @@ from django.db import models +<<<<<<< HEAD +======= class User(models.Model): uuid = models.CharField(max_length=100) @@ -7,3 +9,4 @@ class User(models.Model): birthday = models.CharField(max_length=100) email = models.CharField(max_length=100) +>>>>>>> develop diff --git a/rememB/mainapp/urls.py b/rememB/mainapp/urls.py index 5d2ec73..52a7106 100644 --- a/rememB/mainapp/urls.py +++ b/rememB/mainapp/urls.py @@ -2,5 +2,5 @@ from . import views urlpatterns=[ - path('login/',views.login, name='login'), -] + +] \ No newline at end of file diff --git a/rememB/mainapp/views.py b/rememB/mainapp/views.py index 5c86e1a..2536b37 100644 --- a/rememB/mainapp/views.py +++ b/rememB/mainapp/views.py @@ -1,4 +1 @@ from django.shortcuts import render - -def login(request): - return render(request,'mainapp/login.html') \ No newline at end of file diff --git a/rememB/rememB/settings.py b/rememB/rememB/settings.py index ca099af..d9eebb5 100644 --- a/rememB/rememB/settings.py +++ b/rememB/rememB/settings.py @@ -40,6 +40,7 @@ 'mainapp', 'letterapp', 'balanceapp', + 'userapp', #allauth 'allauth', diff --git a/rememB/rememB/urls.py b/rememB/rememB/urls.py index 5118bba..41eaf47 100644 --- a/rememB/rememB/urls.py +++ b/rememB/rememB/urls.py @@ -7,4 +7,5 @@ path('letterapp/',include('letterapp.urls')), path('mainapp/',include('mainapp.urls')), path('accounts/',include('allauth.urls')), + path('user/',include('userapp.urls')), ] diff --git a/rememB/letterapp/serializers.py b/rememB/userapp/__init__.py similarity index 100% rename from rememB/letterapp/serializers.py rename to rememB/userapp/__init__.py diff --git a/rememB/userapp/admin.py b/rememB/userapp/admin.py new file mode 100644 index 0000000..c6fe108 --- /dev/null +++ b/rememB/userapp/admin.py @@ -0,0 +1,2 @@ +from django.contrib import admin + diff --git a/rememB/userapp/apps.py b/rememB/userapp/apps.py new file mode 100644 index 0000000..2b91b7a --- /dev/null +++ b/rememB/userapp/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class UserappConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'userapp' diff --git a/rememB/userapp/migrations/__init__.py b/rememB/userapp/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/rememB/userapp/models.py b/rememB/userapp/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/rememB/userapp/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/rememB/mainapp/templates/mainapp/login.html b/rememB/userapp/templates/userapp/login.html similarity index 69% rename from rememB/mainapp/templates/mainapp/login.html rename to rememB/userapp/templates/userapp/login.html index 2b802dc..40a9171 100644 --- a/rememB/mainapp/templates/mainapp/login.html +++ b/rememB/userapp/templates/userapp/login.html @@ -1,7 +1,7 @@ {% load socialaccount %} {% providers_media_js %} -회원가입 +
{% if user.is_authenticated %} @@ -10,7 +10,8 @@ {{ user.username }}님이 환영합니다! {% else %} - 구글 로그인
- 네이버 로그인 + 구글 로그인 +
+ 네이버 로그인 {% endif %} \ No newline at end of file diff --git a/rememB/userapp/tests.py b/rememB/userapp/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/rememB/userapp/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/rememB/userapp/urls.py b/rememB/userapp/urls.py new file mode 100644 index 0000000..23214b1 --- /dev/null +++ b/rememB/userapp/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns=[ + path('login/',views.login, name='login'), +] \ No newline at end of file diff --git a/rememB/userapp/views.py b/rememB/userapp/views.py new file mode 100644 index 0000000..34e140f --- /dev/null +++ b/rememB/userapp/views.py @@ -0,0 +1,4 @@ +from django.shortcuts import render + +def login(request): + return render(request,'userapp/login.html')