Django Management command for Activating/Deactivating admin site
I think the best way to do it - write custom middleware.
You can detect if current request is request to admin site (for example request.path.startswith('/admin')) and return 404 error if you disable you admin page.
I would like to know if it's possible to 'Activate' and 'Deactivate' the admin site using a custom management command and what i mean by deactivating is commenting the line containing the path of admin.site.urls in the main urls.py file.
Or if there is a better way to do this.