redhat-beyond / JobSeeker

https://github.com/redhat-beyond/JobSeeker
MIT License
2 stars 5 forks source link

🏇 Improve Login Form Design Using crispy-forms #89

Closed paOmer closed 2 years ago

paOmer commented 2 years ago

Improved login form design using django-crispy-form package.

django-crispy-forms is a package that helps style forms in django easily. Find more details here.

New login form screenshot:

Screen Shot 2022-04-17 at 20 18 07

Close #90 Close #117

paOmer commented 2 years ago

Please suggest test that it is really working Idea ti use client helper s fixture

Hi @Yarboa, I cant figure out how or what exactly to check here, would appreciate further guidance here

Yarboa commented 2 years ago

Please suggest test that it is really working Idea ti use client helper s fixture

Hi @Yarboa, I cant figure out how or what exactly to check here, would appreciate further guidance here

Why did you add crispy-form? add a form and test it works with crispy

paOmer commented 2 years ago

Please suggest test that it is really working Idea ti use client helper s fixture

Hi @Yarboa, I cant figure out how or what exactly to check here, would appreciate further guidance here

Why did you add crispy-form? add a form and test it works with crispy

I have repurposed this PR to edit the login form along installing django-crispy-forms in order to have a form to test on.

I have tried to use the client fixture in order to test crispy, though couldn't find a way. I tried the following: response = client.get("/login/") and couldn't find any reference to crispy, not in response.context in general, and not in response.context['form'] in specific.

I can offer a visual test:

Yarboa commented 2 years ago

Please suggest test that it is really working Idea ti use client helper s fixture

Hi @Yarboa, I cant figure out how or what exactly to check here, would appreciate further guidance here

Why did you add crispy-form? add a form and test it works with crispy

https://github.com/redhat-beyond/JobSeeker/blob/main/login/tests.py

Please update the test to verify login process, please look here as sample https://github.com/redhat-beyond/beyond-tutorial/blob/main/msgboard/tests.py#L59

Yarboa commented 2 years ago

Please suggest test that it is really working Idea ti use client helper s fixture

Hi @Yarboa, I cant figure out how or what exactly to check here, would appreciate further guidance here

Why did you add crispy-form? add a form and test it works with crispy

I have repurposed this PR to edit the login form along installing django-crispy-forms in order to have a form to test on.

I have tried to use the client fixture in order to test crispy, though couldn't find a way. I tried the following: response = client.get("/login/") and couldn't find any reference to crispy, not in response.context in general, and not in response.context['form'] in specific.

I can offer a visual test:

  • when not applying the crispy tag, meaning only mentioning {{ form }} in the login.html I get the following outcome: Screen Shot 2022-04-17 at 20 32 34
  • when applying {{ form.as_p }}, I get the following outcome: Screen Shot 2022-04-17 at 20 33 51
  • when applying the crispy tag {{ form|crispy }}, I get the following outcome: Screen Shot 2022-04-17 at 20 18 07

try this https://github.com/redhat-beyond/beyond-tutorial/blob/main/msgboard/tests.py#L25-L29