Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[김연우]homework2: hello world 출력하기 #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added study/db.sqlite3
Binary file not shown.
5 changes: 0 additions & 5 deletions study/requirements.txt

This file was deleted.

Binary file added study/study/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added study/study/__pycache__/settings.cpython-311.pyc
Binary file not shown.
Binary file added study/study/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file added study/study/__pycache__/wsgi.cpython-311.pyc
Binary file not shown.
7 changes: 4 additions & 3 deletions study/study/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,20 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["*"]


# Application definition

INSTALLED_APPS = [
"study2.apps.Study2Config",
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"rest_framework",
"rest_framework"
]

MIDDLEWARE = [
Expand Down Expand Up @@ -106,7 +107,7 @@

LANGUAGE_CODE = "en-us"

TIME_ZONE = "UTC"
TIME_ZONE = "Asia/Seoul"

USE_I18N = True

Expand Down
7 changes: 4 additions & 3 deletions study/study/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import include, path

urlpatterns = [
path("admin/", admin.site.urls),
]
path('study2/', include('study2.urls')),
path('admin/', admin.site.urls),
]
Empty file added study/study/views.py
Empty file.
Empty file added study/study2/__init__.py
Empty file.
Binary file added study/study2/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added study/study2/__pycache__/admin.cpython-311.pyc
Binary file not shown.
Binary file added study/study2/__pycache__/apps.cpython-311.pyc
Binary file not shown.
Binary file added study/study2/__pycache__/models.cpython-311.pyc
Binary file not shown.
Binary file added study/study2/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file added study/study2/__pycache__/views.cpython-311.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions study/study2/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions study/study2/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class Study2Config(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'study2'
Empty file.
Binary file not shown.
3 changes: 3 additions & 0 deletions study/study2/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.
3 changes: 3 additions & 0 deletions study/study2/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.
7 changes: 7 additions & 0 deletions study/study2/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.urls import path

from . import views

urlpatterns = [
path('', views.index, name='index'),
]
5 changes: 5 additions & 0 deletions study/study2/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.views import View
from django.http import HttpResponse, JsonResponse

def index(request):
return HttpResponse("Hello, world.")