https://docs.djangoproject.com/en/1.9/topics/testing/ http://docs.seleniumhq.org/ Automated testing is an extremely useful bug-killing tool for the modern Web developer. Test no past future two past and tuture 双杠 pub_date__lte 不显示在未来的问题 a separate Te…
class django.views.generic.base.View 它是基类的基类,其它View基类都是从这继承的. 官例: from django.http import HttpResponse from django.views.generic import View class MyView(View): def get(self, request, *args, **kwargs): return HttpResponse('Hello, World!') from django…
ListView (带分页) 1.带分页效果的基础模板 1) view from django.views.generic.list import ListView from employ.models import Company class CompanyListView(ListView): model = Company context_object_name = "companies" template_name = 'company/company_list.html' p…