上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 31 下一页
摘要: 方式一 1. pip install virtualenv 2. virtualenv 虚拟环境的名字 3. mac上 source + 虚拟环境的目录/bin/activate win上 直接进入虚拟环境的目录执行下面的命令 activate # 激活 4. 退出 dectivate 阅读全文
posted @ 2019-09-18 11:18 流年中渲染了微笑 阅读(215) 评论(0) 推荐(0)
摘要: 1.读代码写结果 不允许运行 class A: discount = 0 def __init__(self): self.discount = 0.5 print('1', discount) class A: discount = 0.7 def __init__(self, price): s 阅读全文
posted @ 2019-08-21 17:55 流年中渲染了微笑 阅读(188) 评论(0) 推荐(0)
摘要: 1. json序列化时,默认遇到中文会转换成unicode,如果想要保留中文怎么办? 2. 下面这段代码的输出结果将是什么?请解释 class Parent(object): x = 1 class Child1(Parent): pass class Child2(Parent): pass pr 阅读全文
posted @ 2019-08-19 11:42 流年中渲染了微笑 阅读(243) 评论(0) 推荐(0)
摘要: 题目1: 题目2: 可变参数定义 *args,**kwargs的区别是什么?并且写出下边代码的输入内容 题目3: 阅读全文
posted @ 2019-07-24 15:05 流年中渲染了微笑 阅读(233) 评论(0) 推荐(0)
摘要: 起初效果 1. 我们首先输入年月日,如图 选择日期 按`ctrl+1` 来调出下图: 2. 数据填充 3.设置星期 点击1下面的单元格 阅读全文
posted @ 2019-06-06 10:25 流年中渲染了微笑 阅读(3510) 评论(0) 推荐(0)
摘要: 在微信小程序中我们需要有一个openid来做临时的‘认证’ 小程序端 <input placeholder="请输入手机号" bindinput="inputPhone" value="{{phone}}"></input> <button open-type="getUserInfo" bindg 阅读全文
posted @ 2019-03-30 19:54 流年中渲染了微笑 阅读(378) 评论(0) 推荐(0)
摘要: from django.test import TestCase # Create your tests here. # !/usr/bin/env python # -*- coding:utf-8 -*- """ 退款 根据订单号进行退款(需要证书才能操作) 文档https://pay.weix 阅读全文
posted @ 2019-03-29 22:11 流年中渲染了微笑 阅读(610) 评论(0) 推荐(0)
摘要: django 要加锁 必须先加事物 例子 from rest_framework import exceptionsfrom django.db import transaction def perform_create(self, serializer): with transaction.ato 阅读全文
posted @ 2019-03-17 23:30 流年中渲染了微笑 阅读(115) 评论(0) 推荐(0)
摘要: 最后看出价的代码就是总代码 1. 查看竞价和出价是一个url url(r'^bid/$', bid.BidView.as_view()), 获取url传过来的值 是 重写 get_queryset """竞价""" from app01 import models from rest_framewo 阅读全文
posted @ 2019-03-17 23:23 流年中渲染了微笑 阅读(128) 评论(0) 推荐(0)
摘要: 1. 拍卖专场的接口 url(r'^auction/$', auction.AuctionView.as_view()), class AuctionModelView(serializers.ModelSerializer): status = serializers.CharField(sour 阅读全文
posted @ 2019-03-17 19:00 流年中渲染了微笑 阅读(203) 评论(0) 推荐(0)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 31 下一页