diff --git a/fixtures-prod/.gitignore b/fixtures-prod/.gitignore new file mode 100644 index 00000000..f04f0f6e --- /dev/null +++ b/fixtures-prod/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!*.sh diff --git a/fixtures-prod/get.sh b/fixtures-prod/get.sh new file mode 100644 index 00000000..df1415e7 --- /dev/null +++ b/fixtures-prod/get.sh @@ -0,0 +1,29 @@ +#/bin/env bash + +# To run: +# bash ./get.sh +# + +models=( + "sites.site" + "auth.group" + "socialaccount.socialapp" + "coderdojochi.cdcuser" + "coderdojochi.course" + "coderdojochi.equipmenttype" + "coderdojochi.location" + "coderdojochi.meetingtype" + "coderdojochi.raceethnicity" + "coderdojochi.guardian" + "coderdojochi.meeting" + "coderdojochi.mentor" + "coderdojochi.student" + "coderdojochi.session" + "coderdojochi.mentororder" + "coderdojochi.order" +) + +for i in "${!models[@]}" +do + heroku run --app production-wac python -W ignore manage.py dumpdata "${models[$i]}" --indent 2 -- > "$i-${models[$i]}.json" +done diff --git a/weallcode/templates/weallcode/team.html b/weallcode/templates/weallcode/team.html index c16fd838..bc1ff1ab 100644 --- a/weallcode/templates/weallcode/team.html +++ b/weallcode/templates/weallcode/team.html @@ -189,16 +189,27 @@

Mentorship makes all the difference

- {% for mentor in mentors %} + {% for mentor in top_mentors %}
{% include "weallcode/snippets/team_member.html" with is_small=True name=mentor.full_name label=mentor.session_count image=mentor.avatar sublabel="classes" %}
{% endfor %}
+ +
+ {% for mentor in other_mentors %} +
+ {% include "weallcode/snippets/team_member.html" with is_small=True name=mentor.full_name label=mentor.session_count image=mentor.avatar sublabel="classes" %} +
+ {% endfor %} +
+ + {% if other_mentors %} +
+ +
+ {% endif %} -

- -

@@ -220,16 +231,18 @@

Volunteering for a better tomorrow

{% for volunteer in top_volunteers %}
- {% include "weallcode/snippets/team_member.html" with is_small=True name=volunteer.full_name image=volunteer.avatar %} + {% include "weallcode/snippets/team_member.html" with is_small=True name=volunteer.full_name label=volunteer.session_count image=volunteer.avatar sublabel="classes" %}
{% endfor %}
{% for volunteer in other_volunteers %} + {% if volunteer.session_count %}
- {% include "weallcode/snippets/team_member.html" with is_small=True name=volunteer.full_name image=volunteer.avatar %} + {% include "weallcode/snippets/team_member.html" with is_small=True name=volunteer.full_name label=volunteer.session_count image=volunteer.avatar sublabel="classes" %}
+ {% endif %} {% endfor %}
diff --git a/weallcode/views.py b/weallcode/views.py index b06a455b..268dd53a 100644 --- a/weallcode/views.py +++ b/weallcode/views.py @@ -179,7 +179,8 @@ def get_context_data(self, **kwargs): else: volunteers += [volunteer] - context['mentors'] = mentors + context['top_mentors'] = mentors[0:8] + context['other_mentors'] = mentors[8:] context['top_volunteers'] = volunteers[0:8] context['other_volunteers'] = volunteers[8:] return context