pandey vivak
pandey vivak

Reputation: 1

how can we get gps data of user's mobile and tablets in our django application?

In my django application I need to store the GPS data of all users to track them especially mobile and tablets how can I do so?

Upvotes: 0

Views: 455

Answers (1)

ahmadgh74
ahmadgh74

Reputation: 821

You should create a table that it stores the locations. Your table schema is like below:

Location:

id (auto increment) | user (foreignkey to User) | lat (decimal) | long (decimal) | created_at (datetime)

Now you can provide an API that it receives lat,long and user(detect user by token or session) then store these data in the Location table.

In the client side, you should get the location from gps and send to the API.

Upvotes: 0

Related Questions