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

Ambassadors #226

Merged
merged 7 commits into from
Feb 15, 2022
Merged

Ambassadors #226

merged 7 commits into from
Feb 15, 2022

Conversation

Mortinat
Copy link
Contributor

No description provided.

@Mortinat
Copy link
Contributor Author

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)
image
Quand on edit un document on peut le certifier (si on modère le cours ou qu'on est staff)
image
et ajout d'une page pour facilement ajouter des cours modéré a un utilisateur (oui le bouton submit est énorme)
image
TODO: Voir avec @Minigrim0 un moyen efficace pour display le finder en mode form ou non

@Mortinat Mortinat self-assigned this Feb 12, 2022
Mortinat and others added 2 commits February 13, 2022 14:38
@Minigrim0 Minigrim0 marked this pull request as ready for review February 15, 2022 22:09
@Minigrim0
Copy link
Contributor

Je merge dans ma branche pour finir le form dans le finder

@Minigrim0 Minigrim0 merged commit d6ca0ba into finder_update Feb 15, 2022
@Minigrim0 Minigrim0 deleted the ambassadors branch February 15, 2022 22:10
<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 %}
Copy link
Contributor

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.

Copy link
Contributor

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")
Copy link
Contributor

@C4ptainCrunch C4ptainCrunch Feb 18, 2022

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Pas dans les forms

Copy link
Contributor Author

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())
Copy link
Contributor

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 ?

Copy link
Contributor

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

Copy link
Contributor Author

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 %}
Copy link
Contributor

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é

www/urls.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants