Скачать презентацию Django 04 virtualenv -p python 3 Скачать презентацию Django 04 virtualenv -p python 3

django 04 16.pptx

  • Количество слайдов: 94

Django 04 Django 04

 virtualenv -p python 3 lesson 04 source bin/activate pip install --upgrade pip install virtualenv -p python 3 lesson 04 source bin/activate pip install --upgrade pip install django==1. 9

 django-admin startproject trydjango 19 django-admin startproject trydjango 19

 python manage. py runserver python manage. py runserver

settings. py settings. py

python manage. py migrate python manage. py migrate

python manage. py createsuperuser python manage. py createsuperuser

http: //127. 0. 0. 1: 8000/admin/ http: //127. 0. 0. 1: 8000/admin/

python manage. py startapp posts python manage. py startapp posts

models. py models. py

models. py models. py

settings. py settings. py

python manage. py makemigrations python manage. py makemigrations

0001_initial. py 0001_initial. py

python manage. py migrate python manage. py migrate

https: //docs. djangoproject. com/en/1. 9 /ref/models/fields/ https: //docs. djangoproject. com/en/1. 9 /ref/models/fields/

admin. py admin. py

https: //docs. djangoproject. com/en/1. 9 /ref/contrib/admin/ https: //docs. djangoproject. com/en/1. 9 /ref/contrib/admin/

urls. py urls. py

crud. md crud. md

views. py urls. py 127. 0. 0. 1: 8000/posts/ views. py urls. py 127. 0. 0. 1: 8000/posts/

 https: //github. com/codingforentrepreneurs/Guides/blob/master/all/commo n_url_regex. md https: //docs. djangoproject. com/el/1. 10/topics/http/urls/ https: //github. com/codingforentrepreneurs/Guides/blob/master/all/commo n_url_regex. md https: //docs. djangoproject. com/el/1. 10/topics/http/urls/

views. py, urls. py views. py, urls. py

settings. py settings. py

index. html, views. py index. html, views. py

urls. py urls. py

views. py views. py

index. html index. html

http: //127. 0. 0. 1: 8000/posts/ http: //127. 0. 0. 1: 8000/posts/

python manage. py shell python manage. py shell

views. py views. py

http: //127. 0. 0. 1: 8000/posts/detail/ http: //127. 0. 0. 1: 8000/posts/detail/

views. py, urls. py http: //127. 0. 0. 1: 8000/posts/detail/1/ views. py, urls. py http: //127. 0. 0. 1: 8000/posts/detail/1/

http: //127. 0. 0. 1: 8000/posts/detail/1/ http: //127. 0. 0. 1: 8000/posts/detail/2/ http: //127. 0. 0. 1: 8000/posts/detail/1/ http: //127. 0. 0. 1: 8000/posts/detail/2/

urls. py http: //127. 0. 0. 1: 8000/posts/2/ urls. py http: //127. 0. 0. 1: 8000/posts/2/

index. html index. html

urls. py index. html urls. py index. html

models. py, index. html models. py, index. html

urls. py, models. py, index. html urls. py, models. py, index. html

forms. py forms. py

views. py, post_form. html http: //127. 0. 0. 1: 8000/posts/create/ views. py, post_form. html http: //127. 0. 0. 1: 8000/posts/create/

update update

http: //127. 0. 0. 1: 8000/posts/3/edit/ http: //127. 0. 0. 1: 8000/posts/300/edit/ http: //127. 0. 0. 1: 8000/posts/3/edit/ http: //127. 0. 0. 1: 8000/posts/300/edit/

Редирект Редирект

Сообщения Сообщения

https: //docs. djangoproject. com/en/1. 9 /ref/contrib/messages/ https: //docs. djangoproject. com/en/1. 9 /ref/contrib/messages/

post_detail. html post_detail. html

И на edit и на create И на edit и на create

post_detail. html post_detail. html