随笔分类 -  python

python django day 5 database 1
摘要:from django.db import models class Blog(models.Model): name = models.CharField(max_length=100) tagline = models.TextField() def __unicode__(self): # __str__ on Python 3 ret... 阅读全文
posted @ 2018-11-08 14:23 Aaron_Net 阅读(181) 评论(0) 推荐(0)
python django day 4 database
摘要:django-admin.py startproject learn_models # 新建一个项目 cd learn_models # 进入到该项目的文件夹 django-admin.py startapp people # 新建一个 people 应用(app) learn_models\settings.py INSTALLED_APPS -> 'people', people/mod... 阅读全文
posted @ 2018-11-08 11:48 Aaron_Net 阅读(194) 评论(0) 推荐(0)
python django day 3 页面,自动 跳转,参数传递
摘要:zqxt_views/urls.pypath('', calc_views.index, name='home'), calc/views.pydef index(request): return render(request, 'home.html') calc/templates/home.ht 阅读全文
posted @ 2018-11-03 18:20 Aaron_Net 阅读(1323) 评论(0) 推荐(0)
python django day 2
摘要:django-admin.py startproject zqxt_viewscd zqxt_viewspython manage.py startapp calczqxt_views/urls.py from calc import views as calc_views urlpatterns 阅读全文
posted @ 2018-10-31 17:54 Aaron_Net 阅读(134) 评论(0) 推荐(0)
python django day 1
摘要:cmd d:\python\python.exe pip install --upgrade pip d:\python\python.exe pip install Django 123.py import django print(django.VERSION) print(django.get 阅读全文
posted @ 2018-10-30 17:23 Aaron_Net 阅读(124) 评论(0) 推荐(0)