Questions tagged [django-authentication]

django-authentication refers to the built-in auth module for authentication & authorization that can be extended.

django-authentication refers to the built-in auth module for authentication & authorization that can be extended. It handles user accounts, groups, permissions and cookie-based user sessions.

See documentation.

1888 questions
0
votes
1 answer

Django inserts wrong domain to activation email, facebook auth and filebrowser

I've set up a Django project on a nginx server. But.. Django detects request.get_host() in signup and activation views as localhost and sends email (for activation and password reset) with links like http://localhost/.... I've set up Facebook…
Andy
  • 654
  • 7
  • 17
0
votes
1 answer

Integrating a module's login view with my own login view in Django

I'm trying to use this library to add two factor authentication to my project. I noticed that the module's has its own login view, that you can find right here, see class LoginView(IdempotentSessionWizardView):. The problem i'm having with this it's…
0
votes
1 answer

Django Allow Interaction with Users Data Only

I'm adding some user profile behavior to a Django app, and as usual I would like to restrict users from only being able to interact with their own data. This SO Q&A is related to the process itself: Django--- Allowing Users to only edit their…
Brian
  • 642
  • 7
  • 18
0
votes
1 answer

Django. How can I prevent another user from editing and deleting my listings?

Please help me implement these features so that another user cannot delete or edit my ads. So far, only unregistered users can not edit and delete. @login_required def listing_delete(request, listing_id): listing =…
0
votes
1 answer

Django logged_out.html page problem that redirect administration pages

http://127.0.0.1:8000/accounts/login/ This page is created successfully and working nice: And Problem with these pages: http://127.0.0.1:8000/accounts/logout/ This page redirect me Django Administration Pages that message to login again but I don't…
user11149657
0
votes
1 answer

Django auto logout not updating in Database

I'm working on a project using Python(2.7) and Django(1.11) in which I was needed to implement auto-logout on inactivity for a few minutes or hours. Note: I have searched a lot and take a look on a various related question but couldn't find any…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
0
votes
1 answer

@login_required decorator within an 'if' statement?

I have a model 'Playlist' with an attribute 'private' that can be True or False (and therefore private or public). I want to use the @login_required decorator only if 'private = False', but can't figure out how to achieve this result. Here is my…
Leaozinho
  • 139
  • 1
  • 13
0
votes
1 answer

How to shard the Django User model/table?

How do you shard the Django User model so that user records will be located in different databases/tables? Which modules and models and views need to be modified? Do I need to create a custom authentication backend? Is there a relatively painless…
Continuation
  • 12,722
  • 20
  • 82
  • 106
0
votes
3 answers

Use login_required decorator in Django 2.1

I have a basic requirement, I have a login page, where after a user logs in, it redirects to a page. If the user is not logged in, and he opens that url, he gets redirected to the login page and after successful login, he is redirected to the url he…
driftking9987
  • 1,673
  • 1
  • 32
  • 63
0
votes
1 answer

Understanding how the Django Auth app creates its tables

In the models.py file of the Django auth app, there are models for user and group which create their respective tables in the database: class user -> auth_user class group -> auth_group There is no class user_groups, and yet something fancy…
Dustin Michels
  • 2,951
  • 2
  • 19
  • 31
0
votes
1 answer

Django Conditional login redirect

This is my middleware which is continuously redirecting. How can i give conditional redirecting in my middleware? and instead of path name how can i get path_name. middleware.py class PermissionRequiredMiddleware: def __init__(self,…
0
votes
2 answers

django permissions to restrict view based on groups

I currently have an order management app. But the team I am creating this for has two departments the office and the factory who'll be using the same app but with each team having access to what they need. I'm confused if I should create two…
0
votes
0 answers

How to add disable password for django users

I have created a tool for my colleagues and i have integrated SSO with this django application as well. Now the way i'm planning to authenticate users are like the following. SSO page is sending the logged in user ID in cookie. If the logged in…
Ashwin
  • 245
  • 2
  • 7
  • 22
0
votes
1 answer

Django built-in authentication for reset password link chopping off token in url

I am using built-in Django authentication to send an email to reset a password. Sending the email works, but when I try and follow the link to the page to reset my password, Django changes the URL (kind of like a redirect I guess) and then is trying…
Walker Sorlie
  • 53
  • 1
  • 1
  • 7
0
votes
2 answers

Custom Middleware blocking my Password Reset View

I had made a Custom Middelware to secure all my views at once and made a custom decorator to exempt login and register/signup functions so that they're accessible to visitors. But when i tried to reset my password using the password-reset, i…
ans2human
  • 2,300
  • 1
  • 14
  • 29
1 2 3
99
100