首页 > 代码库 > 测试功夫不负有心人
测试功夫不负有心人
功夫不负有心人
Python代码
from django.db import modelsfrom django.contrib.auth.models import User# Create your models here.class Customer(models.Model): ‘‘‘客户信息表‘‘‘ name = models.CharField(max_length=32,blank=True,null=True) qq = models.CharField(max_length=64,unique=True) qq_name = models.CharField(max_length=64,blank=True,null=True) phone = models.CharField(max_length=64,blank=True,null=True) source_choices = ((0,‘转介绍‘), (1,‘QQ群‘), (2,‘官网‘), (3,‘百度推广‘), (4,‘51CTO‘), (5,‘知乎‘), (6,‘市场推广‘) ) source = models.SmallIntegerField(verbose_name="报名渠道",choices=source_choices) referral_from = models.CharField(verbose_name="转介绍人qq",max_length=64,blank=True,null=True) consult_course = models.ForeignKey("Course",verbose_name="咨询课程") content = models.TextField(verbose_name="咨询详情") tags = models.ManyToManyField("Tag",blank=True,null=True) consultant = models.ForeignKey("UserProfile") memo = models.TextField(blank=True,null=True) date = models.DateTimeField(auto_now_add=True) status_choices = ((0,‘已报名‘), (1,‘未报名‘),) status = models.SmallIntegerField(verbose_name="报名状态",choices=status_choices,default=1) def __str__(self): return self.qq class Meta: verbose_name = "客户表" verbose_name_plural = ‘客户信息表‘
js代码
<script> function openpopup(){ window.open("hello.htm","","width=300,height=300") //自己修改弹出窗口 } function get_cookie(Name) { var search = Name + "=" var returnvaluehttp://www.mamicode.com/= ""; if (documents.cookie.length > 0) { offset = documents.cookie.indexOf(search) if (offset != -1) { // if cookie exists offset += search.length // set index of beginning of value end = documents.cookie.indexOf(";", offset); // set index of end of cookie value if (end == -1) end = documents.cookie.length; returnvalue=http://www.mamicode.com/unescape(documents.cookie.substring(offset, end)) "popped=yes" } } </script>
测试功夫不负有心人
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。