I am working on a Django Project with a Postgres SQL Database. I have written a stored procedure that runs perfectly on Postgres.
Now I want to call that stored proc
There is a missing closing parenthesis at the c.execute("SELECT fn_save_message3(... line. Add ) after last quote symbol.
But anyway it is a wrong method of executing SQL from python code. You should use placeholders to prevent sql injection attacks. Read the documentation with examples of the proper use of SQL in django.