0
I have a Django application where I intend to customise the authentication part. I’ve already made my own Backend of authentication, as well as configuring my own Model that will be used in authentication.
The problem is, when I turn the remote python manage.py showmigrations
, the following Migrations are appearing:
auth
[ ] 0001_initial
[ ] 0002_alter_permission_name_max_length
[ ] 0003_alter_user_email_max_length
[ ] 0004_alter_user_username_opts
[ ] 0005_alter_user_last_login_null
[ ] 0006_require_contenttypes_0002
[ ] 0007_alter_validators_add_error_messages
[ ] 0008_alter_user_username_max_length
[ ] 0009_alter_user_last_name_max_length
contenttypes
[ ] 0001_initial
[ ] 0002_remove_content_type_name
sessions
[ ] 0001_initial
How is it possible to remove these Migrations from auth
in Django? I intend to use a customised scheme and I don’t want to let denecessary tables be created.
Note: My File settings.py
is configured as follows:
AUTHENTICATION_BACKENDS = ('app.backends.AuthBackend', )
AUTH_USER_MODEL = 'app.usuarios'
If you are not using any auth, you have already tried to simply remove it from
INSTALLED_APPS
in Settings?– jsbueno
@jsbueno actually I want to use the custom Auth. It would be a problem if I used a table with a different pattern than the one in Django auth?
– Wallace Maxters
If you delete or change the type of columns, Django’s Auth code will certainly break - what you can’t tell is whether it will only break in the functions you overide and will use yours, or whether it will break into things he will use as well. The safest would be to use other tables, which the Auth does not "see" - but extra columns should also not give problem
– jsbueno
@jsbueno my intention was to make a permissions control structure using Django’s auth base, without picking up all the luggage (with the creation of a collection of tables that I saw Django create).
– Wallace Maxters
He has a good reason to create this "table top": it’s how the whole thing worked, and well, after decades of evolution. Or you expand in the recommended way: inheriting classes and placing.
– jsbueno