SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 29db8bc0 authored by George Katsikas's avatar George Katsikas :goat:
Browse files

add title helper with dr default in contributor

parent 140ec1d9
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ from .constants import (
AUTHORSHIP_CLAIM_STATUS,
CONTRIBUTOR_STATUSES,
NEWLY_REGISTERED,
TITLE_DR,
)
from .fields import ChoiceArrayField
from .managers import (
......@@ -232,6 +233,10 @@ class Contributor(models.Model):
or self.user.is_superuser
)
@property
def profile_title(self) -> str:
return self.profile.get_title_display() if self.profile else TITLE_DR
def generate_key(self, feed=""):
"""Generate a new activation_key for the contributor, given a certain feed."""
for i in range(5):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment