Conversation
Cez02
commented
Jan 5, 2025
- Usunięcie modelu Effects
- Usunięcie filtru grup efektów z panelu admina i stron użytkownika
- Usunięcie metody get_completed_effects z modelu CompletedCourses
| .select_related('semester', 'course_type') | ||
| .prefetch_related('tags', 'effects') | ||
| .prefetch_related('tags') |
There was a problem hiding this comment.
Biorąc pod uwagę, co liczy ta pomocnicza funkcja, to nie tylko wystąpienie 'effects', ale całe te dwa wiersze nie mają sensu. Warto to usunąć całkiem, tak jak nieużywaną klasę z apps.enrollment.courses.admin.
There was a problem hiding this comment.
Usunąłem ww. selekcje w pomocniczej funkcji jak i nieużywaną klasę CourseInstanceAdmin z admina
436d288 to
4230238
Compare
| qs = Proposal.objects.filter(status__in=filter_statuses).order_by('name') | ||
| proposal_list = [] | ||
| for p in qs.prefetch_related('tags'): | ||
| for p in qs.prefetch_related('thematic_tags', "specialist_tags"): |
There was a problem hiding this comment.
| for p in qs.prefetch_related('thematic_tags', "specialist_tags"): | |
| for p in qs.prefetch_related('thematic_tags', 'specialist_tags'): |
(i analogicznie w co najmniej jeszcze jednym miejscu)
| "/fereol_admin/courses/thematictag/", | ||
| "/fereol_admin/courses/thematictag/", |
There was a problem hiding this comment.
To chyba miały być dwie różne rzeczy.
| verbose_name = 'Tag tematyczny (I st.)' | ||
| verbose_name_plural = 'Tagi tematyczne (I st.)' | ||
| app_label = 'courses' | ||
|
|
||
|
|
||
| class SpecialistTag(BaseTag): | ||
| class Meta: | ||
| verbose_name = 'Tag specjalistyczny (II st.)' | ||
| verbose_name_plural = 'Tagi specjalistyczne (II st.)' |
There was a problem hiding this comment.
To może rewolucyjne, ale przy okazji sprawmy, żeby w systemie posługiwać się językiem polskim (i jednocześnie stosować nomenklaturę pojawiającą się w programie studiów) – plus oczywiście analogiczne zmiany w innych plikach.
| verbose_name = 'Tag tematyczny (I st.)' | |
| verbose_name_plural = 'Tagi tematyczne (I st.)' | |
| app_label = 'courses' | |
| class SpecialistTag(BaseTag): | |
| class Meta: | |
| verbose_name = 'Tag specjalistyczny (II st.)' | |
| verbose_name_plural = 'Tagi specjalistyczne (II st.)' | |
| verbose_name = "Znacznik tematyczny (I st.)" | |
| verbose_name_plural = "Znaczniki tematyczne (I st.)" | |
| app_label = 'courses' | |
| class SpecialistTag(BaseTag): | |
| class Meta: | |
| verbose_name = "Znacznik specjalistyczny (II st.)" | |
| verbose_name_plural = "Znaczniki specjalistyczne (II st.)" |
(Podwójne cudzysłowy stosujemy dla napisów przeznaczonych "dla ludzkich oczu", a pojedyncze – dla tych przetwarzanych wewnętrznie w kodzie.)
| this.allThematicTags = cloneDeep(filtersData.allThematicTags || {}); | ||
| this.allSpecialistTags = cloneDeep(filtersData.allSpecialistTags || {}); |
There was a problem hiding this comment.
Skąd || {}? Dlaczego w innych CourseFilter.vue tego nie dodajemy? (To uczciwe pytanie, nie sugestia, że to źle…) Dlaczego w innych CourseFilter.vue tego nie dodajemy?
| migrations.AlterModelOptions( | ||
| name='thematictag', | ||
| options={'verbose_name': 'Tag specjalistyczny (II st.)', 'verbose_name_plural': 'Tagi specjalistyczne (II st.)'}, | ||
| ), |
There was a problem hiding this comment.
To chyba odnosi się do zmiany opcji starego modelu tag, ale wartości tekstowe nie odpowiadają jego nowej nazwie thematictag. Być może to po prostu jakaś stara wersja migracji, ale trzeba coś z tym zrobić.