博客
关于我
tornado企业级开发项目搭建
阅读量:127 次
发布时间:2019-02-26

本文共 1349 字,大约阅读时间需要 4 分钟。

?? PyCharm ????? Django ??

???? PyCharm ????? Django ??

? PyCharm ??????? Django ???????????? PyCharm ????????? File > New Project??? Python > Django ??????????????????????PyCharm ??????????????????

????????????????????

?????????????????????????? requirements.txt ????????????????????

pip freeze > requirements.txt

???????????????????????????????????????????

???? PyCharm ??????

?? PyCharm ? File > Sync ??????????????????????????????? SSH ??????????????????????

?????????

?????????????????????????

pip install -r requirements.txt

?????????? python manage.py migrate ????????

?????????????

??????????????????????????

.??? project/?   ??? __init__.py?   ??? settings.py?   ??? urls.py?   ??? wsgi.py?   ??? __version__.py??? app/?   ??? __init__.py?   ??? models/?   ?   ??? __init__.py?   ?   ??? fields.py?   ??? views.py?   ??? urls.py??? static/?   ??? main.css??? public/    ??? index.html

????????????????????????????????

?????????????

????????????????? Django ? view ? template ?????

from django.shortcuts import renderdef login(request):    if request.method == 'POST':        username = request.POST['username']        password = request.POST['password']        if username == 'admin' and password == 'admin':            return render(request, 'success.html')    return render(request, 'login.html')

????

????????????????????????????????????

转载地址:http://jtvf.baihongyu.com/

你可能感兴趣的文章
NVDIMM原理与应用之四:基于pstore 和 ramoops保存Kernel panic日志
查看>>
NVelocity标签使用详解
查看>>
NVelocity标签设置缓存的解决方案
查看>>
Nvidia Cudatoolkit 与 Conda Cudatoolkit
查看>>