之前先改settings.py里的:
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
USE_TZ = False #不用國(guó)際時(shí)間
再createsuperuser,輸入用戶(hù)ID雄坪,密碼驱犹,
好像admin.py是創(chuàng)建在第一個(gè)生成的app里。點(diǎn)開(kāi):
from django.contrib import admin
# Register your models here.
from .models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
pass
admin.site.register(UserProfile,UserProfileAdmin)
這樣把userprofile注冊(cè)進(jìn)來(lái)就可以在admin頁(yè)面里顯示用戶(hù)信息了息堂。