-
Notifications
You must be signed in to change notification settings - Fork 9
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
🚧 Nouvelles conversations unifiées #944
base: develop
Are you sure you want to change the base?
Conversation
- New view - New template WIP
- redirect to new conversatino if posted message with new=1 query param in GET - beginning of full feed
…uv/recommandations-collaboratives into feature/new-conversations
…uv/recommandations-collaboratives into feature/new-conversations
project = get_object_or_404( | ||
models.Project.objects.filter(sites=request.site).with_unread_notifications( | ||
user_id=request.user.id | ||
), | ||
pk=project_id, | ||
) |
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.
project = get_object_or_404( | |
models.Project.objects.filter(sites=request.site).with_unread_notifications( | |
user_id=request.user.id | |
), | |
pk=project_id, | |
) | |
project = get_object_or_404( | |
models.Project.objects.filter(sites=request.site).with_unread_notifications( | |
user_id=request.user.id | |
).select_related("commune__department"), | |
pk=project_id, | |
) |
recoco/apps/projects/views/detail.py
Outdated
|
||
feed.sort(key=lambda x: x["timestamp"]) | ||
|
||
return render(request, "projects/project/conversations_new.html", locals()) |
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.
Je me permets de remettre en question l'usage de locals
. Pourquoi veut on passer toutes ces données aux templates?
|
||
advising = get_advisor_for_project(request.user, project) | ||
|
||
is_regional_actor or has_perm_or_403(request.user, "view_public_notes", project) |
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 peut faire remonter has_perm_or_403
en haut de cette fonction, pour éviter de faire des requêtes si on est dans un cas de 403
- Add topic field to `Note` model - add "topic" field to feed data structure in new conversation view - make use of new field by regrouping by it
…ivities to pevent duplicates
- Merge branches - Add tests - Add "topic_name" as an optional argument for POST while creating a public note
Il s'agit de :
Décrivez vos changements
Prototypage des nouvelles conversations unifiées
Checklist d'acceptation de revue de code
Demandes