-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b84f3fc
Showing
82 changed files
with
1,125 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import swapper | ||
|
||
from kernel.admin.site import omnipotence | ||
|
||
Education = swapper.load_model('faculty_biodata', 'Education') | ||
Honor = swapper.load_model('faculty_biodata', 'Honor') | ||
Visit = swapper.load_model('faculty_biodata', 'Visit') | ||
Collaboration = swapper.load_model('faculty_biodata', 'Collaboration') | ||
Project = swapper.load_model('faculty_biodata', 'Project') | ||
AssociateScholar = swapper.load_model('faculty_biodata', 'AssociateScholar') | ||
Supervision = swapper.load_model('faculty_biodata', 'Supervision') | ||
TeachingEngagement = swapper.load_model( | ||
'faculty_biodata', 'TeachingEngagement') | ||
Event = swapper.load_model('faculty_biodata', 'Event') | ||
Interest = swapper.load_model('faculty_biodata', 'Interest') | ||
AdministrativePosition = swapper.load_model( | ||
'faculty_biodata', | ||
'AdministrativePosition' | ||
) | ||
Membership = swapper.load_model('faculty_biodata', 'Membership') | ||
# Book = swapper.load_model('faculty_biodata', 'Book') | ||
# Paper = swapper.load_model('faculty_biodata', 'Paper') | ||
|
||
omnipotence.register(Education) | ||
omnipotence.register(Honor) | ||
omnipotence.register(Visit) | ||
omnipotence.register(Collaboration) | ||
omnipotence.register(Project) | ||
omnipotence.register(AssociateScholar) | ||
omnipotence.register(Supervision) | ||
omnipotence.register(TeachingEngagement) | ||
omnipotence.register(Event) | ||
omnipotence.register(Interest) | ||
omnipotence.register(AdministrativePosition) | ||
omnipotence.register(Membership) | ||
# omnipotence.register(Book) | ||
# omnipotence.register(Paper) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class FacultyBiodataConfig(AppConfig): | ||
name = 'faculty_biodata' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nomenclature: | ||
name: faculty_biodata | ||
verboseName: Faculty biodata |
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Event categories | ||
CONFERENCE = 'con' | ||
GUEST_LECTURE = 'gue' | ||
SEMINAR = 'sem' | ||
SHORT_TERM_COURSE = 'stc' | ||
SPECIAL_LECTURE = 'spl' | ||
TALK = 'tlk' | ||
EVENT_CATEGORIES = ( | ||
(CONFERENCE, 'Conference'), | ||
(GUEST_LECTURE, 'Guest lecture'), | ||
(SEMINAR, 'Seminar'), | ||
(SHORT_TERM_COURSE, 'Short term course'), | ||
(SPECIAL_LECTURE, 'Special lecture'), | ||
(TALK, 'Talk'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Event roles | ||
ORGANISER = 'o' | ||
ATTENDEE = 'a' | ||
EVENT_ROLES = ( | ||
(ORGANISER, 'Organiser'), | ||
(ATTENDEE, 'Attendee'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Research project types | ||
SPONSORED = 's' | ||
CONSULTANCY = 'c' | ||
PROJECT_TYPES = ( | ||
(SPONSORED, 'Sponsored'), | ||
(CONSULTANCY, 'Consultancy'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Scope choices for administrative positions | ||
DEPARTMENTAL = 'd' | ||
CENTRAL = 'c' | ||
INSTITUTE = 'i' | ||
EXTERNAL = 'e' | ||
SCOPES = ( | ||
(DEPARTMENTAL, 'Departmental'), | ||
(INSTITUTE, 'Central'), | ||
(INSTITUTE, 'Institute'), | ||
(EXTERNAL, 'External') | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Supervision categories | ||
PROJECT = 'pro' | ||
DOCTORATE = 'doc' | ||
SUPERVISION_CATEGORIES = ( | ||
(PROJECT, 'Project'), | ||
(DOCTORATE, 'Doctorate'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
urlpatterns = [] |
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from django.db import models | ||
|
||
|
||
class OrganisationMixin(models.Model): | ||
""" | ||
This mixin adds the organisation field to the model | ||
""" | ||
|
||
organisation = models.CharField( | ||
max_length=127, | ||
) | ||
|
||
class Meta: | ||
""" | ||
Meta class for OrganisationMixin | ||
""" | ||
|
||
abstract = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from faculty_biodata.models import accomplishments, engagements, events, publications, miscellaneous |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from faculty_biodata.models.abstract_classes.base_model import BaseModel |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import swapper | ||
from django.db import models | ||
|
||
from kernel.models.root import Model | ||
|
||
|
||
class BaseModel(Model): | ||
""" | ||
This abstract model contains the common fields of models | ||
""" | ||
|
||
faculty_member = models.ForeignKey( | ||
to=swapper.get_model_name('kernel', 'FacultyMember'), | ||
on_delete=models.CASCADE, | ||
) | ||
|
||
priority = models.IntegerField( | ||
default=0, | ||
) | ||
|
||
visibility = models.BooleanField( | ||
default=True, | ||
) | ||
|
||
class Meta: | ||
""" | ||
Meta class for BaseModel | ||
""" | ||
|
||
abstract = True | ||
|
||
def __str__(self): | ||
""" | ||
Return the string representation of the model | ||
:return: the string representation of the model | ||
""" | ||
|
||
faculty_member = self.faculty_member | ||
return f'{faculty_member}' |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from faculty_biodata.models.accomplishments.education import ( | ||
AbstractEducation, | ||
Education, | ||
) | ||
|
||
from faculty_biodata.models.accomplishments.honor import ( | ||
AbstractHonor, | ||
Honor, | ||
) | ||
|
||
from faculty_biodata.models.accomplishments.visit import ( | ||
AbstractVisit, | ||
Visit | ||
) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+1.84 KB
models/accomplishments/__pycache__/educational_details.cpython-36.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import swapper | ||
|
||
from common_biodata.models.accomplishments.education import AbstractEducation | ||
from faculty_biodata.models.abstract_classes.base_model import BaseModel | ||
|
||
|
||
class Education(AbstractEducation, BaseModel): | ||
""" | ||
This model contains information about the education of a faculty member | ||
""" | ||
|
||
class Meta: | ||
""" | ||
Meta class for AbstractEducation | ||
""" | ||
|
||
verbose_name_plural = 'education' | ||
swappable = swapper.swappable_setting('faculty_biodata', 'Education') | ||
|
||
def __str__(self): | ||
""" | ||
Return the string representation of the model | ||
:return: the string representation of the model | ||
""" | ||
|
||
faculty_member = self.faculty_member | ||
string = super().__str__() | ||
return f'{faculty_member} : {string}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import swapper | ||
from django.db import models | ||
|
||
from faculty_biodata.mixins.organisation_mixin import OrganisationMixin | ||
from faculty_biodata.models.abstract_classes.base_model import BaseModel | ||
|
||
|
||
class AbstractHonor(OrganisationMixin, BaseModel): | ||
""" | ||
This model holds the honors awarded to the faculty member | ||
""" | ||
|
||
award = models.CharField( | ||
max_length=255, | ||
) | ||
|
||
year = models.IntegerField() | ||
|
||
class Meta: | ||
""" | ||
Meta class for AbstractHonor | ||
""" | ||
|
||
abstract = True | ||
|
||
def __str__(self): | ||
""" | ||
Return the string representation of the model | ||
:return: the string representation of the model | ||
""" | ||
|
||
faculty_member = self.faculty_member | ||
award = self.award | ||
return f'{faculty_member}: {award}' | ||
|
||
|
||
class Honor(AbstractHonor): | ||
""" | ||
This class implements AbstractHonor | ||
""" | ||
|
||
class Meta: | ||
""" | ||
Meta class for Honor | ||
""" | ||
|
||
swappable = swapper.swappable_setting('faculty_biodata', 'Honor') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import swapper | ||
from django.db import models | ||
|
||
from faculty_biodata.models.abstract_classes.base_model import BaseModel | ||
|
||
|
||
class AbstractVisit(BaseModel): | ||
""" | ||
This model contains the visits by the faculty member | ||
""" | ||
|
||
purpose = models.CharField( | ||
max_length=255, | ||
) | ||
|
||
place = models.CharField( | ||
max_length=255, | ||
) | ||
|
||
date = models.DateField( | ||
blank=True, | ||
null=True, | ||
) | ||
|
||
class Meta: | ||
""" | ||
Meta class for AbstractVisit | ||
""" | ||
|
||
abstract = True | ||
|
||
def __str__(self): | ||
""" | ||
Return the string representation of the model | ||
:return: the string representation of the model | ||
""" | ||
|
||
faculty_member = self.faculty_member | ||
place = self.place | ||
return f'{faculty_member}: {place}' | ||
|
||
|
||
class Visit(AbstractVisit): | ||
""" | ||
This class implements AbstractVisit | ||
""" | ||
|
||
class Meta: | ||
""" | ||
Meta class for Visit | ||
""" | ||
|
||
swappable = swapper.swappable_setting('faculty_biodata', 'Visit') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from faculty_biodata.models.engagements.collaboration import ( | ||
AbstractCollaboration, | ||
Collaboration | ||
) | ||
from faculty_biodata.models.engagements.project import ( | ||
AbstractProject, | ||
Project, | ||
) | ||
from faculty_biodata.models.engagements.associate_scholar import ( | ||
AbstractAssociateScholar, | ||
AssociateScholar, | ||
) | ||
from faculty_biodata.models.engagements.supervision import ( | ||
AbstractSupervision, | ||
Supervision, | ||
) | ||
from faculty_biodata.models.engagements.teaching import ( | ||
AbstractTeachingEngagement, | ||
TeachingEngagement, | ||
) | ||
from faculty_biodata.models.engagements import ( | ||
positions, | ||
) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import swapper | ||
from django.db import models | ||
|
||
from faculty_biodata.models.abstract_classes.base_model import BaseModel | ||
|
||
|
||
class AbstractAssociateScholar(BaseModel): | ||
""" | ||
This model contains a research scholar associated with the faculty member | ||
""" | ||
|
||
scholar = models.ForeignKey( | ||
to=swapper.get_model_name('kernel', 'Student'), | ||
on_delete=models.CASCADE, | ||
) | ||
|
||
class Meta: | ||
""" | ||
Meta class for AbstractAssociateScholar | ||
""" | ||
|
||
abstract = True | ||
|
||
def __str__(self): | ||
""" | ||
Return the string representation of the model | ||
:return: the string representation of the model | ||
""" | ||
|
||
faculty_member = self.faculty_member | ||
scholar = self.scholar | ||
return f'{faculty_member} - {scholar}' | ||
|
||
|
||
class AssociateScholar(AbstractAssociateScholar): | ||
""" | ||
This class implements AbstractAssociateScholar | ||
""" | ||
|
||
class Meta: | ||
""" | ||
Meta class for AssociateScholar | ||
""" | ||
|
||
swappable = swapper.swappable_setting('faculty_biodata', | ||
'AssociateScholar') |
Oops, something went wrong.