[Answer]-Trying to access Postgres function from django

1👍

✅

You’re trying to do stuff intended to be done in a view (which passes in a request object) in your shell (which doesn’t have a request object). I think you want something like:

exampleResult = Results.objects.all()[0] # or some other way to get a result to give you the test_type_id and test_id values to pass
data = Results.summaryrosterbycampus(exampleResult.test_type_id,exampleResult.test_id)

Leave a comment