Skip to content

Commit

Permalink
Merge pull request #7 from Likelion-at-SMWU-10th/feat/#1-social-login
Browse files Browse the repository at this point in the history
[feat]userapp 생성 및 코드 수정
  • Loading branch information
happine2s authored Jul 21, 2022
2 parents 7801b51 + 67db6e4 commit cb7a30e
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 102 deletions.
39 changes: 0 additions & 39 deletions rememB/balanceapp/migrations/0001_initial.py

This file was deleted.

28 changes: 0 additions & 28 deletions rememB/letterapp/migrations/0001_initial.py

This file was deleted.

27 changes: 0 additions & 27 deletions rememB/mainapp/migrations/0002_user_delete_blog.py

This file was deleted.

3 changes: 3 additions & 0 deletions rememB/mainapp/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from django.db import models
<<<<<<< HEAD
=======

class User(models.Model):
uuid = models.CharField(max_length=100)
Expand All @@ -7,3 +9,4 @@ class User(models.Model):
birthday = models.CharField(max_length=100)
email = models.CharField(max_length=100)

>>>>>>> develop
4 changes: 2 additions & 2 deletions rememB/mainapp/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
from . import views

urlpatterns=[
path('login/',views.login, name='login'),
]

]
3 changes: 0 additions & 3 deletions rememB/mainapp/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
from django.shortcuts import render

def login(request):
return render(request,'mainapp/login.html')
1 change: 1 addition & 0 deletions rememB/rememB/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'mainapp',
'letterapp',
'balanceapp',
'userapp',

#allauth
'allauth',
Expand Down
1 change: 1 addition & 0 deletions rememB/rememB/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
path('letterapp/',include('letterapp.urls')),
path('mainapp/',include('mainapp.urls')),
path('accounts/',include('allauth.urls')),
path('user/',include('userapp.urls')),
]
File renamed without changes.
2 changes: 2 additions & 0 deletions rememB/userapp/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from django.contrib import admin

6 changes: 6 additions & 0 deletions rememB/userapp/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class UserappConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'userapp'
Empty file.
3 changes: 3 additions & 0 deletions rememB/userapp/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load socialaccount %}
{% providers_media_js %}

<a href="/accounts/signup">회원가입</a>
<!-- <a href="/accounts/signup">회원가입</a> -->
<br>

{% if user.is_authenticated %}
Expand All @@ -10,7 +10,8 @@
{{ user.username }}님이 환영합니다!
{% else %}
<!-- {% csrf_token %} -->
<a href="{% provider_login_url 'google' %}">구글 로그인</a><br>
<a href="{% provider_login_url 'naver' %}">네이버 로그인</a>
<a href="{% provider_login_url 'google' %}">구글 로그인</a>
<br>
<a href="{% provider_login_url 'naver' %}">네이버 로그인</a>

{% endif %}
3 changes: 3 additions & 0 deletions rememB/userapp/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
6 changes: 6 additions & 0 deletions rememB/userapp/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.urls import path
from . import views

urlpatterns=[
path('login/',views.login, name='login'),
]
4 changes: 4 additions & 0 deletions rememB/userapp/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.shortcuts import render

def login(request):
return render(request,'userapp/login.html')

0 comments on commit cb7a30e

Please sign in to comment.