# Path: accounts/forms.py
# class LoginForm(AuthenticationForm):
#     def __init__(self, *args, **kwargs):
#         super(LoginForm, self).__init__(*args, **kwargs)
#         self.fields['username'].widget = widgets.TextInput(
#             attrs={'placeholder': "username", "class": "form-control"})
#         self.fields['password'].widget = widgets.PasswordInput(
#             attrs={'placeholder': "password", "class": "form-control"})


from django.conf.urls import url
from django.urls import path
from . import views
from .forms import LoginForm


app_name = "accounts"

urlpatterns = [url(r'^login/$',
                   views.LoginView.as_view(success_url='/'),
                   name='login',
                   kwargs={'authentication_form': LoginForm}),
               url(r'^register/$',
                   views.RegisterView.as_view(success_url="/"),
                   name='register'),
               url(r'^logout/$',
                   views.LogoutView.as_view(),

# Path: accounts/forms.py
# class LoginForm(AuthenticationForm):
#     def __init__(self, *args, **kwargs):
#         super(LoginForm, self).__init__(*args, **kwargs)
#         self.fields['username'].widget = widgets.TextInput(
#             attrs={'placeholder': "username", "class": "form-control"})
#         self.fields['password'].widget = widgets.PasswordInput(
#             attrs={'placeholder': "password", "class": "form-control"})


# Path: accounts/urls.py
from django.conf.urls import url
from django.urls import path
from . import views
from .forms import LoginForm



app_name = "accounts"

urlpatterns = [url(r'^login/$',
                   views.LoginView.as_view(success_url='/'),
                   name='login',
                   kwargs={'authentication_form': LoginForm}),
               url(r'^register/$',
                   views.RegisterView.as_view(success_url="/"),
                   name='register'),
               url(r'^logout/$',
                   views.LogoutView.as_view(),

                   name='logout'),