摘要:
接口: 抽象类和抽象方法: 阅读全文
摘要:
读以下代码: 1 2 3 4 5 6 class Foo(object): def __init__(self): pass obj = Foo() # obj是通过Foo类实例化的对象 1 2 3 4 5 6 class Foo(object): def __init__(self): pass 阅读全文
摘要:
#!/usr/bin/env python# -*- coding:utf-8 -*-import refrom django import formsfrom django.core.exceptions import ValidationErrordef mobile_validate(valu 阅读全文
摘要:
阅读全文
摘要:
1创建project django-admin startproject mysite 2创建app cd mysite python startapp app01 python F:\py_django\manage.py runserver 127.0.0.1:8009 同步一下数据库 pyth 阅读全文
摘要:
2、连表结构 一对多:models.ForeignKey(其他表) 多对多:models.ManyToManyField(其他表) 一对一:models.OneToOneField(其他表) model.py from django.db import modelsclass Blog(models 阅读全文
摘要:
总结: 其他: 阅读全文
摘要:
C:\Python31\python.exe D:/pythoncode/a8.py 1 0 2 4 3 7 6 6 5 9 8 10 11 12 13 14 15 18 16 17 19 5 0 5 0 20 21 20 24 23 22 25 26 29 29 28 29 28 27 30 31 阅读全文
摘要:
#!/usr/bin/env python# -*- coding: utf-8 -*-import queueimport threadingclass threadpool(): def __init__(self,max_num): self.q = queue.Queue(max_num) for i in range(max_num): ... 阅读全文
摘要:
C:\Python31\python.exe D:/pythoncode/a6.py[1][]Process finished with exit code 0 C:\Python31\python.exe D:/pythoncode/a7.py123456789Process finished w 阅读全文