You can read the client's IP address with -
request.META['REMOTE_ADDR'] -- ( not sure how it handles proxies, etc )
then use GeoIP2 to get the location info -
https://docs.djangoproject.com/en/3.1/ref/contrib/gis/geoip2/
On Thu, Sep 24, 2020 at 6:42 PM Salima Begum
<salima.b@rohteksolutions.com> wrote:
>
> Hi all,
>
> How to capture client side location in django can any one help to achieve this?
>
>
> Thank you
> ~Salima
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMSz6bnm%3D7AjMNTpR3TowCPZjRPsVfSLTzYk%2Byo5hERmkiYfqw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMZO7w%2B6LQ38LqqTt%3D_UDyA3MH3fvvQHRX8DJQ3Luzwh13JfLQ%40mail.gmail.com.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment