Top "Django-authentication" questions

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

TypeError: login() takes 1 positional argument but 2 were given

i have written a login view using buid in auth ,django auth.login() gives above error my code with error …

django django-authentication
How to get Django view to return form errors

This is my view: def main_page(request): if request.method == 'POST': form = RegistrationForm(request.POST) if form.is_valid(): …

django forms django-views django-authentication django-registration
How do I use the The login_required decorator in my URL?

I want to check that the user is authorized for certain URLs. I'm using generic views. The docs here say …

django django-authentication
Can django's auth_user.username be varchar(75)? How could that be done?

Is there anything wrong with running alter table on auth_user to make username be varchar(75) so it can fit …

django django-models django-authentication
In Django, how can you get all related objects with a particular User foreign Key

I have something like this: class Video(models.Model): user = models.ForeignKey(User, related_name='owner') ... and I'm trying to …

django django-models django-authentication django-related-manager
Django: How can I apply the login_required decorator to my entire site (excluding static media)?

The example provides a snippet for an application level view, but what if I have lots of different (and some …

django django-authentication login-required
Django authentication - wrong redirect url to login page

When a user is not logged I'm trying to enter areas of site for authenticated users only I should be …

django redirect django-authentication
How can I not use Django's admin login view?

I created my own view for login. However if a user goes directly to /admin it brings them to the …

django django-admin django-authentication
Django auth: increasing max username length

I need to increase the max username size in auth to exceed the 30 chars defined in the model. How can …

django django-authentication
Putting a django login form on every page

I'd like the login form (AuthenticationForm from django.contrib.auth) to appear on every page in my site if the …

django django-forms django-authentication