![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Djngo/Django部署
简简简简abc
前微服务后台开发者,业余安卓开发者,现crypto token爱好者,搬砖科学家。
展开
-
学习TP框架(一)
前言:初次接触TP5,所以只能一边翻tp手册,熟悉基本用法,同时在app开发后台路上,继续往前拱一点。不做技术半吊子(不知其所以然),从我做起!!^_^练习代码: 201717/4/27<?phpnamespace app\index\controller;use think\Controller;use think\Request;class Index extends Control原创 2017-04-27 19:16:58 · 1879 阅读 · 0 评论 -
Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/blog/about/ Raised by: b
错误:Page not found (404)Request Method: GETRequest URL: http://127.0.0.1:8000/blog/about/Raised by: blog.views.aboutNo BlogPost matches the given query.解决措施:def projects(request): # use mark原创 2017-06-25 12:38:02 · 14787 阅读 · 0 评论 -
WARNINGS: ?: (1_8.W001) The standalone(独立) TEMPLATE_* settings were deprecated(弃用) in Django 1.8 and
错误原因:E:\My_Blog-master>python manage.py runserverPerforming system checks...#执行系统检查System check identified some issues:#系统检查确认出了一些问题 issues:问题WARNINGS:?: (1_8.W001) The standalone(独立) TEMPLATE_* set原创 2017-06-25 12:16:35 · 4662 阅读 · 0 评论 -
Page not found (404) Request Method:GET Request URL: http://127.0.0.1:8000/blog/talks Using the URL
Page not found (404)Request Method: GETRequest URL: http://127.0.0.1:8000/blog/talksUsing the URLconf defined in my_blog.urls, Django tried these URL patterns, in this order:1.(?P\d*)/$ [name='原创 2017-06-24 16:15:59 · 4952 阅读 · 0 评论 -
TemplateView , ListView ,DetailView三种常用类视图用法
有函数类图,还需要类视图??当然,类视图方便,好用,不信你感受感受。。。。TemplateViewget_queryset(self)#默认取出该表所有数据。想要过滤自定义只能在get_queryset()中 个人理解:listview,detailview,templateview。前两个特别像,变量函数基本一样,templateview也差不多,只不过没有get_queryset()。mode原创 2017-07-04 09:36:44 · 9761 阅读 · 1 评论 -
django.template.exceptions.TemplateDoesNotExist: blog/index.html
django.template.exceptions.TemplateDoesNotExist: blog/index.html错误原因:Views调用Templates出错。解决办法:原理: 常见的习惯是载入一个模板、填充一个context 然后返回一个含有模板渲染结果的HttpResponse对象 template = loader.get_template('po原创 2017-06-22 17:40:40 · 8306 阅读 · 0 评论 -
Django 自定义模板标签(template_tags)究竟有什么用?
自定义模板标签,过滤器。英文翻译是Custom template tags and filters。custom filter自定义过滤器今天不在我的记录范围之内,以后用到再看官方文档也不迟。**问题1:**custom template tags 到底长啥样? custom template tags—github Many template tags take a number of arg原创 2017-07-03 13:22:28 · 7696 阅读 · 2 评论 -
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x000001DB1D7557
错误:E:\myblog>python manage.py runserverUnhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x000001DB1D7557B8>Traceback (most recent call last): File "C:\Users\Admin原创 2017-07-02 21:01:32 · 26104 阅读 · 1 评论 -
记录Django 连接Mysql 以及出现问题
具体步骤安装Mysql windows推荐安装Xmapp.因为好用!安装python 和 Mysql 之间的链接驱动程序。pip install mysqlclient修改settings.py的配置,提供Mysql的连接信息。DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql',原创 2017-07-02 19:49:50 · 1134 阅读 · 0 评论 -
Django1.10 上传图片?TEMPLATES、STATICFILES_DIRS、THUMBNAIL_PROCESSORS等相关配置
在了解如何上传图片之前,我们很有必要理解一项基本配置。my_blog=os.path.dirname(os.path.dirname(__file__))'''本来想my_blog重命名为BASE_DIR,但系统报错`ImportError: No module named 'BASE_DIR'`,错误很新鲜,一直没有调过来。my_blog 也好BASE_DIR也好,不影响我们的理解。'''o原创 2017-07-01 10:03:24 · 470 阅读 · 0 评论 -
最新版windows 2012R2、Apache24、mod_wsgi、Django1.9、python3.4项目部署(生产环境)
感慨一句,历经千辛万苦终于在腾讯云windows2012R2服务器上部署了Django个人博客。话不多说,大家先看看效果。Django个人博客 个人 心得:第一次在wondows服务器上部署Django。饶了很大弯子,踩了很多坑。现在回过头总结,常见的就两种坑。 1. .dll文件缺失,.bat文件缺失、程序无法启动错误代码0x0000000007b、MVCR.dll缺少等等。类似这样错误。这原创 2017-07-11 07:02:43 · 2682 阅读 · 2 评论 -
Django 将数据输出到html后,怎么用?(QuerySet 和Set的区别?)
往html输出的数据大部分是字典。字典的值有很多都是QuerySet。 既然这样,我们首先应该认识认识Queryset。"""QuerySet is parametrized with model object"""class QuerySet(object): def __init__(self, model=None, query=None, using=None, hints=原创 2017-06-28 13:22:54 · 8222 阅读 · 2 评论 -
XMAPP和Hush FrameWork环境配置
1、配置xmapp的apacheC:\xampp\apache\conf\extra\httpd-vhosts.conf//后台<VirtualHost *:80>ServerName hushbDocumentRoot "D:\hush-master\hush-app\web\backend"<Directory "D:\hush-master\hush-app\web\backend">原创 2017-04-27 12:53:33 · 1238 阅读 · 1 评论 -
Python三种数据结构
Python 为我们提供了三种常用数据结构,列表(Lists),字典(Dictionary),元组(Tuple)。为何要了解三种数据结构,这事的意义就不必多说了,让我们开始了解这三种最重要的数据结构吧。1、列表好学甲:列表Lists有什么特点? (按捺不住激动心情地想先说Python) 大佬乙:列表就像高级链表(有序,动态,可同时存放不同类型的数据)。 Python knows a numb翻译 2017-05-28 16:43:52 · 880 阅读 · 0 评论 -
用PHP写APP后台
写在前面的问题:问:用哪种语言开发效率最高?答:php,java,python开发效率对比 有时间的话都试试,只有自己才能真正说服自己 问:到底哪种语言最好呢? 大佬:“争这个有什么意思???” 本文之所以选择php进行开发,完全是因为学习资料太少。只有一本《android和php开发最佳实践》。但这并不影响我学习后台开发,毕竟原理都是非常类似的。正文: 持续更新中。。。。原创 2017-04-22 16:30:11 · 6979 阅读 · 1 评论 -
app与后台通信完整流程
前言:接着补充app后台(也叫服务端开发)的基础知识。基础要夯实,不然哪来的万张高楼?正文:问1:整个前台后台交互的流程是个什么样子? 答:基于http协议的app前后台交互包含以下几个步骤: 1.建立连接:前台后台建立连接。 2.发送请求:打开连接后,app向后台发送请求。//请求示例http://api.androidhive.info/android_connect/get_al原创 2017-04-22 13:32:52 · 32953 阅读 · 2 评论 -
app后台开发入门
前言:由于项目需求,我负责安卓后台开发这部分内容。服务器收到安卓的请求后,返回json数据给安卓用。 但是,我什么都不懂啊!我不知道安卓后台服务器长什么样子,我见都没见过,怎么开发?怎么照猫画虎!!! 没有任何服务器开发的基础知识,无从下手,心中充满着万千表达不出来的疑惑和不解。别泄气,我们都一样!正文:下面列举几个问题,这样做有利于你理解服务器开发。 问题创造现实问1:后台开发和服务器开原创 2017-04-20 16:35:59 · 65473 阅读 · 13 评论 -
学习TP框架(二)
目前学TP框架目的是让开发更高效,所以懂得使用流程,会调api就行。 2017/4/30 一、任务动手写一个mvc实例,熟悉熟悉最简单的CRUD操作。在不断优化的过程中,回顾TP5使用流程二、正文完成基本的CRUB操作<?phpnamespace app\api\controller;/** * Description of StudentTest * St原创 2017-04-30 15:33:49 · 652 阅读 · 0 评论 -
NoReverseMatch at /blog/ Reverse for 'blog.views.blogpost' not found. 'blog.views.blogpost' is not a
错误:NoReverseMatch at /blog/Reverse for 'blog.views.blogpost' not found. 'blog.views.blogpost' is not a valid view function or pattern name.Request Method: GETRequest URL: http://127.0.0.1:8000/bl原创 2017-06-25 13:32:59 · 5508 阅读 · 0 评论