What you want is not entirely clear. Do you want to authenticate against your PostgreSQL users instead of the django.contrib.auth users? If yes, you need to customize your authentication [1]. One solution would be to write a custom authentication backend, but you might also be able to use RemoteUserBackend [2] together with Apache and mod_auth_pgsql.
Or do you want to import PostgreSQL users and groups into the django.contrib.auth tables and use those from now on? This should be possible with some SQL (INSERT INTO auth_user (id, first_name, last_name, email, ...) SELECT ... FROM [wherever PostgreSQL keeps its users]), but the "password" field might be tricky to transfer.
I know these don't answer all your questions, but you need to
explain a bit more.
Regards,
Antonis
[1]
https://docs.djangoproject.com/en/1.10/topics/auth/customizing/
[2]
https://docs.djangoproject.com/en/1.10/ref/contrib/auth/#django.contrib.auth.backends.RemoteUserBackend
Antonis Christofides http://djangodeployment.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ddbd5a11-91fa-4411-b084-306b59b39e95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ah, OK, so you want: (1) To authenticate as a PostgreSQL user; (2) To connect to the database as that user.
As I said, (1) is probably possible with Apache+mod_auth_pgsql
plus RemoteUserBackend. For (2), you need to create a custom
database backend.
Antonis Christofides http://djangodeployment.com
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3681775d-f0d1-43d3-bd2d-f480f323be5a%40googlegroups.com.