标签:linux
urls.py
from django.contribimport admin
admin.autodiscover()
urlpatterns = [
url(r‘^admin/‘, include(admin.site.urls)),
]
创建密码
python manage.py syncdb
填入用户名,密码
然后去vi blog/admin,py
from django.contrib import admin
from blog.models import Host
# Register your models here.
admin.site.register(Host)
然后访问页面
http://121.43.110.89:8080/admin
用add来添加数据
本文出自 “dba天空” 博客,请务必保留此出处http://9425473.blog.51cto.com/9415473/1703073
标签:linux
原文地址:http://9425473.blog.51cto.com/9415473/1703073