Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Created 'User filters' view in admin. Improved admin 'Lectures' view. #102

Merged
merged 3 commits into from
Jan 11, 2021

Conversation

ajusz
Copy link
Contributor

@ajusz ajusz commented Jan 3, 2021

No description provided.

@ajusz ajusz self-assigned this Jan 3, 2021
@Bozydarek Bozydarek requested a review from ref-humbold January 4, 2021 12:07
Copy link
Contributor

@JakubSzczerbinski JakubSzczerbinski left a comment

Choose a reason for hiding this comment

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

Looks good to me. I will manual test it and as soon @ref-humbold reviews, we can get this merged


def room_name(self, obj):
return obj._room_name
# Implementation have M2M Fields, only first record of room_of_user is taken in list_csv_room_by_member, what if many rooms defined?
Copy link
Member

Choose a reason for hiding this comment

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

FYI: I think it shouldn't be a problem as in middle table UserRoom users are related by OneToOneField :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, indeed. Then members=ManyToManyField is confusing (because in reality it's not M2M). I suggest removing it, because associative table does what we need.

Copy link
Member

@ref-humbold ref-humbold 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, many thanks for your contribution! Accepted :)

# Implementation have M2M Fields, only first record of room_of_user is taken in list_csv_room_by_member, what if many rooms defined?
room_name.admin_order_field = '_room_name'

def payment_accepted(self, obj): # FK from Many site, User can have many UserPreferences. Maybe link with related id should be provided.
Copy link
Member

Choose a reason for hiding this comment

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

FYI: #90

@ref-humbold ref-humbold requested a review from Bozydarek January 7, 2021 19:35
@JakubSzczerbinski
Copy link
Contributor

I tested the changes manually. I didn't find any bugs. Everything seems great from user/organizer POV.

Copy link
Member

@Bozydarek Bozydarek left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! It's great to see students contributing to this project. I also tested it manually and I took a look into source code. Everything works great 👍, however I want to highlight that only a very small group of people have access to the Django admin site. Most organizers have access only to the "admin panel" and features like that will be useful there too 😉

Anyway I approve this PR and I look forward to see the next ones 👍

@ref-humbold ref-humbold merged commit b8e1488 into master Jan 11, 2021
@pzmarzly pzmarzly deleted the issue-18-filters_in_admin_views branch December 9, 2021 19:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants