HI Mike, Thanks a lot for the reply I can capture the hostname of the localhost i also want to capture mac address of the local host. is there any way we can capture the Mac Address of the client?
On Friday, 5 March 2021 at 12:21:31 UTC+5:30 Mike Dewhirst wrote: > On 5/03/2021 4:52 pm, Sachin Kumar wrote: > > Hi Experts, > > > > Is there any way or logic in Django where we can bind user login id > > and password with first device login id. > > for example:- > > If a user first time login into a PC A, he can't login into PC B using > > same login id. He can only login into PC A with his login id. if he > > changes the PC then from backend we can remove his old registration > > Removing an old registration ... ie., a login, is likely to be > problematic with cascading deletion needing careful attention. It feels > like a sledghammer to crack a nut. > > Without knowing why it is difficult to suggest a reasonable approach. > > In any case, if you need a device ID you might look at ... > > from socket import gethostname > device_id = gethostname() > > > > and he can login into New PC. > > > > Please help me with the logic or any tutorial on this. > > > > > > Regards > > Sachin > > -- > > 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 [email protected] > > <mailto:[email protected]>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/django-users/85c94977-67b8-4e4f-8b50-c12a5a992aecn%40googlegroups.com > > > < > https://groups.google.com/d/msgid/django-users/85c94977-67b8-4e4f-8b50-c12a5a992aecn%40googlegroups.com?utm_medium=email&utm_source=footer > >. > > > -- > Signed email is an absolute defence against phishing. This email has > been signed with my private key. If you import my public key you can > automatically decrypt my signature and be sure it came from me. Just > ask and I'll send it to you. Your email software can handle signing. > > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ff10cdb3-b68b-41f7-88f6-922498ebb6b4n%40googlegroups.com.

