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
8c5728dc
Commit
8c5728dc
authored
3 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Force non-null title in Profile
parent
3ea0f6c3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scipost_django/profiles/migrations/0035_alter_profile_title.py
+18
-0
18 additions, 0 deletions
...st_django/profiles/migrations/0035_alter_profile_title.py
scipost_django/profiles/models.py
+6
-2
6 additions, 2 deletions
scipost_django/profiles/models.py
with
24 additions
and
2 deletions
scipost_django/profiles/migrations/0035_alter_profile_title.py
0 → 100644
+
18
−
0
View file @
8c5728dc
# Generated by Django 3.2.5 on 2021-10-06 10:01
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
profiles
'
,
'
0034_auto_20210310_2026
'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'
profile
'
,
name
=
'
title
'
,
field
=
models
.
CharField
(
choices
=
[(
'
PR
'
,
'
Prof.
'
),
(
'
DR
'
,
'
Dr
'
),
(
'
MR
'
,
'
Mr
'
),
(
'
MRS
'
,
'
Mrs
'
),
(
'
MS
'
,
'
Ms
'
),
(
'
MX
'
,
'
Mx
'
)],
default
=
'
DR
'
,
max_length
=
4
),
),
]
This diff is collapsed.
Click to expand it.
scipost_django/profiles/models.py
+
6
−
2
View file @
8c5728dc
...
@@ -8,7 +8,7 @@ from django.db.models.functions import Concat
...
@@ -8,7 +8,7 @@ from django.db.models.functions import Concat
from
django.shortcuts
import
get_object_or_404
from
django.shortcuts
import
get_object_or_404
from
scipost.behaviors
import
orcid_validator
from
scipost.behaviors
import
orcid_validator
from
scipost.constants
import
TITLE_CHOICES
from
scipost.constants
import
TITLE_CHOICES
,
TITLE_DR
from
scipost.fields
import
ChoiceArrayField
from
scipost.fields
import
ChoiceArrayField
from
scipost.models
import
Contributor
from
scipost.models
import
Contributor
...
@@ -47,7 +47,11 @@ class Profile(models.Model):
...
@@ -47,7 +47,11 @@ class Profile(models.Model):
* mark somebody as a non-referee (if that person does not want to referee for SciPost)
* mark somebody as a non-referee (if that person does not want to referee for SciPost)
"""
"""
title
=
models
.
CharField
(
max_length
=
4
,
choices
=
TITLE_CHOICES
,
blank
=
True
,
null
=
True
)
title
=
models
.
CharField
(
max_length
=
4
,
choices
=
TITLE_CHOICES
,
default
=
TITLE_DR
)
first_name
=
models
.
CharField
(
max_length
=
64
)
first_name
=
models
.
CharField
(
max_length
=
64
)
last_name
=
models
.
CharField
(
max_length
=
64
)
last_name
=
models
.
CharField
(
max_length
=
64
)
...
...
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