Uh oh!
There was an error while loading. Please reload this page.
Update birthdays to Date rather than DateTime - #839
Conversation
karbassi
commented
Jan 15, 2021
- Allow students up to 18 by default.
- Allow students up to 18 by default.
rgroves
left a comment
There was a problem hiding this comment.
Gonna send through a commit for the one change I noted.
| {% block extra_script %} | ||
| <script src="https://unpkg.com/js-datepicker@5.14.2/dist/datepicker.min.js"></script> | ||
| <script src="https://unpkg.com/js-datepicker@5.18.0/dist/datepicker.min.js"></script> |
There was a problem hiding this comment.
Just making a note, (possibly make a separate issue for future enhancement), to consider using a Subresource Integrity attribute for externally sourced script files like this one.
There was a problem hiding this comment.
Also, noticed on lines 7-9 this datepicker is included again:
{% block extra_head %}
<link rel="stylesheet" href="https://unpkg.com/js-datepicker@5.14.2/dist/datepicker.min.css">
{% endblock %}
I'll remove this and send through a commit.
Disregard the above. I just realized that is CSS and not JS that is being included in the extra head block.
Though the CSS version, I assume should match the JS version, which it does not currently (5.14.2 vs 5.18.0).
| ] | ||
| operations = [ | ||
| migrations.AlterField( |
There was a problem hiding this comment.
Is this alter for first_name supposed to be here? Doesn't make sense to be included here so just pointing it out to make sure it was intended.
rgroves
commented
Jan 16, 2021
Also of note:
Admin area does not enforce the age constraint for student. Though it is enforced in the Guardian add student form. Not sure if that was intentional or not. |
rgroves
commented
Jan 17, 2021
Was running through testing, in dj-admin the date field now shows it is a date only (no longer requires time) for mentor, guardian, and student—so the migrations seems to be working as intended. As a guardian, I was able to add a 19 year old student though with birthdate 1/16/2002. Noticed the change in coderdojochi/forms.py is what allows this, the min birthdate calculation uses an offset of -19 years. Intended or typo? |