Feat/155 change of folder architecture#157
Open
DominikDab341 wants to merge 17 commits intomasterfrom
Open
Conversation
…into feat/155-change-of-folder-architecture
Member
|
awaiting architecture discussion |
MoonPrincess06
requested changes
Mar 3, 2026
Collaborator
MoonPrincess06
left a comment
There was a problem hiding this comment.
Poza tym jednym komentarzu, co zostawiłam, nie rzuca mi się nic takiego w oczy
Comment on lines
155
to
161
| def get_queryset(self): | ||
| return ( | ||
| Quiz.objects.filter(sessions__user=self.request.user, sessions__is_active=True) | ||
| .select_related("maintainer") | ||
| .order_by("-sessions__updated_at") | ||
| .distinct() | ||
| ) |
Collaborator
There was a problem hiding this comment.
tu wciąż szukamy maintainera. Trzeba to zmienić na ownera
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zmieniłem architekturę folderów, dodałem parę testów i migrację, która powinna stworzyć root foldery dla istniejących już użytkowników. Zmergowałem również kod Wiktora, który implementuje endpointy library i model SharedFolder. Zrefactorowałem go tak, żeby była jedna klasa APIView zajmująca się tą logiką (dopiero po fakcie zobaczyłem, że sposób, którym zrobił był opisany przez Sarę więc jeżeli należy to zmienić to zmienię ).
Important
Refactor folder architecture by introducing
FolderandSharedFoldermodels, renamingmaintainertocreator, and updating views, serializers, and tests accordingly.Foldermodel inmodels.pywith fields forname,owner,parent,created_at, andupdated_at.SharedFoldermodel for sharing folders with users or study groups.0004_folder_quiz_folder.py,0017_sharedfolder.py, and0021_create_root_folders.pyto set up folder structure and root folders for users.maintainertocreatorinQuizmodel and updated related fields and permissions.Quizmodel to include afolderfield, linking quizzes to folders.QuizViewSetandFolderViewSetto handle folder-related operations and permissions.LibraryViewto handle library endpoints for accessing folders and quizzes.tests/to cover new folder architecture, permissions, and library endpoints.This description was created by
for ac52c07. You can customize this summary. It will automatically update as commits are pushed.