Skip to content

Commit

Permalink
[feat] 기본 세팅 및 migrate (#16)
Browse files Browse the repository at this point in the history
기본 세팅: settings에 app 등록, index.html 생성, 이와 관련된 url, view 추가
  • Loading branch information
soeunkk committed Mar 29, 2022
1 parent ca0f75a commit d855ef4
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 15 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>안녕하세요.</h1>
2 changes: 2 additions & 0 deletions codelion/django/blogproject/blogapp/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from django.shortcuts import render

# Create your views here.
def home(request):
return render(request, 'blogapp/index.html')
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions codelion/django/blogproject/blogproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blogapp'
]

MIDDLEWARE = [
Expand Down
17 changes: 2 additions & 15 deletions codelion/django/blogproject/blogproject/urls.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
"""blogproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from blogapp import views

urlpatterns = [
path('admin/', admin.site.urls),
path('', views.home, name='home'),
]
Binary file modified codelion/django/blogproject/db.sqlite3
Binary file not shown.

0 comments on commit d855ef4

Please sign in to comment.