#!/usr/bin/python #coding:utf-8 from django.shortcuts import render; from django.shortcuts import render_to_response; from django.http import HttpResponse; from django.template import loader,Context, Template; from django.http import HttpResponseRedi
Django--QuerySet--基础查询 创建模型类: from django.db import models # Create your models here. class Blog(models.Model): name = models.CharField(max_length=100) tagline = models.TextField() def __str__(self): return self.name class Author(models.Model): name
基本数据类型补充: set 是一个无序且不重复的元素集合 class set(object): """ set() -> new empty set object set(iterable) -> new set object Build an unordered collection of unique elements. """ def add(self, *args, **kwargs): # real signature un
一:数字 int int(整型): 在32位机器上,整数的位数为32位,取值范围为-2**31-2**31-1,即-2147483648-2147483647 在64位系统上,整数的位数为64位,取值范围为-2**63-2**63-1,即-9223372036854775808-9223372036854775807 class int(object): """ int(x=0) -> int or long int(x, base=10) -> int or l