-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthor.py
More file actions
23 lines (19 loc) · 960 Bytes
/
author.py
File metadata and controls
23 lines (19 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from django.db import models
from django_countries.fields import CountryField
class Author(models.Model):
id = models.AutoField(primary_key=True, db_column="id")
email = models.EmailField(max_length=254, null=True, blank=True)
lastname = models.CharField(max_length=50)
firstname = models.CharField(max_length=50)
orcid = models.CharField(max_length=50, null=True, blank=True)
affiliation = models.CharField(max_length=250)
github_id = models.CharField(max_length=39, null=True, blank=True)
bluesky_id = models.CharField(max_length=255, null=True, blank=True)
facebook_id = models.CharField(max_length=50, null=True, blank=True)
linkedin_id = models.CharField(max_length=100, null=True, blank=True)
city = models.CharField(max_length=100, null=True, blank=True)
country = CountryField(blank=True, null=True)
class Meta:
ordering = ["lastname"]
def __str__(self):
return self.lastname