摘要:
一、超级用户的建立 python manage.py createsuperuser 进入后台,管理后台模块功能不止管理用户,还可以管理全部应用项目(app)的模型。 二、将pollsapp应用的模型加入后台模块 就是将pollsapp应用模块注册到管理后台admin.py模块中。(pollsapp 阅读全文
摘要:
一、添家数据到数据库 一般通过shell 命令打开Python命令行: python manage.py shell 打开交付式命令行 >>> from pollsapp.models import Choice,Question >>> from django.utils import timez 阅读全文