有没有人和我一样 复制上面的代码到 blog/admin.py 页面下注册,会出现报错 打不开网站,找不到什么原因,我的python是 3.8 Django是最新版的 pycharm也是最新版的2020.2
报错如下:
class ArticleAdmin(admin.ModelAdmin):
TypeError: 'NoneType' object is not callable
D:\djangoProject1\blog\admin.py changed, reloading.
INFO:django.utils.autoreload:D:\djangoProject1\blog\admin.py changed, reloading.
Watching for file changes with StatReloader
INFO:django.utils.autoreload:Watching for file changes with StatReloader
Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
File "D:\Python\Python38-32\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "D:\Python\Python38-32\lib\threading.py", line 870, in run
self._target(*self._args, self._kwargs)
File "D:\Python\Python38-32\lib\site