Please guide how to prevent multiple user to be logged in at a time using a user id?

asked 03 Jun '13, 01:03

George's gravatar image

George
133
accept rate: 0%


link

answered 04 Jun '13, 10:04

Nathaniel's gravatar image

Nathaniel
111
accept rate: 0%

https://docs.djangoproject.com/en/dev/topics/auth/default/#auth-web-requests

this can help you if he is logged in then prevent login

link

answered 04 Jun '13, 11:27

DjangoForum's gravatar image

DjangoForum ♦♦
636
accept rate: 8%

Thanks. I tried the code in Robert's blog.

I am using apache server and it seems that UserRestrictMiddleware was not run (even the "if" statement is commented out and no error is thrown out).

May I know why UserRestrictMiddleware was not run?

link

answered 07 Jun '13, 01:29

George's gravatar image

George
133
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2

Asked: 03 Jun '13, 01:03

Seen: 670 times

Last updated: 07 Jun '13, 01:29

powered by OSQA