Validate password encrypted with Django in PHP

Very good to all, this is my first question in Stack Overflow and I hope you can help me.

It turns out that I have a PostgreSQL database, which has many users. The passwords of the users are encrypted in the following format:

sha1 $ 678ae $ 0dd4b5a9588be91a931d1ef1f7e7053477c1478e

This encryption was done with Django (although I do not know if it can be encrypted directly in the database).

What I try to do, is to make an application in PHP that can validate these passwords.

How could I do it?

Thank you very much for your answers.

Greetings.