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
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
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
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.
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
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
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
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
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
9 matches
Mail list logo