Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding homepage for dog owner #67

Merged
merged 1 commit into from
May 4, 2022

Conversation

OfirMatasas
Copy link
Collaborator

@OfirMatasas OfirMatasas commented Apr 10, 2022

Desired Outcome

After the dog owner user is logged in to the website, he moved to the homepage of the site.
The homepage is the first page that the user exposed after login (or after clicking the Hotails logo on the navbar), where the dog owner can see all the daycares registered to Hotails, and check their profile for more actions.

Implemented Changes

Creating homepage only for dog owners, if another types of users will try to reach this site the will redirect back to the login page.

Connected Issue/Story

closes #66

Definition of Done

Arrange the URL patterns in Hotails and main apps
Develop logic functionality for dog owner users
Add a UI for visualization to logical implementations testing

Test coverage

This PR includes new unit and integration tests to go with the code changes

Untitled

@OfirMatasas OfirMatasas force-pushed the dog-owner-homepage branch 7 times, most recently from 8e889d8 to d01c7e8 Compare April 17, 2022 12:28
@OfirMatasas OfirMatasas changed the title Dog owner homepage Adding homepage for dog owner Apr 17, 2022
@tamirmatok tamirmatok force-pushed the dog-owner-homepage branch 4 times, most recently from 63ee536 to 73b35d9 Compare April 20, 2022 19:32
@ormergi
Copy link
Contributor

ormergi commented Apr 21, 2022

ping

Copy link
Collaborator

@ErezCohenn ErezCohenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Job tamir and ofir!!
Just one thing for next: I think in the future when we will implement the search app, the dog owner will see on the home page the most rated daycares, instead of all the daycares that exsists.

dogowner/templates/dogowner/dog_owner_homepage.html Outdated Show resolved Hide resolved
Copy link
Contributor

@jeniaSakirko jeniaSakirko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

daycare/models.py Outdated Show resolved Hide resolved
@OfirMatasas OfirMatasas force-pushed the dog-owner-homepage branch 2 times, most recently from e640936 to 3101ad5 Compare April 24, 2022 09:07
daycare/test_image.py Outdated Show resolved Hide resolved
daycare/test_image.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@ErezCohenn ErezCohenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@OfirMatasas OfirMatasas force-pushed the dog-owner-homepage branch 3 times, most recently from 9bcb065 to 5282a31 Compare April 28, 2022 10:56
@OfirMatasas OfirMatasas requested a review from Omeramsc April 28, 2022 11:04
@tamirmatok tamirmatok force-pushed the dog-owner-homepage branch 2 times, most recently from a853be2 to 2f16f00 Compare May 2, 2022 17:35
Copy link
Collaborator

@Yuval-Vino Yuval-Vino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job guys! i left few little comments tell me what you think!

main/tests.py Outdated Show resolved Hide resolved
main/tests.py Outdated Show resolved Hide resolved
@OfirMatasas OfirMatasas force-pushed the dog-owner-homepage branch from 2f16f00 to 705f393 Compare May 3, 2022 11:57
When the dog owner is logged in to Hotails, or when the home is pressed
via navbar, All the daycares in the database will be shown to the dog
owner on its homepage, with the possibility to check their profile.
If the daycare doesn't have any profile picture, a default one will be
presented.

Signed-off-by: Ofir Matasas <[email protected]>
Signed-off-by: tamirmatok <[email protected]>
@OfirMatasas OfirMatasas force-pushed the dog-owner-homepage branch from 705f393 to a05e08b Compare May 3, 2022 22:38
client.force_login(user=create_dog_owner_user.user)
response = client.get("/homepage/")
assert response.status_code == 200
assert list(response.context['daycares']) == list(DayCare.objects.all())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want this PR merged ASAP, so please open a ticket to: assign both sides of the assertion equation to variables, then assert between the variables. it will improve the readability of the test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #104

Copy link
Contributor

@Omeramsc Omeramsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Omeramsc Omeramsc merged commit 467add9 into redhat-beyond:main May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create homepage for dog owner
7 participants