Example #1
0
 def create_model_instance(self, project):
     return self.create_meeting_orm(auth_token=self.token_author,
                                    project_pk=pk_or_none(project),
                                    title="my project",
                                    description="a meeting description",
                                    start_date=timezone.now(),
                                    end_date=timezone.now(),
                                    **http_info)
Example #2
0
 def __export_metadata_v1(self):
     return {
         METADATA_VERSION_KEY: 1,
         "title": self.title,
         "uploaded_picture_entry": pk_or_none(self.uploaded_picture_entry),
         "projects": [p.pk for p in self.projects.all()],
         "metadata": Metadata.export_all_from_entity(self),
     }
Example #3
0
 def create_model_instance(self, project):
     return self.create_contact_orm(auth_token=self.token_author,
                                    project_pk=pk_or_none(project),
                                    academic_title="Dr.",
                                    first_name="my first name",
                                    last_name="my last name",
                                    email="*****@*****.**",
                                    **http_info)
Example #4
0
 def create_model_instance(self, project):
     return self.create_task_orm(auth_token=self.token_author,
                                 project_pk=pk_or_none(project),
                                 title="my task",
                                 description="My task description",
                                 state=Task.TASK_STATE_NEW,
                                 priority=Task.TASK_PRIORITY_NORMAL,
                                 start_date=timezone.now(),
                                 due_date=timezone.now(),
                                 assigned_user=self.user_author.pk,
                                 **http_info)
Example #5
0
 def create_model_instance(self, project):
     dmp_form = DmpForm.objects.create(
         title="My DMP Form", description="My DMP Form Description")
     return self.create_dmp_orm(self.token_author, pk_or_none(project),
                                "My DMP", Dmp.PROGRESS, dmp_form.pk,
                                **http_info)
Example #6
0
 def create_model_instance(self, project):
     return self.create_labbook_orm(self.token_author, pk_or_none(project),
                                    "my lab book", False, **http_info)
Example #7
0
 def create_model_instance(self, project):
     return self.create_file_orm(self.token_author, pk_or_none(project),
                                 "my file", "my description", "demo1.txt",
                                 pow(2, 20), **http_info)
Example #8
0
 def create_model_instance(self, project):
     return self.create_picture_orm(self.token_author, pk_or_none(project),
                                    "My picture", "demo1.png", **http_info)
Example #9
0
 def create_model_instance(self, project):
     return self.create_note_orm(auth_token=self.token_author,
                                 project_pk=pk_or_none(project),
                                 subject="my note",
                                 content="Some Note Description",
                                 **http_info)