SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SciPost
SciPost
Commits
bc242923
Commit
bc242923
authored
9 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug in country name display
parent
5e854d2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scipost/forms.py
+1
-1
1 addition, 1 deletion
scipost/forms.py
scipost/models.py
+7
-4
7 additions, 4 deletions
scipost/models.py
with
8 additions
and
5 deletions
scipost/forms.py
+
1
−
1
View file @
bc242923
...
@@ -22,7 +22,7 @@ class RegistrationForm(forms.Form):
...
@@ -22,7 +22,7 @@ class RegistrationForm(forms.Form):
email
=
forms
.
EmailField
(
label
=
'
email
'
)
email
=
forms
.
EmailField
(
label
=
'
email
'
)
orcid_id
=
forms
.
CharField
(
label
=
"
ORCID id
"
,
max_length
=
20
)
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}
"
>
'
))
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
)
affiliation
=
forms
.
CharField
(
label
=
'
Affiliation
'
,
max_length
=
300
)
#address = forms.CharField(label='Address', max_length=1000)
#address = forms.CharField(label='Address', max_length=1000)
personalwebpage
=
forms
.
URLField
(
label
=
'
Personal web page
'
)
personalwebpage
=
forms
.
URLField
(
label
=
'
Personal web page
'
)
...
...
This diff is collapsed.
Click to expand it.
scipost/models.py
+
7
−
4
View file @
bc242923
...
@@ -49,8 +49,8 @@ class Contributor(models.Model):
...
@@ -49,8 +49,8 @@ class Contributor(models.Model):
title
=
models
.
CharField
(
max_length
=
4
,
choices
=
TITLE_CHOICES
)
title
=
models
.
CharField
(
max_length
=
4
,
choices
=
TITLE_CHOICES
)
# username, password, email, first_name and last_name are inherited from User
# username, password, email, first_name and last_name are inherited from User
orcid_id
=
models
.
CharField
(
max_length
=
20
,
verbose_name
=
"
ORCID id
"
)
orcid_id
=
models
.
CharField
(
max_length
=
20
,
verbose_name
=
"
ORCID id
"
)
nationality
=
CountryField
(
default
=
'
NL
'
)
nationality
=
CountryField
()
country_of_employment
=
CountryField
(
default
=
'
NL
'
)
country_of_employment
=
CountryField
()
affiliation
=
models
.
CharField
(
max_length
=
300
,
verbose_name
=
'
affiliation
'
)
affiliation
=
models
.
CharField
(
max_length
=
300
,
verbose_name
=
'
affiliation
'
)
#address = models.CharField(max_length=1000, verbose_name="address")
#address = models.CharField(max_length=1000, verbose_name="address")
personalwebpage
=
models
.
URLField
(
verbose_name
=
'
personal web page
'
)
personalwebpage
=
models
.
URLField
(
verbose_name
=
'
personal web page
'
)
...
@@ -110,8 +110,8 @@ class Contributor(models.Model):
...
@@ -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>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>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>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>Nationality: </td><td> </td><td>
'
+
str
(
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>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>Affiliation: </td><td> </td><td>
'
+
self
.
affiliation
+
'
</td></tr>
'
#output += '<tr><td>Address: </td><td> </td><td>' + self.address + '</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>
'
output
+=
'
<tr><td>Personal web page: </td><td> </td><td>
'
+
self
.
personalwebpage
+
'
</td></tr>
'
...
@@ -134,3 +134,6 @@ class Contributor(models.Model):
...
@@ -134,3 +134,6 @@ class Contributor(models.Model):
output
+=
'
<tr><td>Can vet submitted reports</td></tr>
'
output
+=
'
<tr><td>Can vet submitted reports</td></tr>
'
output
+=
'
</table>
'
output
+=
'
</table>
'
return
output
return
output
#class LeadEditorGroup(models.Group)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment