#!/usr/bin/env python
import django
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoblog.settings')
django.setup()

from djangoblog.admin_site import admin_site

print("=" * 60)
print("检查自定义 Admin Site 注册情况")
print("=" * 60)

blog_models = []
for model in admin_site._registry.keys():
    if model._meta.app_label == 'blog':
        blog_models.append(model)

print(f"\n已注册的 Blog 模型数量: {len(blog_models)}")
print("\n模型列表:")
for model in sorted(blog_models, key=lambda m: m.__name__):
    verbose = model._meta.verbose_name
    verbose_plural = model._meta.verbose_name_plural
    print(f"  {model.__name__}")
    print(f"    显示名称: {verbose} / {verbose_plural}")

print("\n" + "=" * 60)
