他山之石,可以攻玉嘛. 好的习惯有时也是学别人来养成的. 外国人的编码习惯,学啊. from django.core.urlresolvers import reverse_lazy from django.shortcuts import redirect, get_object_or_404 from django.forms.models import modelform_factory from django.apps import apps from django.views.gene…
常规的模板渲染 from django.db import models # Create your models here. class ArticalType(models.Model): caption = models.CharField(max_length=16) class Category(models.Model): caption = models.CharField(max_length=16) class Artical(models.Model): title = mo…