-
Notifications
You must be signed in to change notification settings - Fork 14
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
Ambassadors #226
Ambassadors #226
Conversation
ajout du bouton telecharger et edit (si on modère le cours ou qu'on est staff). Petit pouce a cote du titre des documents certifie (qui se sort comme des grands en haut) |
Co-authored-by: 0xC4 <nikita.marchant@gmail.com>
Je merge dans ma branche pour finir le form dans le finder |
<turbo-frame id="{{ turbo_id }}"> | ||
<div id="courses-finder-col" class="finder-col" spinner-url="{% static "images/loading.gif" %}" empty-courses-url="{% url "finder_turbo" "courses" "empty" mobile %}"> | ||
{% for course in courses %} | ||
{% is_moderated request.user course as moderated %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devoir stocker des variables temporaires dans un template, ça sent le problème de design.
Je serais vraiment plus tenté de faire un truc dans les modèles python.
En plus de ça, tu as un problème de N queries, tu check moderated courses.all()
pour chaque cours.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il me semble que ce fichier disparait après le merge, il faudrait checker comment je l'ai modifié (ici) mais c'est vrai que le templatetag pourrait être transformé
@@ -38,6 +38,8 @@ class FileForm(forms.Form): | |||
), | |||
) | |||
|
|||
is_certified = forms.BooleanField(required=False, label="Certifier le document") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
faut virer required=False
et rajouter default=False
et puis fixer la migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas dans les forms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est un form pas un model
|
||
class UserModeratedCourseForm(forms.Form): | ||
user = forms.ModelChoiceField(queryset=User.objects.all()) | ||
courses = forms.ModelMultipleChoiceField(queryset=Course.objects.all()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment le form scale avec les 19k users de la prod ? Le browser arrive à render ? Comment on trouve un user en particulier ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On va faire du autocomplete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On pensait ou faire du autocomplete select jquery ou du django autocomplete light. On se demandais ce qui était le plus facilement maintenable
<turbo-frame id="{{ turbo_id }}"> | ||
<div id="courses-finder-col" class="finder-col" spinner-url="{% static "images/loading.gif" %}" empty-courses-url="{% url "finder_turbo" "courses" "empty" mobile %}"> | ||
{% for course in courses %} | ||
{% is_moderated request.user course as moderated %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il me semble que ce fichier disparait après le merge, il faudrait checker comment je l'ai modifié (ici) mais c'est vrai que le templatetag pourrait être transformé
No description provided.