From 56c40d1c2f59817f61e6dd9f6b7bfe0fe3e0a0ea Mon Sep 17 00:00:00 2001 From: happine2s Date: Thu, 21 Jul 2022 16:15:50 +0900 Subject: [PATCH] =?UTF-8?q?[feat]userapp=20=EC=83=9D=EC=84=B1=20=EB=B0=8F?= =?UTF-8?q?=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rememB/mainapp/admin.py | 3 --- rememB/mainapp/models.py | 3 --- rememB/mainapp/urls.py | 4 ++-- rememB/mainapp/views.py | 3 --- rememB/rememB/settings.py | 1 + rememB/rememB/urls.py | 1 + rememB/userapp/__init__.py | 0 rememB/userapp/admin.py | 2 ++ rememB/userapp/apps.py | 6 ++++++ rememB/userapp/migrations/__init__.py | 0 rememB/userapp/models.py | 3 +++ .../mainapp => userapp/templates/userapp}/login.html | 4 +++- rememB/userapp/tests.py | 3 +++ rememB/userapp/urls.py | 6 ++++++ rememB/userapp/views.py | 4 ++++ 15 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 rememB/userapp/__init__.py create mode 100644 rememB/userapp/admin.py create mode 100644 rememB/userapp/apps.py create mode 100644 rememB/userapp/migrations/__init__.py create mode 100644 rememB/userapp/models.py rename rememB/{mainapp/templates/mainapp => userapp/templates/userapp}/login.html (70%) create mode 100644 rememB/userapp/tests.py create mode 100644 rememB/userapp/urls.py create mode 100644 rememB/userapp/views.py diff --git a/rememB/mainapp/admin.py b/rememB/mainapp/admin.py index 39db4df..694323f 100644 --- a/rememB/mainapp/admin.py +++ b/rememB/mainapp/admin.py @@ -1,4 +1 @@ from django.contrib import admin -from .models import Blog - -admin.site.register(Blog) \ No newline at end of file diff --git a/rememB/mainapp/models.py b/rememB/mainapp/models.py index 2ddc9c2..137941f 100644 --- a/rememB/mainapp/models.py +++ b/rememB/mainapp/models.py @@ -1,4 +1 @@ from django.db import models - -class Blog(models.Model): - text=models.TextField() \ No newline at end of file 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 def0ac8..536b226 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/userapp/__init__.py b/rememB/userapp/__init__.py new file mode 100644 index 0000000..e69de29 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 70% rename from rememB/mainapp/templates/mainapp/login.html rename to rememB/userapp/templates/userapp/login.html index 68f2892..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 %} @@ -11,5 +11,7 @@ {% 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')