Add documentation

This commit is contained in:
2020-11-27 12:49:03 +01:00
parent e4c51874dc
commit c9b94ed6c6
26 changed files with 743 additions and 98 deletions

View File

@@ -1,4 +1,4 @@
# Generated by Django 3.0.8 on 2020-07-30 14:15
# Generated by Django 3.1.3 on 2020-11-27 11:47
import apps.api.models
from django.conf import settings

View File

@@ -55,7 +55,7 @@ class Token(MetaDataModel):
"""Boolean check if the token is belonging to a user with super user rights. Then this token is a super token.
Returns:
bool: Returns true when the token belongs to a super user.
Boolean: Returns true when the token belongs to a super user.
"""
# TODO: Is it allowed to be a super user and researcher? Could give conflict of interests. With the API token you can read other researchers data...
return self.user.is_superuser == True

View File

@@ -17,7 +17,7 @@ def create_user_token(sender, instance=None, created=False, **kwargs):
instance: :attr:`~django.contrib.auth.models.User`
The newly created user model data
created : boolean
created : Boolean
Wether the object was created (True) or updated (False).
"""
if created: