you want LoginView
https://docs.djangoproject.com/en/2.0/topics/auth/default/#django.contrib.auth.views.LoginView
On Saturday, July 7, 2018 at 7:42:53 AM UTC-4, Ahmad wrote:
>
> hello everyone,
>
> when i import this line it's not working.
> from django.contrib.auth.views import login
>
> My Django Versions is 2.0
>
>
>
> from django.conf.urls import url
> from . import views
> from django.contrib.auth.views import login
>
> urlpatterns = [
> url(r'^$',views.home),
> url(r'^login/$', login, {'template_name': 'accounts/login.html'}),
>
> ]
>
>
> error :
>
>
> from django.contrib.auth.views import login
> ImportError: cannot import name 'login'
>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/58ebf268-8ad6-422b-a693-63c0fca02ce3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.