diff --git a/scipost/forms.py b/scipost/forms.py index 8b1894af0fe79db534d9702997ad1b0114a5e48b..9a44888e912b255a988a0cefa7b5a150ca637eb5 100644 --- a/scipost/forms.py +++ b/scipost/forms.py @@ -22,7 +22,7 @@ class RegistrationForm(forms.Form): email = forms.EmailField(label='email') orcid_id = forms.CharField(label="ORCID id", max_length=20) nationality = LazyTypedChoiceField(choices=countries, initial='CA', widget=CountrySelectWidget(layout='{widget}<img class="country-select-flag" id="{flag_id}" style="margin: 6px 4px 0" src="{country.flag}">')) - country_of_employment = LazyTypedChoiceField(choices=countries, initial='CA', widget=CountrySelectWidget(layout='{widget}<img class="country-select-flag" id="{flag_id}" style="margin: 6px 4px 0" src="{country.flag}">')) + country_of_employment = LazyTypedChoiceField(choices=countries, initial='NL', widget=CountrySelectWidget(layout='{widget}<img class="country-select-flag" id="{flag_id}" style="margin: 6px 4px 0" src="{country.flag}">')) affiliation = forms.CharField(label='Affiliation', max_length=300) #address = forms.CharField(label='Address', max_length=1000) personalwebpage = forms.URLField(label='Personal web page') diff --git a/scipost/models.py b/scipost/models.py index 759b4f83197f35b54eb3d6905f3be2b0ac9c9753..90ef55f923c5dacd3b64bf50e3f18bdf0bf3fe5d 100644 --- a/scipost/models.py +++ b/scipost/models.py @@ -49,8 +49,8 @@ class Contributor(models.Model): title = models.CharField(max_length=4, choices=TITLE_CHOICES) # username, password, email, first_name and last_name are inherited from User orcid_id = models.CharField(max_length=20, verbose_name="ORCID id") - nationality = CountryField(default='NL') - country_of_employment = CountryField(default='NL') + nationality = CountryField() + country_of_employment = CountryField() affiliation = models.CharField(max_length=300, verbose_name='affiliation') #address = models.CharField(max_length=1000, verbose_name="address") personalwebpage = models.URLField(verbose_name='personal web page') @@ -110,8 +110,8 @@ class Contributor(models.Model): output += '<tr><td>Last name: </td><td> </td><td>' + self.user.last_name + '</td></tr>' output += '<tr><td>Email: </td><td> </td><td>' + self.user.email + '</td></tr>' output += '<tr><td>ORCID id: </td><td> </td><td>' + self.orcid_id + '</td></tr>' - output += '<tr><td>Nationality: </td><td> </td><td>' + self.nationality.name + '</td></tr>' - output += '<tr><td>Country of employment: </td><td> </td><td>' + self.country_of_employment.name + '</td></tr>' + output += '<tr><td>Nationality: </td><td> </td><td>' + str(self.nationality.name) + '</td></tr>' + output += '<tr><td>Country of employment: </td><td> </td><td>' + str(self.country_of_employment.name) + '</td></tr>' output += '<tr><td>Affiliation: </td><td> </td><td>' + self.affiliation + '</td></tr>' #output += '<tr><td>Address: </td><td> </td><td>' + self.address + '</td></tr>' output += '<tr><td>Personal web page: </td><td> </td><td>' + self.personalwebpage + '</td></tr>' @@ -134,3 +134,6 @@ class Contributor(models.Model): output += '<tr><td>Can vet submitted reports</td></tr>' output += '</table>' return output + + +#class LeadEditorGroup(models.Group)