使用web进行数据库管理

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


wKiom1YfEH-RWmETAADpBgtSW00390.jpg




用add来添加数据


你可能感兴趣的:(linux)