-
Notifications
You must be signed in to change notification settings - Fork 1
[OS-1729] Checklist > extract the personal data checklist status from the admission to the candidate #3054
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
base: dev
Are you sure you want to change the base?
Conversation
4129fb2 to
f30d8d3
Compare
73ef30c to
cc420fd
Compare
cc420fd to
2ea68ac
Compare
b461fc1 to
8aef431
Compare
templatetags/admission.py
Outdated
|
|
||
|
|
||
| @register.filter | ||
| def get_attr(obj, attribute): |
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 pense que tu peux mettre ceci dans base.templatetags.getattr
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.
En fait, je ne savais pas que ce filtre existait déjà mais je pense que je peux le reprendre directement ici, cela évitera de créer un nouveau filtre assez proche.
|
|
||
|
|
||
| @register.filter | ||
| def get_item(dictionary, value): |
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.
et ceci dans base.templatetags.dictionnar
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.
Ce serait une bonne idée effectivement mais l'inconvénient est qu'on a déjà un filtre appelé de la même manière dans base.templatetags.dictionnary qui ne fait pas la même chose (celui dans admission renvoie la clé par défaut, celui dans base retourne None). Que préfères-tu qu'on fasse ici ?
8aef431 to
a0b80eb
Compare
…comment from the admission to the candidate
a0b80eb to
70126a3
Compare
|
|
||
|
|
||
| @register.filter | ||
| def get_item(dictionary, value): |
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.
@register.filter
def get_item(dictionary, key, value=None):
return dictionary.get(key, value)Si on fait ca dans base; cela serait pas ok?
et toi tu devrais l'appeler ainsi get_item key key ?
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 ne suis pas sûr qu'on puisse passer 3 arguments à un filtre. Ou alors il faudrait utiliser un simple_tag (comme admission.templatetags.admission.get_item_or_default) ?
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.
Fais au plus simple :) on peux laisser en 'létat du coup
2ea68ac to
fe20555
Compare
No description provided.