Re: Location identification with login

2022-12-25 Thread Yeboah Dominic
This can be done GeoIP but it can be done in a different way I have done one before that was with REST API, all you have to do if you don't want to depend on any third library is to have a device model which stores the user and IP then whenever the user login saves it. So with this, you have all th

Re: Location identification with login

2022-12-25 Thread 'Kasper Laudrup' via Django users
On 25/12/2022 20.52, tristant wrote: Is there a mechanism in Django where we can identify the location of login? Any reading sources regarding this functionality would be much appreciated. What you're looking for is something called geoip. To the best of my knowledge there's no such thing b

Re: Location identification with login

2022-12-25 Thread David Nugent
Yes, that is certainly possible, although there is nothing built into Django itself. Web servers (and proxies) both pass the IP address of the remote user, which can be recorded at login together with reference to the account. Using GeoIP you can associate this more or less reliably to a locat

Re: How to allow user to delete their own profile after login with their default id.

2022-12-25 Thread Manjusha
Thanks, both techniques are working now i.e 1)Replacing User.delete(u.id) with u.delete() and in 2) user is no getting authenticated with email, it is authenticated with only username and password with authenticate function.

Location identification with login

2022-12-25 Thread tristant
Is there a mechanism in Django where we can identify the location of login? Any reading sources regarding this functionality would be much appreciated. Along the same line, is there a way to prevent a login attempt if the location is within certain blacklisted IP subnets? Thanks, -- You recei

Re: How to allow user to delete their own profile after login with their default id.

2022-12-25 Thread Eng Thanoon
from django.contrib.auth import authenticate def delete_account(request): if request.method == "POST": email = request.POST.get('email') password = request.POST.get('pswd1') u = User.authenticate(request=request,email=email,password=password) #this will check

Re: How to allow user to delete their own profile after login with their default id.

2022-12-25 Thread Eng Thanoon
from django.contrib.auth import authenticate def delete_account(request): if request.method == "POST": email = request.POST.get('email') password = request.POST.get('pswd1') u = User.authenticate(request=request,email=email,password=password) #this will check

Re: Assignment

2022-12-25 Thread Tanmay Tibrewal
Can you help me with this assignment problem? 1. List down the number of apps you would create in the Django application 2. Share screenshots of the model of every app which you will create in this use case 3. Create the following API a. To get plans b. To recharge (2-3 APIs as per your fra

Re: NEW BIE HERE HOW CAN I LEARN DJANGO FAST

2022-12-25 Thread Namanya Daniel
While learning Django, pay attention to URLs and settings and models, the rest you need basic python skills On Sunday, December 25, 2022 at 2:14:06 AM UTC+3 guru...@gmail.com wrote: > Hey, I just want to know how you've learned django framework and what > resources did you use. It would be gre