标签:style blog http color io 使用 for div sp
#以交互的方式创建超级用户
manage.py createsuperuser
from django.contrib import admin
from polls.models import Question
admin.site.register(Question)
#polls/admin.py
from django.contrib import admin
from polls.models import Question
class QuestionAdmin(admin.ModelAdmin):
fields = [‘pub_date‘, ‘question_text‘]
admin.site.register(Question, QuestionAdmin)
from django.contrib import admin
from polls.models import Question
class QuestionAdmin(admin.ModelAdmin):
fieldsets = [
(None, {‘fields‘: [‘question_text‘]}),
(‘Date information‘, {‘fields‘: [‘pub_date‘], ‘classes‘: [‘collapse‘]}),
]
标签:style blog http color io 使用 for div sp
原文地址:http://www.cnblogs.com/phenixyu/p/3988224.html