I am pretty new to Django and wanted to know how I could check if a user logging to a django powered website is from outside the US?
How would I write a class in Middleware to check the same? I want to hide particular sections of the website from users logging out of the US.
I know I am not providing any details and the question might seem vague... but I needed a general idea to get started. I have not started working on the website yet.
I went through the Django Middleware documentation but still did not understand how to do so. Does the user authentication https://docs.djangoproject.com/en/1.4/topics/auth/#limiting-access-to-logged-in-users provide any such functionality?