Most likely the question is easy, I just do not know how to google it. There are packages that are in the site-packages of python or Django itself. For example, auth . And I want to remove them from the admin or edit settings. It turns out that I have to install an app in my project for this?

    2 answers 2

    Want to remove User and Group models from admin panel? Then like this in any of your admin.py:

    from django.contrib.auth.models import User, Group admin.site.unregister(User) admin.site.unregister(Group) 

    You just need to pull out all the calls from the settings, otherwise there will be errors. Experiment - should help. Personally, I have a jung swears about the absence of these models in the admin panel :)

    • and I have no mistakes, thanks =) - stasych
    • Not at all :) Mark the answer as accepted. - metazet
    • I have never accepted the answers ... I searched everything, where to take it? =)))) - stasych
    • Here, near the answer to your question - under the vote for / against - a check mark in a circle. - metazet
    • ooooop didn't even pay attention to it =) - stasych

    You can install any add-ons you like, but which of them can be connected to your business. Connect to settings in INSTALLED_APPS , those packages that you do not want to connect, just remove them from INSTALLED_APPS , but do not forget to delete calls from other views , otherwise the error will be.

    • probably you did not understand the question correctly. Here I have installed django.contrib.auth in setting.py, and how to make it not be added to the admin panel? - stasych
    • NDA, I didn’t quite understand, but partly my answer was also correct, but of course without the most crucial moment) Right for respondent +1 - trec