Python - Django

갓김치·2020년 12월 7일
0

Python 수업

목록 보기
2/2

참고

https://offbyone.tistory.com/105

1. Django 설치

  • anaconda 열고 conda install django

2. Pydev Django Project 생성

3. 앱 생성

  • 프로젝트 우클릭 - Django - Create application

4. hello - views.py

from django.shortcuts import render

# Create your views here.
from django.http import HttpResponse
def index(request):
    return HttpResponse("북치고 Django치고")

5. HELLODJANGO - urls.py

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path('hello/', include('hello.urls')),
    path('admin/', admin.site.urls)
]
profile
갈 길이 멀다

0개의 댓글