擅长:python、mysql、java
<p>为了摆脱我在admin.py中必须处理的用户和组:</p>
<pre><code>from django.contrib import admin
# Need to import this since auth models get registered on import.
import django.contrib.auth.admin
import django.contrib.auth.models
from django.contrib import auth
admin.site.unregister(auth.models.User)
admin.site.unregister(auth.models.Group)
</code></pre>