I don't know if I'd call it easy or obvious, but it should be
possible, at least in some form.
* You can wrap the legacy database with a Django model definition.
Look into the `inspectdb` management command for a head start on this.
This will give you a Django model file that can be used to interact
with your legacy database table directly.
* You can write a custom authentication backend that will integrate
your legacy database table with Django's authentication system,
allowing users to log in using their legacy credentials. There is some
documentation on this, but the best reference will probably be the
existing code (django.contrib.auth.backends)
However, the big catch -- Django's concept of a "User" isn't
especially easy to customise. This means that won't be trivial
(possible, but not trivial, and certainly not documented) to use your
legacy table as a substitute for Django's internal User table. This
means that you won't be able to use any existing applications out
there that have a foreign key on Django's User - most notably,
Django's admin interface.
Depending on your exact needs, one easy workaround for this may be to
have 2 user tables: the legacy user table, and an 'administrators'
user table. The legacy users will still be able to log in, but won't
have access Django's admin. The admin Users table is Django's own User
table, and users with accounts on this table will have access to the
Django admin, including the ability to view/edit the legacy User
table.
Yours,
Russ Magee %-)