diff --git a/src/profiles/forms.py b/src/profiles/forms.py deleted file mode 100644 index 81af6302..00000000 --- a/src/profiles/forms.py +++ /dev/null @@ -1,11 +0,0 @@ -from django import forms - -from . import models - - -class ProfileForm(forms.ModelForm): - email = forms.EmailField() - - class Meta: - model = models.Profile - fields = [] diff --git a/src/profiles/migrations/0002_profile_description.py b/src/profiles/migrations/0002_profile_description.py new file mode 100644 index 00000000..f53796c4 --- /dev/null +++ b/src/profiles/migrations/0002_profile_description.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-04-13 12:42 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('profiles', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='profile', + name='description', + field=models.TextField(default='', help_text='Please include any info you think could be relevant, like drivers license, first aid certificates, crafts, skills and previous experience.'), + ), + ] diff --git a/src/profiles/migrations/0003_auto_20170413_1703.py b/src/profiles/migrations/0003_auto_20170413_1703.py new file mode 100644 index 00000000..6025455d --- /dev/null +++ b/src/profiles/migrations/0003_auto_20170413_1703.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-04-13 15:03 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('profiles', '0002_profile_description'), + ] + + operations = [ + migrations.AddField( + model_name='profile', + name='name', + field=models.CharField(blank=True, default='', help_text='Your name or handle', max_length=200), + ), + migrations.AlterField( + model_name='profile', + name='description', + field=models.TextField(blank=True, default='', help_text='Please include any info you think could be relevant, like drivers license, first aid certificates, crafts, skills and previous experience.'), + ), + ] diff --git a/src/profiles/models.py b/src/profiles/models.py index 2e85ca33..aaae85e2 100644 --- a/src/profiles/models.py +++ b/src/profiles/models.py @@ -18,6 +18,19 @@ class Profile(CreatedUpdatedModel, UUIDModel): help_text=_('The django user this profile belongs to.'), ) + name = models.CharField( + max_length=200, + default='', + blank=True, + help_text='Your name or handle' + ) + + description = models.TextField( + default='', + blank=True, + help_text='Please include any info you think could be relevant, like drivers license, first aid certificates, crafts, skills and previous experience. Please also include availability if you are not there for the full week.', + ) + @property def email(self): return self.user.email diff --git a/src/profiles/templates/account/email.html b/src/profiles/templates/account/email.html index ab5c1b26..743d9c4d 100644 --- a/src/profiles/templates/account/email.html +++ b/src/profiles/templates/account/email.html @@ -1,4 +1,4 @@ -{% extends 'profiles/profile_base.html' %} +{% extends 'profile_base.html' %} {% load i18n %} {% load bootstrap3 %} diff --git a/src/profiles/templates/account/email_confirm.html b/src/profiles/templates/account/email_confirm.html index 199d71f2..e7950cd3 100644 --- a/src/profiles/templates/account/email_confirm.html +++ b/src/profiles/templates/account/email_confirm.html @@ -1,4 +1,4 @@ -{% extends 'profiles/profile_base.html' %} +{% extends 'profile_base.html' %} {% load i18n %} {% load account %} diff --git a/src/profiles/templates/account/password_change.html b/src/profiles/templates/account/password_change.html index d2835066..00b77419 100644 --- a/src/profiles/templates/account/password_change.html +++ b/src/profiles/templates/account/password_change.html @@ -1,4 +1,4 @@ -{% extends 'profiles/profile_base.html' %} +{% extends 'profile_base.html' %} {% load account %} {% load bootstrap3 %} diff --git a/src/profiles/templates/profile_base.html b/src/profiles/templates/profile_base.html new file mode 100644 index 00000000..6f606936 --- /dev/null +++ b/src/profiles/templates/profile_base.html @@ -0,0 +1,23 @@ +{% extends 'base.html' %} + +{% load account %} +{% load bootstrap3 %} + +{% block content %} +
You are logged in as {{ request.user.email }}
+ +The information in your profile is only visible to team responsible and organisers.
+If you intend to join one or more teams you can use the profile to help the team responsible understand who you are and what you have to offer.
+- - Change password - - - Manage emails - - - Logout - - - {% if user.is_authenticated and user.orders.exists %} - - Orders - - - {% if has_tickets %} - - Tickets - - {% endif %} - - {% if user.creditnotes.exists %} - - Credit Notes - - {% endif %} - - {% endif %} -
-This is a list of the teams for {{ camp.title }}. To join a team just press the Join button. You can also leave a team if you are already a member (please let the team responsible know why!).
+This is a list of the teams for {{ camp.title }}. To join a team just press the Join button, but please put some info in your profile first, so the team responsible has some idea who you are.
+You can also leave a team of course, but please let the team responsible know why :)
Team memberships need to be approved by a team responsible. You will receive a message when your membership has been approved.
At {{ camp.title }} all organisers and volunteers buy full tickets like everyone else. In the future our budget may allow for discounts or free tickets for volunteers, but not this year. However: Please let us know if you can't afford a ticket - we will figure something out!
We currently have {{ teams.count }} teams for {{ camp.title }}: