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
0e8ce599
Commit
0e8ce599
authored
9 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Add supervisor field to theses
parent
974a285a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theses/forms.py
+1
-1
1 addition, 1 deletion
theses/forms.py
theses/models.py
+4
-1
4 additions, 1 deletion
theses/models.py
with
5 additions
and
2 deletions
theses/forms.py
+
1
−
1
View file @
0e8ce599
...
@@ -17,7 +17,7 @@ THESIS_REFUSAL_CHOICES = (
...
@@ -17,7 +17,7 @@ THESIS_REFUSAL_CHOICES = (
class
RequestThesisLinkForm
(
forms
.
ModelForm
):
class
RequestThesisLinkForm
(
forms
.
ModelForm
):
class
Meta
:
class
Meta
:
model
=
ThesisLink
model
=
ThesisLink
fields
=
[
'
type
'
,
'
discipline
'
,
'
domain
'
,
'
specialization
'
,
'
title
'
,
'
author
'
,
'
institution
'
,
'
defense_date
'
,
'
pub_link
'
,
'
abstract
'
]
fields
=
[
'
type
'
,
'
discipline
'
,
'
domain
'
,
'
specialization
'
,
'
title
'
,
'
author
'
,
'
supervisor
'
,
'
institution
'
,
'
defense_date
'
,
'
pub_link
'
,
'
abstract
'
]
def
__init__
(
self
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
RequestThesisLinkForm
,
self
).
__init__
(
*
args
,
**
kwargs
)
super
(
RequestThesisLinkForm
,
self
).
__init__
(
*
args
,
**
kwargs
)
...
...
This diff is collapsed.
Click to expand it.
theses/models.py
+
4
−
1
View file @
0e8ce599
...
@@ -29,6 +29,8 @@ class ThesisLink(models.Model):
...
@@ -29,6 +29,8 @@ class ThesisLink(models.Model):
pub_link
=
models
.
URLField
(
verbose_name
=
'
URL (external repository)
'
)
pub_link
=
models
.
URLField
(
verbose_name
=
'
URL (external repository)
'
)
author
=
models
.
CharField
(
max_length
=
1000
)
author
=
models
.
CharField
(
max_length
=
1000
)
author_as_cont
=
models
.
ManyToManyField
(
Contributor
,
blank
=
True
,
related_name
=
'
author_cont
'
)
author_as_cont
=
models
.
ManyToManyField
(
Contributor
,
blank
=
True
,
related_name
=
'
author_cont
'
)
supervisor
=
models
.
CharField
(
max_length
=
1000
,
default
=
''
)
supervisor_as_cont
=
models
.
ManyToManyField
(
Contributor
,
blank
=
True
,
verbose_name
=
'
supervisor(s)
'
,
related_name
=
'
supervisor_cont
'
)
institution
=
models
.
CharField
(
max_length
=
300
,
verbose_name
=
'
degree granting institution
'
)
institution
=
models
.
CharField
(
max_length
=
300
,
verbose_name
=
'
degree granting institution
'
)
defense_date
=
models
.
DateField
(
verbose_name
=
'
date of thesis defense
'
)
defense_date
=
models
.
DateField
(
verbose_name
=
'
date of thesis defense
'
)
abstract
=
models
.
TextField
(
verbose_name
=
'
abstract, outline or summary
'
)
abstract
=
models
.
TextField
(
verbose_name
=
'
abstract, outline or summary
'
)
...
@@ -59,6 +61,7 @@ class ThesisLink(models.Model):
...
@@ -59,6 +61,7 @@ class ThesisLink(models.Model):
header
+=
'
<tr><td>Specialization: </td><td></td><td>
'
+
journals_spec_dict
[
self
.
specialization
]
+
'
</td></tr>
'
header
+=
'
<tr><td>Specialization: </td><td></td><td>
'
+
journals_spec_dict
[
self
.
specialization
]
+
'
</td></tr>
'
header
+=
'
<tr><td>URL: </td><td> </td><td><a href=
"'
+
self
.
pub_link
+
'"
>
'
+
self
.
pub_link
+
'
</a></td></tr>
'
header
+=
'
<tr><td>URL: </td><td> </td><td><a href=
"'
+
self
.
pub_link
+
'"
>
'
+
self
.
pub_link
+
'
</a></td></tr>
'
header
+=
'
<tr><td>Degree granting institution: </td><td> </td><td>
'
+
self
.
institution
+
'
</td></tr>
'
header
+=
'
<tr><td>Degree granting institution: </td><td> </td><td>
'
+
self
.
institution
+
'
</td></tr>
'
header
+=
'
<tr><td>Supervisor(s): </td><td></td><td>
'
+
self
.
supervisor
+
'
</td></tr>
'
header
+=
'
<tr><td>Defense date: </td><td> </td><td>
'
+
str
(
self
.
defense_date
)
+
'
</td></tr>
'
header
+=
'
<tr><td>Defense date: </td><td> </td><td>
'
+
str
(
self
.
defense_date
)
+
'
</td></tr>
'
header
+=
'
</table>
'
header
+=
'
</table>
'
return
header
return
header
...
@@ -66,7 +69,7 @@ class ThesisLink(models.Model):
...
@@ -66,7 +69,7 @@ class ThesisLink(models.Model):
def
header_as_li
(
self
):
def
header_as_li
(
self
):
header
=
'
<li><div class=
"
flex-container
"
>
'
header
=
'
<li><div class=
"
flex-container
"
>
'
header
+=
'
<div class=
"
flex-whitebox0v
"
><p><a href=
"
/theses/thesis/
'
+
str
(
self
.
id
)
+
'"
>
'
+
self
.
title
+
'
</a></p>
'
header
+=
'
<div class=
"
flex-whitebox0v
"
><p><a href=
"
/theses/thesis/
'
+
str
(
self
.
id
)
+
'"
>
'
+
self
.
title
+
'
</a></p>
'
header
+=
'
<p>
'
+
thesis_type_dict
[
self
.
type
]
+
'
thesis by
'
+
self
.
author
+
'
</p>
'
header
+=
'
<p>
'
+
thesis_type_dict
[
self
.
type
]
+
'
thesis by
'
+
self
.
author
+
'
(supervisor(s):
'
+
self
.
supervisor
+
'
)
</p>
'
header
+=
'
<p>in
'
+
disciplines_dict
[
self
.
discipline
]
+
'
,
'
+
journals_domains_dict
[
self
.
domain
]
+
'
'
+
journals_spec_dict
[
self
.
specialization
]
+
'
</p></div>
'
header
+=
'
<p>in
'
+
disciplines_dict
[
self
.
discipline
]
+
'
,
'
+
journals_domains_dict
[
self
.
domain
]
+
'
'
+
journals_spec_dict
[
self
.
specialization
]
+
'
</p></div>
'
header
+=
'
<div class=
"
flex-whitebox0v
"
><p>Defense date:
'
+
str
(
self
.
defense_date
)
+
'
</p><p>Latest activity:
'
+
self
.
latest_activity
.
strftime
(
'
%Y-%m-%d %H:%M
'
)
+
'
</p></div>
'
header
+=
'
<div class=
"
flex-whitebox0v
"
><p>Defense date:
'
+
str
(
self
.
defense_date
)
+
'
</p><p>Latest activity:
'
+
self
.
latest_activity
.
strftime
(
'
%Y-%m-%d %H:%M
'
)
+
'
</p></div>
'
header
+=
'
</div></li>
'
header
+=
'
</div></li>
'
...
...
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