I have already gone through some previous threads: How do I set subdirectory in nginx with Django how to deploy django under a suburl behind nginx Serving flask app on subdirect
If the application is so simple that a simple "/prefix" can be added to one line in urls.py
then I prefer this simple solution without anything more.
Otherwise the "/prefix" must be appended to the domain
column in the record for your site in Sites table in Django admin. The domain should be then "example.com/project" with the second solution, because Django must know the domain and the prefix, especially for correct redirect. Naturally the prefix must be also stripped from URL of the request by webserver, as you do it now in nginx settings.
I usually split the verification of such deployments to two questions:
I use both nginx log and Django logging enabled to see which of them is eventually miscofigured. (You didn't wrote enough important information.)
An important case that should be tested is: Verify that web pages that require athentication are redirected to login page correctly back and forth, even if you try these URLs after logout.
More details can be found in the similar question.