|
|||||||||
django の変更点
#author("2019-02-19T05:12:36+00:00","default:pentacle","pentacle")
* pre [#a123ce6f]
python3 が入っていること
pip install --upgrade pip
* install [#xc465818]
pip install django
* hello world [#kfbf3d4f]
* first step [#h2085e0d]
django-admin startproject django_project
cd django_project
python manage.py startapp testpage
''django_project/settings.py''
INSTALLED_APPS に testpage を加える
'testpage',
''django_project/urls.py''
#pre{{
from django.urls import path
from django.conf.urls import url
from django.contrib import admin
from testpage import views
urlpatterns = [
path('testpage/', views.index),
]
}}
''testpage/views.py''
from django.http import HttpResponse
def index(req):
return HttpResponse('Hello, World')
* 起動 [#sb814e37]
python manage.py runserver 9000
http://localhost:9000/testpage/
* plugin install [#tf82289c]
pip install social-auth-app-django requests_oauthlib jsonfield2 jsonschema wheel django-bootstrap4
|
|||||||||