index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
55,321
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0063_fieldnote.py
# Generated by Django 3.2.13 on 2022-04-26 21:16 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0177_add_on_webite_field'), ('grant_management', '0062_add_file_web'), ] operations = [ migrations.CreateModel( name='FieldNote', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('url', models.URLField(blank=True, help_text='URL of fieldnote', null=True)), ('title', models.CharField(help_text='Title of fieldnote', max_length=1000)), ('project', models.ForeignKey(help_text='Project to which is the fieldnote is related', on_delete=django.db.models.deletion.PROTECT, to='project_core.project')), ], options={ 'abstract': False, }, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,322
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0014_adds_abstract_question_table.py
# Generated by Django 2.2.6 on 2019-10-04 12:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0013_create_proposal_partner_models'), ] operations = [ migrations.CreateModel( name='Question', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('question_text', models.TextField(help_text='Text of a question')), ('question_description', models.TextField(blank=True, help_text='Description that should go alongside the question text by way of explanation for completion of answer', null=True)), ('answer_type', models.CharField(choices=[('Text', 'Text')], default='Text', help_text='Type of field that should be applied to the question answer', max_length=5)), ('answer_max_length', models.IntegerField(blank=True, help_text='Maximum number of words that can be specified to the answer of a question', null=True)), ], options={ 'abstract': False, }, ), migrations.AlterField( model_name='contact', name='email_address', field=models.EmailField(help_text='Email address', max_length=254), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,323
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/forms/funding_instrument.py
from crispy_forms.helper import FormHelper from django import forms from django.db.models import Q from django.urls import reverse from ..models import FundingInstrument, FinancialKey class FundingInstrumentForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.helper = FormHelper(self) self.helper.form_tag = False # funding_instrument is the Boolean field. fundinginstrument is the reverse relationship for the OneToOne self.fields['short_name'].queryset = FinancialKey.objects.filter(funding_instrument=True).filter( Q(fundinginstrument__isnull=True) | Q(fundinginstrument=self.instance)) self.fields[ 'short_name'].help_text = f'Select a funding instrument acronym. This needs to be a financial key. Please <a href="{reverse("logged-financial-key-update")}">create one if needed</a> and refresh this page' class Meta: model = FundingInstrument fields = ['long_name', 'short_name', 'description']
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,324
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/comments/migrations/0032_fix_plurals.py
# Generated by Django 3.0.5 on 2020-06-02 13:25 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('comments', '0031_grantagreementattachment_grantagreementattachmentcategory_grantagreementcomment_grantagreementcommen'), ] operations = [ migrations.AlterModelOptions( name='grantagreementattachment', options={'verbose_name_plural': 'Grant Agreement Attachments'}, ), migrations.AlterModelOptions( name='grantagreementcomment', options={'verbose_name_plural': 'Grant Agreement Comments'}, ), migrations.AlterModelOptions( name='grantagreementcommentcategory', options={'verbose_name_plural': 'Grant Agreement Comment Categories'}, ), migrations.AlterUniqueTogether( name='grantagreementattachment', unique_together=set(), ), migrations.AlterUniqueTogether( name='grantagreementcomment', unique_together=set(), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,325
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/tests/forms/test_publications.py
from datetime import date from django.test import TestCase from grant_management.forms.publications import PublicationModelForm from grant_management.models import SocialNetwork, Publication from project_core.tests import database_population class PublicationModelFormTest(TestCase): def setUp(self): self._project = database_population.create_project() def test_publication_valid(self): social_network, _ = SocialNetwork.objects.get_or_create(name='Twitter') data = {'project': self._project, 'doi': 'da942924k/dkd3', 'reference': 'John Doe and James Smith, Very interesting article, 2020', 'title': 'Very interesting article', 'published_date': date(2020, 5, 5) } self.assertEqual(Publication.objects.all().count(), 0) publication_form = PublicationModelForm(data=data) self.assertTrue(publication_form.is_valid()) publication_form.save() self.assertEqual(Publication.objects.all().count(), 1)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,326
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/management/commands/importprojectsfromcsv_glace.py
import csv import os import subprocess import urllib.parse from datetime import datetime from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile from django.core.management.base import BaseCommand from django.db.transaction import set_autocommit, commit from django.utils.timezone import make_aware from comments.models import ProjectComment, ProjectCommentCategory, ProjectAttachment, ProjectAttachmentCategory from grant_management.models import GrantAgreement, Installment, Invoice, FinancialReport, ScientificReport from project_core.models import PhysicalPerson, PersonPosition, PersonTitle, Gender, OrganisationName, Project, Call, \ Contact, GeographicalArea, Keyword, Source, KeywordUid, FundingInstrument, FinancialKey # For pprinting dictionaries doesn't change the order # in Python 3.7 this is needed, in Python 3.8 (or 3.9?) # there is a better way passing a parameter to the # pprint.pprint function # This is a throw away script to import past data # pprint.sorted = lambda arg, *a, **kw: arg class Command(BaseCommand): help = 'Imports projects from a CSV file' def add_arguments(self, parser): parser.add_argument('csv_file', type=str) def handle(self, *args, **options): csv_file_path = options['csv_file'] print(csv_file_path) set_autocommit(False) import_csv(csv_file_path) commit() def create_or_get_physical_person(first_name, surname, orcid=None, gender=None): if gender: gender = Gender.objects.get(name=gender) if orcid and orcid != 'NA': physical_person, created = PhysicalPerson.objects.get_or_create(orcid=orcid, defaults={'first_name': first_name, 'surname': surname, 'gender': gender }) else: first_name_surname_before_count = PhysicalPerson.objects.filter(first_name=first_name, surname=surname).count() physical_person, created = PhysicalPerson.objects.get_or_create(first_name=first_name, surname=surname, defaults={'gender': gender}) # It didn't exist and it got created or it existed and didn't get created assert first_name_surname_before_count == 0 and created or first_name_surname_before_count > 0 and not created return physical_person def get_call_short_name(short_name): pass def create_installment(date, amount): pass def create_invoice(received, sent_for_payment, paid, amount, url): pass def create_financial_report(received, sent_for_approval, approval_date, approved_by, url): pass def create_scientific_report(received, sent_for_approval, approval_date, approved_by, url): pass def filter_dictionary(dictionary, starts_with): ignore_chars = len(starts_with) return {key[ignore_chars:]: dictionary[key] for key in dictionary if key.startswith(starts_with)} def get_person_title(title): if title == 'Professor': title = 'Prof' return PersonTitle.objects.get(title=title) def create_or_get_organisation_names(organisation_names_str): organisation_names = [] for organisation_name_str in organisation_names_str: organisation_name_str = organisation_name_str.strip() organisation_name_obj, created = OrganisationName.objects.get_or_create(name=organisation_name_str) organisation_names.append(organisation_name_obj) organisation_names.sort(key=lambda o: o.id) return organisation_names def create_or_get_person_position(person_position_info): physical_person = create_or_get_physical_person(person_position_info['person__first_name'], person_position_info['person__surname'], person_position_info['person__orcid'], person_position_info['person__gender'], ) academic_title = get_person_title(person_position_info['academic_title']) organisation_names = create_or_get_organisation_names(person_position_info['organisation_names']) person_position_specific_info = {'person': physical_person, 'academic_title': academic_title, 'group': person_position_info['person__group'] } person_positions = PersonPosition.objects.filter(**person_position_specific_info) found = False person_position = None for person_position in person_positions: person_position_organisation_names = list(person_position.organisation_names.all()) person_position_organisation_names.sort(key=lambda o: o.id) if person_position_organisation_names == organisation_names and \ person_position.main_email() == person_position_info['email']: found = True break if not found: person_position = PersonPosition.objects.create(**person_position_specific_info) person_position.organisation_names.add(*organisation_names) Contact.objects.get_or_create(person_position=person_position, entry=person_position_info['email'], method=Contact.EMAIL) assert person_position return person_position def dictionary_strings_to_types(dictionary): # Cast to int, floats, lists, eates... and no more (no database lookups) result = {} for key, value in dictionary.items(): if key == 'keywords' and value == '': result[key] = [] continue if value in ('', None): result[key] = None continue try: value_int = int(value) result[key] = value_int continue except ValueError: pass try: value_float = float(value) result[key] = value_float continue except ValueError: pass try: value_date = datetime.strptime(value, '%d-%m-%Y') result[key] = value_date continue except ValueError: pass try: value_date = datetime.strptime(value, '%d/%m/%Y') result[key] = value_date continue except ValueError: pass try: value_date = datetime.strptime(value, '%d.%m.%Y') result[key] = value_date continue except ValueError: pass if key in ['keywords', 'principal_investigator__organisation_names', 'geographical_areas']: value_list = value.split(',') value_list = [value_element.strip() for value_element in value_list] result[key] = value_list continue # It's a string result[key] = value.strip() return result def create_call(call_short_name): if call_short_name == 'GLACE 2019': # user = User.objects.get(username='data.importer') ace_financial_key = FinancialKey.objects.get(name='GLACE') funding_instrument, _ = FundingInstrument.objects.get_or_create( long_name='Greenland Circumnavigation Expedition', short_name=ace_financial_key) call_open_date = datetime(2018, 7, 3) call_open_date = make_aware(call_open_date) submission_deadline = datetime(2018, 9, 10, 12, 0) submission_deadline = make_aware(submission_deadline) call = Call.objects.create(short_name=call_short_name, long_name='Greenland Circumnavigation Expedition 2019', finance_year=2019, funding_instrument=funding_instrument, call_open_date=call_open_date, submission_deadline=submission_deadline, budget_maximum=200_000, other_funding_question=False, proposal_partner_question=False, ) else: assert False return call def create_project(project_data, principal_investigator): try: call = Call.objects.get(short_name=project_data['call__short_name']) except Call.DoesNotExist: call = create_call(project_data['call__short_name']) assert project_data['status'] in [Project.ONGOING, Project.COMPLETED, Project.ABORTED] if project_data['status'] in [Project.COMPLETED, Project.ABORTED]: assert project_data['closed_date'] project_key = f'GLACE-2019-{project_data["key"]:03}' allocated_budget_chf = project_data['allocated_budget'] # allocated_budget_eur = project_data['allocated_budget_eur'] allocated_budget_chf = 0 # This is calculated later on based # on paid invoices # if not allocated_budget_chf: # print('Converting EUR to CHF for allocated budget') # allocated_budget_chf = allocated_budget_eur * 1.08 print('Going to create project:', project_data['title'], 'with principal investigator:', principal_investigator) project = Project.objects.create(title=project_data['title'], key=project_key, principal_investigator=principal_investigator, location=project_data['location'], start_date=project_data['start_date'], end_date=project_data['end_date'], call=call, allocated_budget=allocated_budget_chf, status=project_data['status'], closed_on=make_aware(project_data['closed_date']), closed_by=User.objects.get(username='data.importer'), ) # comment_text = f"This project's finance was originally in Euros\n\n" \ # f"Allocated budget in Euros: {thousands_separator(allocated_budget_eur)} EUR\n\n" # category = Category.objects.get(name='Finance') # category = ProjectCommentCategory.objects.get(category=category) # ProjectComment.objects.create(project=project, category=category, text=comment_text) import_comments(project, project_data) import_attachments(project, project_data) return project def import_comments(project, project_data): comment_number = 1 comment_category = ProjectCommentCategory.objects.get(category__name='Data Import') if f'project_comment_{comment_number}' in project_data: comment = project_data[f'project_comment_{comment_number}'] if comment is not None: ProjectComment.objects.create( project=project, category=comment_category, text=comment, created_by=User.objects.get(username='data.importer') ) comment_number += 1 def import_attachments(project, project_data): attachment_number = 1 comment_category = ProjectAttachmentCategory.objects.get(category__name='Data Import') if f'project_attachment_{attachment_number}_file' in project_data: file = create_simple_uploaded_file(project_data[f'project_attachment_{attachment_number}_file']) if file is not None and file != '': comment = project_data[f'project_attachment_{attachment_number}_comment'] ProjectAttachment.objects.create( file=create_simple_uploaded_file(project_data[f'project_attachment_{attachment_number}_file']), project=project, category=comment_category, text=comment, created_by=User.objects.get(username='data.importer') ) attachment_number += 1 def set_geographical_areas(project, geographical_areas): for geographical_area_str in geographical_areas: geographical_area = GeographicalArea.objects.get(name=geographical_area_str) project.geographical_areas.add(geographical_area) def set_keywords(project, keywords): for keyword_str in keywords: source, created = Source.objects.get_or_create(source='Importer of old projects') keyword_uuid, created = KeywordUid.objects.get_or_create(uid=None, source=source) keyword, created = Keyword.objects.get_or_create(name=keyword_str, defaults={'uid': keyword_uuid}) project.keywords.add(keyword) def content_type_from_file_name(file_name): file_name_lower = file_name.lower() # .split('&parent')[0] if file_name_lower.endswith('.docx'): return 'application/vnd.openxmlformats-officedocument.wordprocessingml' elif file_name_lower.endswith('.pdf'): return 'application/pdf' elif file_name_lower.endswith('.eml'): return 'message/rfc822' elif file_name_lower.endswith('.msg'): return 'application/vnd.ms-outlook' elif file_name_lower.endswith('jpg'): return 'image/jpeg' assert False def create_simple_uploaded_file(file_path): if not is_valid_sharepoint_file_path(file_path): print('ERROR: Not creating a file because file_path is:', file_path) return None file_path = normalise_path(file_path) if '.docx' in file_path: print('Attention: file_path with .docx?:', file_path) to_exec = ['rclone', 'cat', file_path] # to_exec = ['cat', '/home/carles/test.pdf'] print(' '.join(to_exec)) rclone_process = subprocess.run(to_exec, capture_output=True) if rclone_process.returncode != 0: print('rclone_process.returncode:', rclone_process.returncode) print('error') assert rclone_process.returncode == 0 file_contents = rclone_process.stdout return SimpleUploadedFile(content=file_contents, name=os.path.basename(file_path), content_type=content_type_from_file_name(file_path)) def set_grant_agreement(project, grant_agreement_information): file = create_simple_uploaded_file(grant_agreement_information['file']) grant_agreement = GrantAgreement.objects.create(project=project, signed_date=grant_agreement_information['signed_date'], file=file) index = 1 while f'signed_by_{index}_first_name' in grant_agreement_information: signed_by_first_name = grant_agreement_information[f'signed_by_{index}_first_name'] signed_by_surname = grant_agreement_information[f'signed_by_{index}_surname'] signed_by_orcid = grant_agreement_information[f'signed_by_{index}_orcid'] index += 1 if signed_by_first_name is None or signed_by_first_name == 'NA': continue if signed_by_orcid == 'NA': signed_by_orcid = None physical_person, created = PhysicalPerson.objects.get_or_create(first_name=signed_by_first_name, surname=signed_by_surname, orcid=signed_by_orcid) grant_agreement.signed_by.add(physical_person) def set_installments(project, installments_data): index = 1 while f'{index}_amount' in installments_data: amount = installments_data[f'{index}_amount'] if amount is None: break # assert amount > 0 # it might be negative it money was returned? # assert amount <= project.allocated_budget # allocated budget is calculated at the end... Installment.objects.create(project=project, amount=amount) index += 1 def is_valid_sharepoint_file_path(file_path): return file_path is not None and \ file_path != 'NA' and \ file_path.startswith('https://youtube.com') is False and \ file_path.startswith('https://www.youtube.com') is False # ':w' not in file_path and \ # ':f' not in file_path and \ def normalise_path(file_path: str): print('normalise_path for path:', file_path) if '?e=' in file_path: to_exec = ['curl', '--cookie', '/tmp/cookies.txt', '--include', file_path] print(' '.join(to_exec)) result = subprocess.run(to_exec, capture_output=True) result = result.stdout.decode('utf-8') for line in result.split('\r\n'): if line.lower().startswith('location: '): # print('line:', line) file_path = line.split(' ')[1] # Yes, it's unquoted here and later again file_path = urllib.parse.unquote(file_path) assert file_path.startswith( 'https://swisspolar.sharepoint.com/sites/S/S/Forms/AllItems.aspx?id=/sites/S/S/') file_path = file_path[ len('https://swisspolar.sharepoint.com/sites/S/S/Forms/AllItems.aspx?id=/sites/S/S/'):] file_path = file_path.split('&parent')[0] break elif urllib.parse.unquote(file_path).startswith( 'https://swisspolar.sharepoint.com/sites/S/S/Forms/AllItems.aspx?id=/sites/S/S/'): file_path = urllib.parse.unquote(file_path) file_path = file_path[ len('https://swisspolar.sharepoint.com/sites/S/S/Forms/AllItems.aspx?id=/sites/S/S/'):] file_path = file_path.split('&parent')[0] else: assert file_path.startswith('https://swisspolar.sharepoint.com/sites/S/S/') file_path = file_path[len('https://swisspolar.sharepoint.com/sites/S/S/'):] file_path = urllib.parse.unquote(file_path) file_path = 'Commun-SwissPolar:' + file_path if '.pdf?CT=' in file_path: file_path = file_path[0:file_path.index('.pdf?CT=') + 4] print('normalised:', file_path) return file_path def set_invoices(project, invoices_data): index = 1 comments = [] installment_index = 0 installments = Installment.objects.filter(project=project).order_by('id') while f'{index}_received_date' in invoices_data: received_date = invoices_data[f'{index}_received_date'] amount_chf = invoices_data[f'{index}_amount'] if amount_chf == '' or amount_chf == 'NA' or amount_chf is None: # Nothing to do in this invoice # TODO: check that other fields are empty? installment_index += 1 index += 1 continue # if received_date is None: # break # if invoices_data[f'{index}_amount'] and installment_index >= len(installments): # print('ERROR: stop processing invoice with data because no installment for this invoice') # break installment = installments[installment_index] installment_index += 1 file_path = invoices_data[f'{index}_file'] if is_valid_sharepoint_file_path(file_path): file = create_simple_uploaded_file(invoices_data[f'{index}_file']) else: file = None amount_chf = invoices_data[f'{index}_amount'] # amount_eur = invoices_data[f'{index}_amount_eur'] if amount_chf == 'NA': print('Invalid amount_chf. Project:', project, 'Invoice received_date:', received_date) amount_chf = None # if amount_eur == 'NA': # print('Invalid amount_eur. Project:', project, 'Invoice received_date:', received_date) # # amount_eur = 0 # amount_eur = None # if amount_chf and amount_chf >= installment.amount: # print('Warning: invoice is bigger than the installment amount. See project: ', project, # 'invoice amount (eur):', amount_eur) if received_date == 'NA': # print('Invalid received_date. Project:', project, 'Invoice received_date:', received_date) # received_date = make_aware(datetime(2017, 1, 1)) received_date = None sent_for_payment_date = invoices_data[f'{index}_sent_for_payment'] if sent_for_payment_date == 'NA': print('Invalid sent_for_payment. Project:', project, 'Invoice received_date:', received_date) # sent_for_payment_date = make_aware(datetime(2017, 1, 1)) sent_for_payment_date = None paid_date = invoices_data[f'{index}_paid_date'] if paid_date == 'NA' or paid_date is None: print('ERROR: Invalid paid_date. Project:', project, 'Invoice received_date:', received_date) # paid_date = make_aware(datetime(2017, 1, 1)) Invoice.objects.create(project=project, installment=installment, amount=amount_chf, received_date=received_date, sent_for_payment_date=sent_for_payment_date, paid_date=paid_date, file=file ) # if amount_eur: # eur_suffix = f' {thousands_separator(amount_eur)} EUR' # else: # eur_suffix = '' # # comments.append(f'Invoice paid on {format_date(paid_date)} with amount {thousands_separator(amount_chf)} CHF ' # f'was originally in Euros{eur_suffix}') index += 1 comment_text = '\n\n'.join(comments) # assert project.projectcomment_set.all().count() == 1 # comment = project.projectcomment_set.all()[0] # comment.text += comment_text # comment.save() project.allocated_budget = project.invoices_paid_amount() project.save() def validate_project(project): pass # assert that total paid amount is not bigger than the allocated amount for the project # Something else? def set_reports(project, reports_data, report_model): index = 1 while f'{index}_received_date' in reports_data: received_date = reports_data[f'{index}_received_date'] if received_date is None: index += 1 continue if reports_data[f'{index}_approved_by__first_name'] is None: approved_by = None else: approved_by = create_or_get_physical_person(reports_data[f'{index}_approved_by__first_name'], reports_data[f'{index}_approved_by__surname']) file = create_simple_uploaded_file(reports_data[f'{index}_file']) report = report_model.objects.create(project=project, file=file, received_date=received_date, sent_for_approval_date=reports_data[f'{index}_sent_for_approval_date'], approval_date=reports_data[f'{index}_approval_date'], approved_by=approved_by) comment_key = f'{index}_comment' if comment_key in reports_data: comment = reports_data[f'{index}_comment'] if comment is not None and comment.lower() != 'ok': if report_model == FinancialReport: comment_category = ProjectCommentCategory.objects.get(category__name='Finance') else: comment_category = ProjectCommentCategory.objects.get(category__name='Reports') if report_model == FinancialReport: comment_prefix = f'Comment referring to financial report received on {report.received_date.strftime("%d-%m-%Y")}' else: assert False comment = comment_prefix + ': ' + comment print('Adding comment', comment, 'in project', project) ProjectComment.objects.create(project=project, category=comment_category, text=comment, created_by=User.objects.get(username='data.importer') ) index += 1 def set_financial_reports(project, financial_reports_data): set_reports(project, financial_reports_data, FinancialReport) def set_scientific_reports(project, scientific_reports_data): set_reports(project, scientific_reports_data, ScientificReport) def replace_if_needed(project_data, field_name, value): PLACEHOLDERS = ('Pending question to Laurence', 'Pending from Laurence',) if project_data[field_name] in PLACEHOLDERS: project_data[field_name] = value return project_data def set_fake_data(project_data): # replace_if_needed(project_data, 'start_date', '01-07-2016') # replace_if_needed(project_data, 'end_date', '01-07-2021') # replace_if_needed(project_data, 'allocated_budget_chf', 250_000) # replace_if_needed(project_data, 'closed_date', '01-08-2021') replace_if_needed(project_data, 'closed_by__first_name', 'Data') replace_if_needed(project_data, 'closed_by__surname', 'Importer') # replace_if_needed(project_data, 'installment_1_amount_chf', 100_000) # replace_if_needed(project_data, 'installment_2_amount_chf', 100_000) # replace_if_needed(project_data, 'installment_3_amount_chf', 50_000) # replace_if_needed(project_data, 'invoice_1_received_date', '01-10-2016') # replace_if_needed(project_data, 'invoice_1_sent_for_payment', '15-10-2016') # replace_if_needed(project_data, 'invoice_1_paid_date', '01-12-2016') # replace_if_needed(project_data, 'invoice_1_amount_eur', 12_000) # replace_if_needed(project_data, 'invoice_1_amount_chf', 100_000) # replace_if_needed(project_data, 'invoice_1_file', None) # replace_if_needed(project_data, 'invoice_2_amount_chf', 100_000) # replace_if_needed(project_data, 'invoice_2_amount_eur', 13_000) # replace_if_needed(project_data, 'invoice_2_file', None) # replace_if_needed(project_data, 'invoice_2_received_date', '01-10-2016') # # replace_if_needed(project_data, 'invoice_3_amount_chf', 50_000) # replace_if_needed(project_data, 'invoice_3_file', None) # replace_if_needed(project_data, 'invoice_3_received_date', '01-07-2017') project_data['keywords'] = '' return project_data def import_csv(csv_file_path): with open(csv_file_path, encoding='utf-8') as csv_file: csv_reader = csv.reader(csv_file) transposed = zip(*csv_reader) headers = next(transposed) projects = [] for row in transposed: projects.append(dict(zip(headers, row))) for project_data in projects: project_data = set_fake_data(project_data) project_data = dictionary_strings_to_types(project_data) principal_investigator_data = filter_dictionary(project_data, 'principal_investigator__') principal_investigator = create_or_get_person_position(principal_investigator_data) project = create_project(project_data, principal_investigator) set_geographical_areas(project, project_data['geographical_areas']) set_keywords(project, project_data['keywords']) grant_agreement_data = filter_dictionary(project_data, 'grant_agreement__') set_grant_agreement(project, grant_agreement_data) installments_data = filter_dictionary(project_data, 'installment_') set_installments(project, installments_data) invoices_data = filter_dictionary(project_data, 'invoice_') set_invoices(project, invoices_data) financial_reports_data = filter_dictionary(project_data, 'financial_report_') set_financial_reports(project, financial_reports_data) scientific_reports_data = filter_dictionary(project_data, 'scientific_report_') set_scientific_reports(project, scientific_reports_data) validate_project(project) # Delete GLACE projects: """ from project_core.models import * from grant_management.models import * from variable_templates.models import * from comments.models import * from django.db.transaction import set_autocommit, commit, rollback set_autocommit(0) glace=Call.objects.get(short_name='GLACE 2019') # Delete call related objects ScientificReport.objects.filter(project__call=glace).delete() FinancialReport.objects.filter(project__call=glace).delete() Milestone.objects.filter(project__call=glace).delete() Invoice.objects.filter(installment__project__call=glace).delete() Installment.objects.filter(project__call=glace).delete() ProjectComment.objects.filter(project__call=glace).delete() ProjectAttachment.objects.filter(project__call=glace).delete() GrantAgreement.objects.filter(project__call=glace).delete() glace.proposal_set.all().delete() glace.project_set.all().delete() Project.objects.filter(call=glace).delete() BudgetCategoryCall.objects.filter(call=glace).delete() # Delete call glace.delete() # Delete funding instrument funding_instrument=FundingInstrument.objects.get(long_name='Greenland Circumnavigation Expedition') FundingInstrumentVariableTemplate.objects.filter(funding_instrument=funding_instrument).delete() funding_instrument.delete() commit() """
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,327
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/templatetags/ordinal.py
from django import template from django.contrib.humanize.templatetags.humanize import ordinal as humanize_ordinal register = template.Library() @register.filter(name='ordinal') def ordinal(value): if value is None: return None humanized = {1: 'First', 2: 'Second', 3: 'Third', 4: 'Fourth', 5: 'Fifth', 6: 'Sixth', 7: 'Seventh', 8: 'Eighth', 9: 'Ninth', 10: 'Tenth'} if value in humanized: return humanized[value] else: return humanize_ordinal(value)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,328
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/evaluation/migrations/0008_deletes_final_mark.py
# Generated by Django 3.0.3 on 2020-03-02 09:31 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('evaluation', '0007_removes_created_by'), ] operations = [ migrations.RemoveField( model_name='historicalproposalevaluation', name='final_mark', ), migrations.RemoveField( model_name='proposalevaluation', name='final_mark', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,329
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0099_proposal_mails_sent.py
# Generated by Django 2.2.6 on 2020-01-08 10:44 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0098_required_question'), ] operations = [ migrations.AddField( model_name='proposal', name='draft_saved_mail_sent', field=models.BooleanField(default=False, help_text='True if the email informing the applicant that the draft has been saved has already been sent (usually is sent only once)'), ), migrations.AddField( model_name='proposal', name='submitted_mail_sent', field=models.BooleanField(default=False, help_text='True if the email informing the applicant that the proposal has been submitted has been sent'), ), migrations.AlterField( model_name='callquestion', name='answer_required', field=models.BooleanField(default=True), ), migrations.AlterField( model_name='physicalperson', name='phd_date', field=models.CharField(blank=True, help_text='Date (yyyy-mm) on which PhD awarded or expected', max_length=20, null=True, validators=[django.core.validators.RegexValidator(code='Invalid format', message='Format is yyyy-mm', regex='^[0-9]{4}-[0-9]{2}$')]), ), migrations.AlterField( model_name='templatequestion', name='answer_required', field=models.BooleanField(default=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,330
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0178_auto_20220708_0904.py
# Generated by Django 3.2.13 on 2022-07-08 07:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0177_add_on_webite_field'), ] operations = [ migrations.AlterField( model_name='historicalproject', name='on_website', field=models.BooleanField(default=False, help_text='Appears in the website'), ), migrations.AlterField( model_name='project', name='on_website', field=models.BooleanField(default=False, help_text='Appears in the website'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,331
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0122_funding_instrument_column_for_foreign_key_to_financial_key.py
# Generated by Django 3.0.5 on 2020-05-20 15:09 import django.db.models.deletion from django.core.exceptions import ObjectDoesNotExist from django.db import migrations, models def create_financial_keys(apps, schema_editor): FundingInstrument = apps.get_model('project_core', 'FundingInstrument') FinancialKey = apps.get_model('project_core', 'FinancialKey') User = apps.get_model('auth', 'User') try: admin_user = User.objects.get(username='admin') except ObjectDoesNotExist: # https://groups.google.com/forum/#!topic/django-users/QIpBNtamHhk from django.contrib.auth.models import User admin_user = User.objects.create_superuser(username='admin', password='not a password', email='') for funding_instrument in FundingInstrument.objects.all(): print(funding_instrument) financial_key, created = FinancialKey.objects.get_or_create(name=funding_instrument.short_name, defaults={ 'description': 'Automatically migrated from FundingInstrument', 'created_by': admin_user}) funding_instrument.short_name = financial_key.id funding_instrument.save() HistoricalFundingInstrumentHistorical = apps.get_model('project_core', 'HistoricalFundingInstrument') HistoricalFundingInstrumentHistorical.objects.all().delete() class Migration(migrations.Migration): dependencies = [ ('project_core', '0121_funding_instrument_short_name_temp_column'), ] operations = [ migrations.RunPython(create_financial_keys), migrations.AlterField( model_name='fundinginstrument', name='short_name', field=models.OneToOneField(help_text='Short name or acronym of the funding instrument', null=True, on_delete=django.db.models.deletion.PROTECT, to='project_core.FinancialKey'), ), migrations.AlterField( model_name='historicalfundinginstrument', name='short_name', field=models.ForeignKey(blank=True, db_constraint=False, help_text='Short name or acronym of the funding instrument', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='project_core.FinancialKey'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,332
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/evaluation/migrations/0005_add_callevaluation_createmodify_proposalevaluation.py
# Generated by Django 3.0.3 on 2020-02-19 12:44 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('project_core', '0104_delete_colour'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('evaluation', '0004_create_proposal_evaluation'), ] operations = [ migrations.AddField( model_name='proposalevaluation', name='created_by', field=models.ForeignKey(blank=True, help_text='User by which the entry was created', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='evaluation_proposalevaluation_created_by_related', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='proposalevaluation', name='created_on', field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now, help_text='Date and time at which the entry was created'), preserve_default=False, ), migrations.AddField( model_name='proposalevaluation', name='modified_by', field=models.ForeignKey(blank=True, help_text='User by which the entry was modified', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='evaluation_proposalevaluation_modified_by_related', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='proposalevaluation', name='modified_on', field=models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True), ), migrations.AlterField( model_name='proposalevaluation', name='board_decision', field=models.CharField(choices=[('Fund', 'Fund'), ('NotFund', 'Not Fund')], max_length=7), ), migrations.CreateModel( name='CallEvaluation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('panel_date', models.DateField()), ('call', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='project_core.Call')), ('created_by', models.ForeignKey(blank=True, help_text='User by which the entry was created', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='evaluation_callevaluation_created_by_related', to=settings.AUTH_USER_MODEL)), ('modified_by', models.ForeignKey(blank=True, help_text='User by which the entry was modified', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='evaluation_callevaluation_modified_by_related', to=settings.AUTH_USER_MODEL)), ], options={ 'abstract': False, }, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,333
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/external/call.py
from django.views.generic import ListView from project_core.models import Call class CallList(ListView): template_name = 'external/call-list.tmpl' context_object_name = 'calls' model = Call def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) return context def get_queryset(self): # Avoid using ListView.queryset. Call.open_calls() uses timezone.now(). # If using ListView.queryset the queryset is retreived on the application startup # so calls that become open during the application startup would not appear here # (or calls that become closed after the application startup would not disappear). # # Another solution was to do the query in call.open_calls() like: # from django.db.models.functions import Now # return Call.objects.filter(call_open_date__lte=Now(), # submission_deadline__gte=Now()) # in this case the query has the variable CURRENT_TIMESTAMP and it works. # I chose to not use this method to avoid timezones problems between Django-MariaDB and # different deployments environment (e.g. Docker, system's timezone, etc.). # return Call.open_calls()
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,334
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0027_add_source_field_to_country.py
# Generated by Django 2.2.6 on 2019-10-08 12:35 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('project_core', '0026_auto_changes_call_question_order_uniq'), ] operations = [ migrations.AddField( model_name='country', name='last_modified', field=models.DateTimeField(default=django.utils.timezone.now, help_text='Last date and time of modification'), ), migrations.AddField( model_name='country', name='source', field=models.CharField(help_text='Source of country name', max_length=100), preserve_default=False, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,335
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/variable_templates/migrations/0002_removes_created_by.py
# Generated by Django 3.0.3 on 2020-02-27 09:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('variable_templates', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='callvariabletemplate', name='created_by', ), migrations.RemoveField( model_name='callvariabletemplate', name='modified_by', ), migrations.RemoveField( model_name='fundinginstrumentvariabletemplate', name='created_by', ), migrations.RemoveField( model_name='fundinginstrumentvariabletemplate', name='modified_by', ), migrations.RemoveField( model_name='templatevariablename', name='created_by', ), migrations.RemoveField( model_name='templatevariablename', name='modified_by', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,336
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0067_proposal_duration_minvalue.py
# Generated by Django 2.2.6 on 2019-10-23 12:57 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0066_choices_porposal_eligibility'), ] operations = [ migrations.AlterField( model_name='proposal', name='duration_months', field=models.DecimalField(decimal_places=1, help_text='Period of time expected that the proposed project will last in months', max_digits=5, validators=[django.core.validators.MinValueValidator(0)]), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,337
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0015_add_lay_summary.py
# Generated by Django 3.0.5 on 2020-04-28 08:54 from django.db import migrations, models import django.db.models.deletion def add_default_lay_summary_type(apps, schema_editor): LaySummaryType = apps.get_model('grant_management', 'LaySummaryType') LaySummaryType.objects.get_or_create(name='Internal', defaults={'description': 'Used internally by SPI'}) LaySummaryType.objects.get_or_create(name='Web', defaults={'description': 'To be published to the web'}) class Migration(migrations.Migration): dependencies = [ ('grant_management', '0014_financial_report_rename_signed_to_approved_by'), ] operations = [ migrations.CreateModel( name='LaySummaryType', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('name', models.CharField(max_length=10, unique=True)), ('description', models.CharField(max_length=100)), ], options={ 'abstract': False, }, ), migrations.RemoveField( model_name='laysummary', name='web_version', ), migrations.RunPython(add_default_lay_summary_type), migrations.AddField( model_name='laysummary', name='lay_summary_type', field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='grant_management.LaySummaryType'), preserve_default=False, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,338
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0157_call_request_overall_budget_question_rename.py
# Generated by Django 3.1.4 on 2021-01-06 15:15 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('project_core', '0156_proposal_add_field_request_overall_budget'), ] operations = [ migrations.RenameField( model_name='call', old_name='request_overall_budget', new_name='request_overall_budget_question', ), migrations.RenameField( model_name='historicalcall', old_name='request_overall_budget', new_name='request_overall_budget_question', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,339
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/logged/news.py
from datetime import datetime, timedelta from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.utils.safestring import mark_safe from django.views.generic import TemplateView from evaluation.models import CallEvaluation from grant_management.models import Invoice, FinancialReport, ScientificReport, LaySummary, BlogPost, Milestone from project_core.models import Call, Project from project_core.templatetags.request_is_reviewer import request_is_reviewer def create_news(date, description): return {'date': date, 'description': mark_safe(description) } def create_news_project(date, description, project): news = create_news(date, description) project_url = reverse('logged-grant_management-project-detail', kwargs={'pk': project.id}) pi_name_url = reverse('logged-person-position-detail', kwargs={'pk': project.principal_investigator.id}) news['project_title'] = project.title news['project_url'] = project_url news['pi_name'] = project.principal_investigator.person news['pi_url'] = pi_name_url news['key'] = project.key return news def date_1_week_ago(date): return date - timedelta(days=5) def get_project_news(): today = datetime.today().date() starts = date_1_week_ago(today) news = [] for project in Project.objects.filter(start_date__gte=starts).filter(status=Project.ONGOING): news.append( create_news_project(project.start_date, f'Project starts', project) ) for project in Project.objects.filter(end_date__gte=starts).filter(status=Project.ONGOING): news.append( create_news_project(project.end_date, f'Project ends', project) ) for invoice in Invoice.objects.filter(due_date__gte=starts).filter(project__status=Project.ONGOING): news.append( create_news_project(invoice.due_date, f'Invoice due', invoice.project) ) for financial_report in FinancialReport.objects.filter(due_date__gte=starts).filter( project__status=Project.ONGOING): news.append( create_news_project(financial_report.due_date, f'Financial report due', financial_report.project) ) for scientific_report in ScientificReport.objects.filter(due_date__gte=starts).filter( project__status=Project.ONGOING): news.append( create_news_project(scientific_report.due_date, f'Financial report due', scientific_report.project) ) for lay_summary in LaySummary.objects.filter(due_date__gte=starts).filter(project__status=Project.ONGOING): news.append( create_news_project(lay_summary.due_date, f'Lay summary due', lay_summary.project) ) for blog_post in BlogPost.objects.filter(due_date__gte=starts).filter(project__status=Project.ONGOING): news.append( create_news_project(blog_post.due_date, f'Blog post due', blog_post.project) ) for milestone in Milestone.objects.filter(due_date__gte=starts).filter(project__status=Project.ONGOING): if milestone.text: milestone_explanation = f' - {milestone.text}' else: milestone_explanation = '' news.append( create_news_project(milestone.due_date, # TODO: this should do the same representation for a milestone as grant_management/_category-badge.tmpl f'Milestone due: <span class="badge badge-secondary">{milestone.category.name}</span> {milestone_explanation}', milestone.project) ) bold_today = mark_safe('<strong>TODAY</strong>') news.append({'date': today, 'project_title': bold_today, 'pi_name': bold_today, 'key': bold_today, 'description': bold_today}) return news def get_call_news(): today = datetime.today().date() starts = date_1_week_ago(today) news = [] for call_open in Call.objects.filter(call_open_date__gte=starts): url = reverse('logged-call-detail', kwargs={'pk': call_open.id}) news.append( create_news(call_open.call_open_date, f'Call opening: <a href="{url}">{call_open.short_name}</a>')) for call_close in Call.objects.filter(submission_deadline__gte=starts): url = reverse('logged-call-detail', kwargs={'pk': call_close.id}) news.append( create_news(call_close.submission_deadline, f'Call closing: <a href="{url}">{call_close.short_name}</a>')) for call_evaluation in CallEvaluation.objects.filter(panel_date__gte=starts): url = reverse('logged-call-evaluation-detail', kwargs={'pk': call_evaluation.id}) news.append( create_news(call_evaluation.panel_date, f'Panel for call <a href="{url}">{call_evaluation.call.little_name()}</a>') ) news.append(create_news(today, '<strong>TODAY</strong>')) return news class News(TemplateView): def get(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) if request_is_reviewer(request): return HttpResponseRedirect(reverse('logged-proposal-list')) context.update({'active_section': 'home', 'active_subsection': 'news', 'sidebar_template': 'logged/_sidebar-home.tmpl' }) context['breadcrumb'] = [{'name': 'News'}] context['call_news'] = get_call_news() context['project_news'] = get_project_news() context['active_tab'] = self.request.GET.get('tab', 'projects') context['documentation_url'] = settings.DOCUMENTATION_URL return render(request, 'logged/news.tmpl', context)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,340
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/evaluation/migrations/0014_renames_proposal_evaluation_fund_not_fund.py
# Generated by Django 3.0.3 on 2020-03-13 15:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('evaluation', '0013_proposal_evaluation_optional_fields'), ] operations = [ migrations.AlterField( model_name='historicalproposalevaluation', name='board_decision', field=models.CharField(blank=True, choices=[('Fund', 'Fund'), ('NotFund', 'Do not fund')], max_length=7, null=True), ), migrations.AlterField( model_name='proposalevaluation', name='board_decision', field=models.CharField(blank=True, choices=[('Fund', 'Fund'), ('NotFund', 'Do not fund')], max_length=7, null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,341
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/comments/migrations/0016_british_spelling.py
# Generated by Django 2.2.6 on 2020-02-12 15:29 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('comments', '0015_category_color'), ] operations = [ migrations.RenameField( model_name='category', old_name='color', new_name='colour', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,342
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/tests/forms/test_call_part_file.py
from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from project_core.forms.call_part_file import CallPartFileForm from project_core.tests import database_population from project_core.tests.utils_for_tests import dict_to_multivalue_dict class CallPartFileFormTest(TestCase): def setUp(self): self._call = database_population.create_call() self._call_part = database_population.create_call_part(self._call) def test_create_call_part(self): call_part_file_data = dict_to_multivalue_dict({ 'name': 'form_for_logistics', 'description': 'Please download the form and upload it later', 'call_part': self._call_part }) files = {'file': SimpleUploadedFile('form_for_logistics.docx', b'This is a good form')} call_part_file = CallPartFileForm(data=call_part_file_data, files=files, call_part_pk=self._call_part.pk, instance=None) self.assertTrue(call_part_file.is_valid()) new_call_part = call_part_file.save() self.assertTrue(new_call_part.id) self.assertEqual(new_call_part.order, 10)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,343
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0059_location.py
# Generated by Django 3.2.3 on 2021-10-25 12:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0167_organisation_display_name'), ('grant_management', '0058_alter_laysummary_verbose_name_plural'), ] operations = [ migrations.CreateModel( name='Location', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('latitude', models.DecimalField(decimal_places=2, max_digits=6)), ('longitude', models.DecimalField(decimal_places=2, max_digits=7)), ('name', models.CharField(max_length=100)), ('project', models.ForeignKey(help_text='Project that the coordinate belongs to', on_delete=django.db.models.deletion.PROTECT, related_name='project_location', to='project_core.project')), ], options={ 'abstract': False, }, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,344
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0080_same_file_attached_twice.py
# Generated by Django 2.2.6 on 2019-11-14 12:15 from django.db import migrations, models import storages.backends.s3boto3 class Migration(migrations.Migration): dependencies = [ ('project_core', '0079_budget_helptext'), ] operations = [ migrations.AlterField( model_name='proposalqafile', name='file', field=models.FileField(storage=storages.backends.s3boto3.S3Boto3Storage(), upload_to='proposals_qa/'), ), migrations.AlterField( model_name='proposalqafile', name='md5', field=models.CharField(db_index=True, max_length=32), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,345
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0048_installment_helptext.py
# Generated by Django 3.0.5 on 2020-05-27 15:25 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('grant_management', '0047_installment_help_texts'), ] operations = [ migrations.AlterField( model_name='invoice', name='installment', field=models.ForeignKey(blank=True, help_text='Installment to which the invoice is assigned', null=True, on_delete=django.db.models.deletion.PROTECT, to='grant_management.Installment'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,346
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/comments/models.py
from django.contrib.auth.models import User from django.db import models from storages.backends.s3boto3 import S3Boto3Storage from colours.models import ColourPair from evaluation.models import ProposalEvaluation, CallEvaluation from grant_management.models import Invoice, GrantAgreement from project_core.models import CreateModifyOn, Proposal, Call, Project # Models used by Proposal, Call... from project_core.utils.utils import management_file_validator class Category(CreateModifyOn): name = models.CharField(max_length=100, help_text='Type of comment or attachment', unique=True) colour = models.ForeignKey(ColourPair, on_delete=models.PROTECT, null=True, blank=True) class Meta: verbose_name_plural = 'Categories' def __str__(self): return self.name class AbstractComment(CreateModifyOn): text = models.TextField(help_text='Comment text') created_by = models.ForeignKey(User, help_text='User by which the entry was created', related_name="%(app_label)s_%(class)s_created_by_related", blank=True, null=True, on_delete=models.PROTECT) class Meta: abstract = True def truncate_text(self): max_text = 70 if len(self.text) < max_text: text = self.text else: text = self.text[:max_text - 3] + '...' text = text.replace('\n', '\\n') return text class AbstractAttachment(CreateModifyOn): text = models.TextField(help_text='Comment of the attachment', null=True, blank=True) created_by = models.ForeignKey(User, help_text='User by which the entry was created', related_name="%(app_label)s_%(class)s_created_by_related", blank=True, null=True, on_delete=models.PROTECT) class Meta: unique_together = (('created_on', 'created_by'),) abstract = True # Proposal class ProposalCommentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Proposal Comment Categories' def __str__(self): return self.category.name class ProposalComment(AbstractComment): proposal = models.ForeignKey(Proposal, help_text='Proposal that this comment refers to', on_delete=models.PROTECT) category = models.ForeignKey(ProposalCommentCategory, help_text='Type of comment', on_delete=models.PROTECT) created_by = models.ForeignKey(User, help_text='User by which the entry was created', related_name="%(app_label)s_%(class)s_created_by_related", blank=True, null=True, on_delete=models.PROTECT) class Meta: unique_together = (('proposal', 'created_on', 'created_by'),) def __str__(self): return f'Proposal:{self.proposal} Category:{self.category} Text: {self.truncate_text()}' def set_parent(self, parent): self.proposal = parent @staticmethod def category_queryset(): return ProposalCommentCategory.objects.all() class ProposalAttachmentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Proposal Attachment Categories' def __str__(self): return self.category.name def proposal_attachment_rename(instance, filename): return f'comments/ProposalAttachment/AttachmentProposal-{instance.proposal.id}-{filename}' class ProposalAttachment(AbstractAttachment): file = models.FileField(storage=S3Boto3Storage(), upload_to=proposal_attachment_rename, validators=[*management_file_validator()]) proposal = models.ForeignKey(Proposal, help_text='Proposal that this attachments belongs to', on_delete=models.PROTECT) category = models.ForeignKey(ProposalAttachmentCategory, help_text='Category of the attachment', on_delete=models.PROTECT) def __str__(self): return f'Proposal:{self.proposal} Category:{self.category} File: {self.file.name}' def set_parent(self, parent): self.proposal = parent @staticmethod def category_queryset(): return ProposalAttachmentCategory.objects.all() # Call class CallCommentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Call Comment Categories' def __str__(self): return self.category.name class CallComment(AbstractComment): """Comments made about a call""" call = models.ForeignKey(Call, help_text='Call about which the comment was made', on_delete=models.PROTECT) category = models.ForeignKey(CallCommentCategory, help_text='Type of comment', on_delete=models.PROTECT) class Meta: unique_together = (('call', 'created_on', 'created_by'),) def __str__(self): return f'Call:{self.call} Category:{self.category} Text: {self.truncate_text()}' def set_parent(self, parent): self.call = parent @staticmethod def category_queryset(): return CallCommentCategory.objects.all() class CallAttachmentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Call Attachment Categories' def __str__(self): return self.category.name def call_attachment_rename(instance, filename): return f'comments/CallAttachment/AttachmentCall-{instance.call.id}-{filename}' class CallAttachment(AbstractAttachment): file = models.FileField(storage=S3Boto3Storage(), upload_to=call_attachment_rename, validators=[*management_file_validator()]) call = models.ForeignKey(Call, help_text='Call that this attachment belongs to', on_delete=models.PROTECT) category = models.ForeignKey(CallAttachmentCategory, help_text='Category of the attachment', on_delete=models.PROTECT) def __str__(self): return f'Call:{self.call.little_name()} Category:{self.category} File: {self.file.name}' def set_parent(self, parent): self.call = parent @staticmethod def category_queryset(): return CallAttachmentCategory.objects.all() # ProposalEvaluation class ProposalEvaluationCommentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Proposal Evaluation Comment Categories' def __str__(self): return self.category.name class ProposalEvaluationComment(AbstractComment): """Comments made about a Proposal Evaluation""" proposal_evaluation = models.ForeignKey(ProposalEvaluation, help_text='Proposal Evaluation about which the comment was made', on_delete=models.PROTECT) category = models.ForeignKey(ProposalEvaluationCommentCategory, help_text='Type of comment', on_delete=models.PROTECT) class Meta: unique_together = (('proposal_evaluation', 'created_on', 'created_by'),) def set_parent(self, parent): self.proposal_evaluation = parent @staticmethod def category_queryset(): return ProposalEvaluationCommentCategory.objects.all() class ProposalEvaluationAttachmentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Proposal Evaluation Attachment Categories' def __str__(self): return self.category.name def proposal_evaluation_rename(instance, filename): return f'comments/ProposalEvaluationAttachment/AttachmentProposalEvaluation-{instance.proposal_evaluation.id}-{filename}' class ProposalEvaluationAttachment(AbstractAttachment): file = models.FileField(storage=S3Boto3Storage(), upload_to=proposal_evaluation_rename, validators=[*management_file_validator()]) proposal_evaluation = models.ForeignKey(ProposalEvaluation, help_text='Proposal Evaluation that this attachment belongs to', on_delete=models.PROTECT) category = models.ForeignKey(ProposalEvaluationAttachmentCategory, help_text='Category of the attachment', on_delete=models.PROTECT) def set_parent(self, parent): self.proposal_evaluation = parent @staticmethod def category_queryset(): return ProposalEvaluationAttachmentCategory.objects.all() # Project class ProjectCommentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Project Comment Categories' def __str__(self): return self.category.name class ProjectComment(AbstractComment): """Comments made about a Proposal Evaluation""" project = models.ForeignKey(Project, help_text='Project about which the comment was made', on_delete=models.PROTECT) category = models.ForeignKey(ProjectCommentCategory, help_text='Type of comment', on_delete=models.PROTECT) class Meta: unique_together = (('project', 'created_on', 'created_by'),) def set_parent(self, parent): self.project = parent @staticmethod def category_queryset(): return ProjectCommentCategory.objects.all() class ProjectAttachmentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Project Attachment Categories' def __str__(self): return self.category.name def project_attachment_rename(instance, filename): return f'comments/ProjectAttachment/AttachmentProject-{instance.project.id}-{filename}' class ProjectAttachment(AbstractAttachment): file = models.FileField(storage=S3Boto3Storage(), upload_to=project_attachment_rename, validators=[*management_file_validator()]) project = models.ForeignKey(Project, help_text='Project that this attachment belongs to', on_delete=models.PROTECT) category = models.ForeignKey(ProjectAttachmentCategory, help_text='Category of the attachment', on_delete=models.PROTECT) def set_parent(self, parent): self.project = parent @staticmethod def category_queryset(): return ProjectAttachmentCategory.objects.all() # CallEvaluation class CallEvaluationCommentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Call Evaluation Comment Categories' def __str__(self): return self.category.name class CallEvaluationComment(AbstractComment): """Comments made about a Proposal Evaluation""" call_evaluation = models.ForeignKey(CallEvaluation, help_text='Call Evaluation about which the comment was made', on_delete=models.PROTECT) category = models.ForeignKey(CallEvaluationCommentCategory, help_text='Type of comment', on_delete=models.PROTECT) class Meta: unique_together = (('call_evaluation', 'created_on', 'created_by'),) def __str__(self): return f'CallEvaluation:{self.call_evaluation} Category:{self.category} Text: {self.truncate_text()}' def set_parent(self, parent): self.call_evaluation = parent @staticmethod def category_queryset(): return CallEvaluationCommentCategory.objects.all() # Invoice class InvoiceCommentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Invoice Comment Categories' def __str__(self): return self.category.name class InvoiceComment(AbstractComment): """Comments made about a Proposal Evaluation""" invoice = models.ForeignKey(Invoice, help_text='Call Evaluation about which the comment was made', on_delete=models.PROTECT) category = models.ForeignKey(InvoiceCommentCategory, help_text='Type of comment', on_delete=models.PROTECT) class Meta: unique_together = (('invoice', 'created_on', 'created_by'),) def __str__(self): return f'Invoice:{self.invoice} Category:{self.category} Text: {self.truncate_text()}' def set_parent(self, parent): self.invoice = parent @staticmethod def category_queryset(): return InvoiceCommentCategory.objects.all() # GrantAgreement class GrantAgreementCommentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Grant Agreement Comment Categories' def __str__(self): return self.category.name class GrantAgreementComment(AbstractComment): """Comments made about a Proposal Evaluation""" grant_agreement = models.ForeignKey(GrantAgreement, help_text='GrantAgreement about which the comment was made', on_delete=models.PROTECT) category = models.ForeignKey(GrantAgreementCommentCategory, help_text='Type of comment', on_delete=models.PROTECT) class Meta: unique_together = (('grant_agreement', 'created_on', 'created_by'),) class Meta: verbose_name_plural = 'Grant Agreement Comments' def set_parent(self, parent): self.grant_agreement = parent @staticmethod def category_queryset(): return GrantAgreementCommentCategory.objects.all() class GrantAgreementAttachmentCategory(CreateModifyOn): category = models.OneToOneField(Category, on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Grant Agreement Attachment Categories' def __str__(self): return self.category.name def grant_agreement_attachment_rename(instance, filename): return f'comments/GrantAgreementAttachment/AttachmentGrantAgreement-{instance.grant_agreement.id}-{filename}' class GrantAgreementAttachment(AbstractAttachment): file = models.FileField(storage=S3Boto3Storage(), upload_to=grant_agreement_attachment_rename, validators=[*management_file_validator()]) grant_agreement = models.ForeignKey(GrantAgreement, help_text='GrantAgreement that this attachment belongs to', on_delete=models.PROTECT) category = models.ForeignKey(GrantAgreementAttachmentCategory, help_text='Category of the attachment', on_delete=models.PROTECT) class Meta: verbose_name_plural = 'Grant Agreement Attachments' def set_parent(self, parent): self.grant_agreement = parent @staticmethod def category_queryset(): return GrantAgreementAttachmentCategory.objects.all()
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,347
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/logged/person_position.py
from django.contrib.messages.views import SuccessMessageMixin from django.urls import reverse from django.views.generic import UpdateView, CreateView, DetailView, ListView from project_core.forms.contacts import ContactForm from project_core.models import PersonPosition class PersonPositionListView(ListView): template_name = 'logged/contact-list.tmpl' context_object_name = 'contacts' model = PersonPosition queryset = PersonPosition.objects.filter(privacy_policy=True) def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['contacts'] = PersonPosition.objects.filter(privacy_policy=True) context.update({'active_section': 'lists', 'active_subsection': 'contact-list', 'sidebar_template': 'logged/_sidebar-lists.tmpl'}) context['breadcrumb'] = [{'name': 'Lists', 'url': reverse('logged-lists')}, {'name': 'People'}] return context class PersonPositionUpdateView(UpdateView): template_name = 'logged/contact-form.tmpl' model = PersonPosition form_class = ContactForm prefix = 'contact_form' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'lists', 'active_subsection': 'contact-list', 'sidebar_template': 'logged/_sidebar-lists.tmpl'}) context['breadcrumb'] = [{'name': 'Lists', 'url': reverse('logged-lists')}, {'name': 'People', 'url': reverse('logged-person-position-list')}, {'name': 'Edit Person'}] return context def get_success_url(self, **kwargs): return reverse('logged-person-position-detail', kwargs={'pk': self.object.pk}) class PersonPositionCreateView(SuccessMessageMixin, CreateView): template_name = 'logged/contact-form.tmpl' model = PersonPosition success_message = 'Contact created' form_class = ContactForm prefix = 'contact_form' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'lists', 'active_subsection': 'contacts-add', 'sidebar_template': 'logged/_sidebar-lists.tmpl'}) context['breadcrumb'] = [{'name': 'Lists', 'url': reverse('logged-lists')}, {'name': 'People', 'url': reverse('logged-person-position-list')}, {'name': 'Create'}] return context def get_success_url(self, **kwargs): return reverse('logged-person-position-detail', kwargs={'pk': self.object.pk}) class PersonPositionDetailView(DetailView): template_name = 'logged/contact-detail.tmpl' context_object_name = 'person' model = PersonPosition def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'lists', 'active_subsection': 'contact-list', 'sidebar_template': 'logged/_sidebar-lists.tmpl'}) context['breadcrumb'] = [{'name': 'Lists', 'url': reverse('logged-lists')}, {'name': 'People', 'url': reverse('logged-person-position-list')}, {'name': 'Details'}] return context class PersonPositionMixin: fields = ['person__first_name', 'person__surname'] @property def success_msg(self): return NotImplemented
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,348
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/evaluation/views.py
from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin from django.core.exceptions import PermissionDenied from django.db.models.fields.files import FieldFile from django.shortcuts import render, redirect from django.urls import reverse from django.utils.safestring import mark_safe from django.views.generic import TemplateView, ListView, DetailView, UpdateView, CreateView from ProjectApplication import settings from comments import utils from comments.utils import comments_attachments_forms, process_comment_attachment from evaluation.forms.call_evaluation import CallEvaluationForm from evaluation.forms.close_call_evaluation import CloseCallEvaluation from evaluation.forms.criterion import CriterionForm from evaluation.forms.eligibility import EligibilityDecisionForm from evaluation.forms.proposal_evaluation import ProposalEvaluationForm from evaluation.models import CallEvaluation, ProposalEvaluation, CriterionCallEvaluation, Criterion from project_core.models import Proposal, Call, ProposalStatus from project_core.utils.utils import user_is_in_group_name from project_core.views.common.proposal import AbstractProposalDetailView from project_core.views.logged.proposal import get_eligibility_history from project_core.widgets import CheckboxSelectMultipleSortable def add_proposal_evaluation_form(context, proposal): proposal_evaluation_form = ProposalEvaluationForm(prefix=ProposalEvaluationForm.FORM_NAME, proposal=proposal) context[ProposalEvaluationForm.FORM_NAME] = proposal_evaluation_form class ProposalEvaluationDetail(AbstractProposalDetailView): def get(self, request, *args, **kwargs): if not user_is_in_group_name(request.user, settings.MANAGEMENT_GROUP_NAME): raise PermissionDenied() proposal_evaluation_id = kwargs['pk'] proposal_evaluation = ProposalEvaluation.objects.get(id=proposal_evaluation_id) context = self.prepare_context(request, *args, **{'pk': proposal_evaluation.proposal.id}) add_proposal_evaluation_form(context, proposal_evaluation.proposal) context.update(comments_attachments_forms('logged-proposal-evaluation-comment-add', proposal_evaluation)) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl' }) context['breadcrumb'] = [{'name': 'Calls to evaluate', 'url': reverse('logged-evaluation-list')}, {'name': f'List of proposals ({proposal_evaluation.proposal.call.little_name()})', 'url': reverse('logged-call-evaluation-list-proposals', kwargs={'call_id': proposal_evaluation.proposal.call.id})}, {'name': 'Proposal evaluation'}] return render(request, 'logged/proposal-detail-evaluation-detail.tmpl', context) class EvaluationCriteriaList(TemplateView): template_name = 'evaluation/evaluation_criteria-list.tmpl' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-criteria-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl' }) context['criteria'] = Criterion.objects.all() context['breadcrumb'] = [{'name': 'Evaluation Criteria'}] return context class EvaluationCriterionDetail(TemplateView): template_name = 'evaluation/criterion-detail.tmpl' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['criterion'] = criterion = Criterion.objects.get(pk=kwargs['pk']) context['breadcrumb'] = [{'name': 'Evaluation Criteria', 'url': reverse('logged-evaluation_criteria-list')}, {'name': criterion.name}] context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-criteria-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl' }) return context class EvaluationCriterionUpdate(SuccessMessageMixin, UpdateView): template_name = 'evaluation/criterion-form.tmpl' model = Criterion success_message = 'Criterion updated' form_class = CriterionForm def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['breadcrumb'] = [{'name': 'Evaluation Criteria', 'url': reverse('logged-evaluation_criteria-list')}, {'name': self.object.name}] context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-criteria-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl' }) return context def get_success_url(self): return reverse('logged-evaluation_criterion-detail', kwargs={'pk': self.kwargs['pk']}) class EvaluationCriterionAdd(SuccessMessageMixin, CreateView): template_name = 'evaluation/criterion-form.tmpl' model = Criterion success_message = 'Criterion created' form_class = CriterionForm def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-criteria-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl' }) return context def get_success_url(self): return reverse('logged-evaluation_criterion-detail', kwargs={'pk': self.object.pk}) class ProposalEvaluationList(TemplateView): template_name = 'evaluation/call_evaluation-list.tmpl' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['calls_opened_evaluation'] = Call.closed_calls().filter(callevaluation__closed_date__isnull=True) context['calls_closed_evaluation'] = Call.closed_calls().filter(callevaluation__closed_date__isnull=False) context['proposals_no_draft_only'] = True context.update({'view_button': False, 'edit_button': False, 'proposal_call_list_button': False, 'proposal_evaluation_list_button': True, 'evaluation_spreadsheet_button': True, 'view_evaluation_button': True, 'evaluation_summary_or_validation_button': True }) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl' }) context['breadcrumb'] = [{'name': 'Calls to evaluate'}] context['active_tab'] = self.request.GET.get('tab', 'open') return context class ProposalEvaluationUpdate(AbstractProposalDetailView): def get(self, request, *args, **kwargs): if not user_is_in_group_name(request.user, settings.MANAGEMENT_GROUP_NAME): raise PermissionDenied(f'User {request.user} does not have access to Evaluate proposals') if 'pk' in kwargs: proposal_evaluation = ProposalEvaluation.objects.get(id=kwargs['pk']) proposal = proposal_evaluation.proposal elif 'proposal' in request.GET: proposal_id = request.GET['proposal'] proposal = Proposal.objects.get(id=proposal_id) else: assert False if proposal.call.callevaluation.is_closed(): raise PermissionDenied('Cannot edit a Proposal Evaluation for a closed call') context = self.prepare_context(request, *args, **{'pk': proposal.id}) add_proposal_evaluation_form(context, proposal) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) context['breadcrumb'] = [{'name': 'Calls to evaluate', 'url': reverse('logged-evaluation-list')}, {'name': f'List of proposals ({proposal.call.little_name()})', 'url': reverse('logged-call-evaluation-list-proposals', kwargs={'call_id': proposal.call.id})}, {'name': 'Edit proposal evaluation'}] return render(request, 'logged/proposal-detail-evaluation-form.tmpl', context) def post(self, request, *args, **kwargs): if not user_is_in_group_name(request.user, settings.MANAGEMENT_GROUP_NAME): raise PermissionDenied('User does not have access to update a Proposal') proposal = Proposal.objects.get(id=kwargs['pk']) if proposal.call.callevaluation.is_closed(): raise PermissionDenied('Cannot edit a Proposal Evaluation for a closed call') context = self.prepare_context(request, *args, **kwargs) proposal_evaluation_form = ProposalEvaluationForm(request.POST, request.FILES, prefix=ProposalEvaluationForm.FORM_NAME, proposal=proposal) if proposal_evaluation_form.is_valid(): proposal_evaluation = proposal_evaluation_form.save(user=request.user) messages.success(request, 'Evaluation saved') return redirect(reverse('logged-proposal-evaluation-detail', kwargs={'pk': proposal_evaluation.id})) else: messages.error(request, 'Evaluation not saved. Verify errors in the form.') context[ProposalEvaluationForm.FORM_NAME] = proposal_evaluation_form context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) return render(request, 'logged/proposal-detail-evaluation-form.tmpl', context) class CallEvaluationUpdate(TemplateView): def get(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) if 'pk' in kwargs: call_evaluation = CallEvaluation.objects.get(id=kwargs['pk']) call = call_evaluation.call else: call_evaluation = None call = Call.objects.get(id=self.request.GET['call']) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) context['call'] = call context['breadcrumb'] = [{'name': 'Calls to evaluate', 'url': reverse('logged-evaluation-list')}, {'name': f'Edit ({call.little_name()})'}] call_evaluation_form = CallEvaluationForm(instance=call_evaluation, prefix=CallEvaluationForm.FORM_NAME, call=call) context[CallEvaluationForm.FORM_NAME] = call_evaluation_form return render(request, 'evaluation/call_evaluation-form.tmpl', context) def post(self, request, *args, **kwargs): if not user_is_in_group_name(request.user, settings.MANAGEMENT_GROUP_NAME): raise PermissionDenied() context = super().get_context_data(**kwargs) if 'pk' in kwargs: call_evaluation = CallEvaluation.objects.get(id=kwargs['pk']) call = call_evaluation.call else: call_evaluation = None call = Call.objects.get(id=self.request.GET['call']) call_evaluation_form = CallEvaluationForm(request.POST, request.FILES, instance=call_evaluation, prefix=CallEvaluationForm.FORM_NAME, call=call) if call_evaluation_form.is_valid(): call_evaluation = call_evaluation_form.save_call_evaluation(user=request.user) messages.success(request, 'Call evaluation saved') return redirect(reverse('logged-call-evaluation-detail', kwargs={'pk': call_evaluation.id})) else: context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) messages.error(request, 'Call evaluation not saved. Verify errors in the form.') context[CallEvaluationForm.FORM_NAME] = call_evaluation_form context['call'] = call return render(request, 'evaluation/call_evaluation-form.tmpl', context) class ProposalList(ListView): template_name = 'evaluation/call_evaluation_list-proposals.tmpl' model = Proposal context_object_name = 'proposals' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) call = Call.objects.get(id=self.kwargs['call_id']) context['call'] = call context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) context['breadcrumb'] = [{'name': 'Calls to evaluate', 'url': reverse('logged-evaluation-list')}, {'name': f'List of proposals ({call.little_name()})'}] return context def get_queryset(self): call = Call.objects.get(id=self.kwargs['call_id']) draft = ProposalStatus.objects.get(name=settings.PROPOSAL_STATUS_DRAFT) proposals = Proposal.objects.filter(call=call).exclude(proposal_status=draft) return proposals class CallEvaluationDetail(DetailView): model = CallEvaluation template_name = 'evaluation/call_evaluation-detail.tmpl' context_object_name = 'call_evaluation' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) call_evaluation = CallEvaluation.objects.get(id=self.kwargs['pk']) CheckboxSelectMultipleSortable.add_missing_related_objects(CriterionCallEvaluation, call_evaluation, 'call_evaluation', Criterion, 'criterion') criteria = [] for criterion in call_evaluation.criterioncallevaluation_set.order_by('order', 'criterion__name'): criteria.append(({'in_call_evaluation': criterion.enabled, 'name': criterion.criterion.name, 'description': criterion.criterion.description}) ) criteria.sort(key=lambda c: not c['in_call_evaluation']) context['criteria'] = criteria context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl' }) context['breadcrumb'] = [{'name': 'Calls to evaluate', 'url': reverse('logged-evaluation-list')}, {'name': f'Details ({call_evaluation.call.little_name()})'}] context.update(comments_attachments_forms('logged-call-evaluation-comment-add', call_evaluation)) return context class CallEvaluationCommentAdd(TemplateView): def post(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) call_evaluation = CallEvaluation.objects.get(id=kwargs['pk']) result = process_comment_attachment(request, context, 'logged-call-evaluation-detail', 'logged-proposal-call-comment-add', 'logged/call-evaluation-detail.tmpl', call_evaluation) return result def proposal_detail_eligibility_context(proposal): context = {} context.update(utils.comments_attachments_forms('logged-call-evaluation-proposal-detail', proposal)) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl' }) context['breadcrumb'] = [{'name': 'Calls to evaluate', 'url': reverse('logged-evaluation-list')}, {'name': f'List of proposals ({proposal.call.little_name()})', 'url': reverse('logged-call-evaluation-list-proposals', kwargs={'call_id': proposal.call.id})}, {'name': 'Proposal'}] context[EligibilityDecisionForm.FORM_NAME] = EligibilityDecisionForm(prefix=EligibilityDecisionForm.FORM_NAME, proposal_id=proposal.id) context['eligibility_history'] = get_eligibility_history(proposal) return context class ProposalDetail(AbstractProposalDetailView): def get(self, request, *args, **kwargs): context = self.prepare_context(request, *args, **kwargs) proposal = Proposal.objects.get(id=kwargs['pk']) context.update(proposal_detail_eligibility_context(proposal)) context['force_eligibility_form_displayed'] = True return render(request, 'evaluation/proposal-detail.tmpl', context) def post(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) proposal = Proposal.objects.get(id=kwargs['pk']) result = process_comment_attachment(request, context, 'logged-call-evaluation-proposal-detail', 'logged-call-comment-add', 'logged/proposal-detail.tmpl', proposal) return result class ProposalCommentAdd(TemplateView): def post(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'logged/_sidebar-evaluation.tmpl'}) proposal_evaluation = ProposalEvaluation.objects.get(id=kwargs['pk']) result = process_comment_attachment(request, context, 'logged-proposal-evaluation-detail', 'logged-proposal-evaluation-comment-add', 'logged/proposal-evaluation-detail.tmpl', proposal_evaluation) return result class ProposalEligibilityUpdate(AbstractProposalDetailView): def post(self, request, *args, **kwargs): if not user_is_in_group_name(request.user, settings.MANAGEMENT_GROUP_NAME): raise PermissionDenied() context = self.prepare_context(request, *args, **kwargs) proposal_id = kwargs['pk'] eligibility_decision_form = EligibilityDecisionForm(request.POST, prefix=EligibilityDecisionForm.FORM_NAME, proposal_id=proposal_id) if eligibility_decision_form.is_valid(): eligibility_decision_form.save_eligibility(request.user) messages.success(request, 'Eligibility saved') return redirect(reverse('logged-call-evaluation-proposal-detail', kwargs={'pk': proposal_id})) else: messages.error(request, 'Eligibility not saved. Verify errors in the form.') context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) proposal = Proposal.objects.get(id=proposal_id) context.update(proposal_detail_eligibility_context(proposal)) context[EligibilityDecisionForm.FORM_NAME] = eligibility_decision_form context['force_eligibility_form_displayed'] = True return render(request, 'evaluation/proposal-detail.tmpl', context) class CallEvaluationSummary(TemplateView): template_name = 'evaluation/call_evaluation-summary-detail.tmpl' @staticmethod def get_call_summary(call): summary = {} proposals = Proposal.objects.filter(call=call) submitted_status = ProposalStatus.objects.get(name=settings.PROPOSAL_STATUS_SUBMITTED) summary['total_number_of_submitted'] = proposals.filter(proposal_status=submitted_status).count() summary['total_number_of_eligible'] = proposals.filter(eligibility=Proposal.ELIGIBLE).count() summary['total_number_of_funded'] = proposals.filter( proposalevaluation__board_decision=ProposalEvaluation.BOARD_DECISION_FUND).count() summary['total_number_of_eligible_not_funded'] = summary['total_number_of_eligible'] - summary[ 'total_number_of_funded'] return summary def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) call = Call.objects.get(id=kwargs['call_id']) context['call'] = call context.update(CallEvaluationSummary.get_call_summary(call)) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) context['breadcrumb'] = [{'name': 'Calls to evaluate', 'url': reverse('logged-evaluation-list')}, {'name': f'Evaluation summary ({call.little_name()})'}] return context class CallEvaluationValidation(TemplateView): template_name = 'evaluation/call_evaluation-validation-detail.tmpl' @staticmethod def _all_good(checks): all_good = True for check in checks: all_good = all_good and check['ok'] return all_good @staticmethod def _add_call_evaluation_proposal_detail_url(proposals): for proposal in proposals: proposal.url_fix_validation_error = reverse('logged-call-evaluation-proposal-detail', kwargs={'pk': proposal.id}) @staticmethod def _add_call_evaluation_proposal_evaluation_edit_url(proposals): proposal: Proposal for proposal in proposals: if hasattr(proposal, 'proposalevaluation'): proposal.url_fix_validation_error = reverse('logged-proposal-evaluation-update', kwargs={'pk': proposal.proposalevaluation.pk}) else: # Actually logged-proposale-valuation-add also works if the proposal-evaluation is already created - # we could use this one only if needed proposal.url_fix_validation_error = reverse( 'logged-proposal-evaluation-add') + f'?proposal={proposal.id}' @staticmethod def _check_call_evaluation_is_completed(call_evaluation): required_fields = CallEvaluationForm(call=call_evaluation.call).fields del required_fields['reviewers'] # reviewers is required but it's checked on the form del required_fields['criteria'] # not part of the model, checked in the form # below check using getattr would always fail because # it's a Many to Many missing_fields = [] for required_field in required_fields: value = getattr(call_evaluation, required_field) if (type(value) == FieldFile and bool(value) is False) or (value is None): missing_fields.append(required_fields[required_field].label) edit_link = reverse('logged-call-evaluation-update', kwargs={'pk': call_evaluation.pk}) return { 'message_all_good': 'Call Evaluation details have been completed', 'message_problem': mark_safe( f'Missing fields in the call evaluation: <em>{",".join(missing_fields)}</em>. <a href="{edit_link}">Edit Call Evaluation</a>'), 'ok': len(missing_fields) == 0 } @staticmethod def _check_all_submitted_proposals_have_eligibility_set(proposals): proposals_without_eligibility_set = proposals.filter( proposal_status__name=settings.PROPOSAL_STATUS_SUBMITTED).filter(eligibility=Proposal.ELIGIBILITYNOTCHECKED) proposals_without_eligibility_set = proposals_without_eligibility_set.order_by('id') CallEvaluationValidation._add_call_evaluation_proposal_detail_url( proposals_without_eligibility_set) return {'message_problem': 'Not all submitted proposals have had their eligibility checked', 'message_all_good': 'All submitted proposals have had their eligibility checked', 'ok': proposals_without_eligibility_set.count() == 0, 'proposals': proposals_without_eligibility_set} @staticmethod def _check_proposal_evaluations_have_letter_for_applicant(proposals): proposals_with_decision_letter = proposals.exclude(proposalevaluation__decision_letter='').values_list('id', flat=True) proposals_without_decision_letter = proposals.exclude(id__in=proposals_with_decision_letter) proposals_without_decision_letter = proposals_without_decision_letter.order_by('id') CallEvaluationValidation._add_call_evaluation_proposal_evaluation_edit_url(proposals_without_decision_letter) return {'message_problem': 'There are proposals without a decision letter', 'message_all_good': 'All the proposals have a decision letter', 'ok': proposals_without_decision_letter.count() == 0, 'proposals': proposals_without_decision_letter} @staticmethod def _check_all_proposals_decision_panel_set(proposals): proposals_with_panel_recommendation = proposals.filter( proposalevaluation__panel_recommendation__isnull=False).values_list('id', flat=True) proposals_without_panel_recommendation = proposals.exclude(id__in=proposals_with_panel_recommendation) proposals_without_panel_recommendation = proposals_without_panel_recommendation.order_by('id') CallEvaluationValidation._add_call_evaluation_proposal_evaluation_edit_url( proposals_without_panel_recommendation) return {'message_problem': 'There are proposals without a panel recommendation', 'message_all_good': 'All the proposals have a panel recommendation', 'ok': proposals_without_panel_recommendation.count() == 0, 'proposals': proposals_without_panel_recommendation} @staticmethod def _check_all_proposals_board_meeting_set(proposals): proposals_with_board_meeting_set = proposals.filter( proposalevaluation__board_decision__isnull=False).values_list('id', flat=True) proposals_without_board_meeting_decision = proposals.exclude(id__in=proposals_with_board_meeting_set) proposals_without_board_meeting_decision = proposals_without_board_meeting_decision.order_by('id') CallEvaluationValidation._add_call_evaluation_proposal_evaluation_edit_url( proposals_without_board_meeting_decision) return {'message_problem': 'There are proposals without a board decision', 'message_all_good': 'All the proposals have a board decision', 'ok': proposals_without_board_meeting_decision.count() == 0, 'proposals': proposals_without_board_meeting_decision} def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) call = Call.objects.get(id=kwargs['call_id']) proposals = Proposal.objects.filter(call=call) eligible_proposals = proposals.filter(eligibility=Proposal.ELIGIBLE) proposal_validations = [] proposal_validations.append(self._check_all_submitted_proposals_have_eligibility_set(proposals)) evaluation_validations = [] evaluation_validations.append(self._check_proposal_evaluations_have_letter_for_applicant(eligible_proposals)) evaluation_validations.append(self._check_all_proposals_decision_panel_set(eligible_proposals)) evaluation_validations.append(self._check_all_proposals_board_meeting_set(eligible_proposals)) evaluation_validations.append(self._check_call_evaluation_is_completed(call.callevaluation)) context['proposal_validations'] = proposal_validations context['evaluation_validations'] = evaluation_validations context['call'] = call context['all_good'] = CallEvaluationValidation._all_good(proposal_validations + evaluation_validations) context['can_close'] = context['all_good'] and call.callevaluation.closed_date is None if context['all_good'] == False: context['reason_cannot_close'] = mark_safe( 'Call Evaluation cannot be closed because there are errors.<br>Please fix them and reload the page.') context['call_evaluation_is_closed'] = call.callevaluation.closed_date is not None if context['all_good']: context['show_summary'] = True context.update(CallEvaluationSummary.get_call_summary(call)) context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) context['breadcrumb'] = [{'name': 'Calls to evaluate', 'url': reverse('logged-evaluation-list')}, {'name': f'Evaluation validation ({call.little_name()})'}] context[CloseCallEvaluation.name] = CloseCallEvaluation(call_id=call.id) return context class CallCloseEvaluation(TemplateView): def post(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) call = Call.objects.get(id=kwargs['call_id']) call_evaluation = CallEvaluation.objects.get(call=call) context['call'] = call projects_created = call_evaluation.close(request.user) context['projects_created_count'] = len(projects_created) context['projects_created'] = projects_created context.update({'active_section': 'evaluation', 'active_subsection': 'evaluation-list', 'sidebar_template': 'evaluation/_sidebar-evaluation.tmpl'}) context['breadcrumb'] = [{'name': 'Calls to evaluate', 'url': reverse('logged-evaluation-list')}, {'name': f'Call Evaluation ({call.little_name()})', 'url': reverse('logged-call-evaluation-summary', kwargs={'call_id': call.id})}, {'name': f'Close call ({call.little_name()})'}] return render(request, 'evaluation/call_evaluation-close-detail.tmpl', context)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,349
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/templatetags/request_is_reviewer.py
from django import template from ProjectApplication import settings from project_core.utils.utils import user_is_in_group_name register = template.Library() @register.filter(name='request_is_reviewer') def request_is_reviewer(request): return user_is_in_group_name(request.user, settings.REVIEWER_GROUP_NAME)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,350
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/variable_templates/admin.py
from django.contrib import admin import variable_templates.models class TemplateVariableNameAdmin(admin.ModelAdmin): search_fields = ('name', 'default', 'description', ) list_display = ('name', 'default', 'description', ) ordering = ('name', 'default', 'description', ) class FundingInstrumentVariableTemplateAdmin(admin.ModelAdmin): search_fields = ('funding_instrument__long_name', 'name__name', 'value', ) list_display = ('funding_instrument', 'name', 'value', ) ordering = ('name', 'value', ) class CallVariableTemplateAdmin(admin.ModelAdmin): search_fields = ('call__long_name', 'name__name', 'value', ) list_display = ('call', 'name', 'value', ) ordering = ('name', 'value', ) admin.site.register(variable_templates.models.TemplateVariableName, TemplateVariableNameAdmin) admin.site.register(variable_templates.models.FundingInstrumentVariableTemplate, FundingInstrumentVariableTemplateAdmin) admin.site.register(variable_templates.models.CallVariableTemplate, CallVariableTemplateAdmin)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,351
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/tests/forms/test_scientific_clusters.py
from django.test import TestCase from project_core.forms.scientific_clusters import ScientificClusterForm from project_core.tests import database_population from project_core.tests.utils_for_tests import dict_to_multivalue_dict class ScientificClustersFormTest(TestCase): def setUp(self): self._proposal = database_population.create_proposal() self._keywords = database_population.create_keywords() self._academic_title = database_population.create_academic_title() self._gender = database_population.create_genders()[0] self._career_stage = database_population.create_career_stage() self._organisation_names = database_population.create_organisation_names() def test_create_scientific_cluster(self): prefix = 'SC' scientific_cluster_data = dict_to_multivalue_dict({ f'{prefix}-title': 'Super Cluster', f'{prefix}-proposal': self._proposal, f'{prefix}-orcid': '0000-0002-1175-2668', f'{prefix}-first_name': 'John', f'{prefix}-email': 'john@example.org', f'{prefix}-surname': 'Doe', f'{prefix}-academic_title': self._academic_title, f'{prefix}-gender': self._gender, f'{prefix}-career_stage': self._career_stage, f'{prefix}-phone': '+12125552368', f'{prefix}-organisation_names': self._organisation_names[0] }) scientific_cluster_data.setlist(f'{prefix}-keywords', self._keywords) scientific_cluster_form = ScientificClusterForm(data=scientific_cluster_data, prefix=prefix) self.assertTrue(scientific_cluster_form.is_valid()) scientific_cluster = scientific_cluster_form.save() self.assertTrue(scientific_cluster.id) self.assertEqual(scientific_cluster.title, 'Super Cluster') self.assertEqual(scientific_cluster.sub_pi.person.first_name, 'John')
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,352
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0172_project_call_null_and_historical_finance_year_not_null.py
# Generated by Django 3.2.3 on 2021-11-12 10:19 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0171_make_project_finance_year_not_nullable'), ] operations = [ migrations.AlterField( model_name='historicalproject', name='finance_year', field=models.IntegerField(default=0, help_text='Finance year of this project'), preserve_default=False, ), migrations.AlterField( model_name='project', name='call', field=models.ForeignKey(blank=True, help_text='Call to which the project belongs', null=True, on_delete=django.db.models.deletion.PROTECT, to='project_core.call'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,353
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/comments/migrations/0033_add_categories.py
# Generated by Django 3.0.5 on 2020-06-02 13:54 from django.core.exceptions import ObjectDoesNotExist from django.db import migrations def add_categories(apps, schema_editor): GrantAgreementAttachmentCategory = apps.get_model('comments', 'GrantAgreementAttachmentCategory') GrantAgreementCommentCategory = apps.get_model('comments', 'GrantAgreementCommentCategory') GrantAgreementComment = apps.get_model('comments', 'GrantAgreementComment') GrantAgreementAttachment = apps.get_model('comments', 'GrantAgreementAttachment') InvoiceCommentCategory = apps.get_model('comments', 'InvoiceCommentCategory') InvoiceComment = apps.get_model('comments', 'InvoiceComment') ProjectComment = apps.get_model('comments', 'ProjectComment') ProjectAttachment = apps.get_model('comments', 'ProjectAttachment') ProjectCommentCategory = apps.get_model('comments', 'ProjectCommentCategory') ProjectAttachmentsCategory = apps.get_model('comments', 'ProjectAttachmentCategory') ProposalAttachmentCategory = apps.get_model('comments', 'ProjectAttachmentCategory') ProposalCommentCategory = apps.get_model('comments', 'ProposalCommentCategory') ProposalEvaluationAttachmentCategory = apps.get_model('comments', 'ProposalEvaluationAttachmentCategory') ProposalEvaluationCommentCategory = apps.get_model('comments', 'ProposalEvaluationCommentCategory') Category = apps.get_model('comments', 'Category') ColourPair = apps.get_model('colours', 'ColourPair') Colour = apps.get_model('colours', 'Colour') # For unit tests or new databases try: sunflower = ColourPair.objects.get(description='Sunflower with light font') except ObjectDoesNotExist: red, _ = Colour.objects.get_or_create(name='red', hex_code='ff0000') blue, _ = Colour.objects.get_or_create(name='blue', hex_code='0000ff') sunflower = ColourPair.objects.create(description='Sunflower with light font', background=red, text=blue) try: peter_river = ColourPair.objects.get(description='Peter river with light font') except ObjectDoesNotExist: red, _ = Colour.objects.get_or_create(name='red', hex_code='ff0000') blue, _ = Colour.objects.get_or_create(name='blue', hex_code='0000ff') peter_river = ColourPair.objects.create(description='Peter river with light font', background=red, text=blue) try: emerald_with_light_font = ColourPair.objects.get(description='Emerald with light font') except ObjectDoesNotExist: red, _ = Colour.objects.get_or_create(name='red', hex_code='ff0000') blue, _ = Colour.objects.get_or_create(name='blue', hex_code='0000ff') emerald_with_light_font = ColourPair.objects.create(description='Emerald with light font', background=red, text=blue) try: turquoise_with_light_font = ColourPair.objects.get(description='Turquoise with light font') except ObjectDoesNotExist: red, _ = Colour.objects.get_or_create(name='red', hex_code='ff0000') blue, _ = Colour.objects.get_or_create(name='blue', hex_code='0000ff') turquoise_with_light_font = ColourPair.objects.create(description='Turquoise with light font', background=red, text=blue) # Creates new categories Category.objects.get_or_create(name='Partners', colour=sunflower) Category.objects.get_or_create(name='Milestones', colour=peter_river) Category.objects.get_or_create(name='Documentation', colour=emerald_with_light_font) Category.objects.get_or_create(name='Payment', colour=turquoise_with_light_font) for category_name in ['Correspondence', 'Deadline', 'Payment', 'Finance', 'Outreach', 'Reports', 'Evaluation', 'Budget', 'Partners', 'Documentation']: # Make sure that they exist in the unit tests try: Category.objects.get(name=category_name) except ObjectDoesNotExist: Category.objects.create(name=category_name, colour=sunflower) # Creates new Categories for the things InvoiceComment.objects.all().delete() InvoiceCommentCategory.objects.all().delete() InvoiceCommentCategory.objects.get_or_create(category=Category.objects.get(name='Correspondence')) InvoiceCommentCategory.objects.get_or_create(category=Category.objects.get(name='Deadline')) InvoiceCommentCategory.objects.get_or_create(category=Category.objects.get(name='Payment')) GrantAgreementComment.objects.all().delete() GrantAgreementCommentCategory.objects.all().delete() GrantAgreementCommentCategory.objects.get_or_create(category=Category.objects.get(name='Correspondence')) GrantAgreementCommentCategory.objects.get_or_create(category=Category.objects.get(name='Deadline')) GrantAgreementAttachment.objects.all().delete() GrantAgreementAttachmentCategory.objects.all().delete() GrantAgreementAttachmentCategory.objects.get_or_create(category=Category.objects.get(name='Correspondence')) ProjectComment.objects.all().delete() ProjectCommentCategory.objects.all().delete() ProjectCommentCategory.objects.get_or_create(category=Category.objects.get(name='Correspondence')) ProjectCommentCategory.objects.get_or_create(category=Category.objects.get(name='Finance')) ProjectCommentCategory.objects.get_or_create(category=Category.objects.get(name='Outreach')) ProjectCommentCategory.objects.get_or_create(category=Category.objects.get(name='Milestones')) ProjectCommentCategory.objects.get_or_create(category=Category.objects.get(name='Reports')) ProjectAttachment.objects.all().delete() ProjectAttachmentsCategory.objects.all().delete() ProjectAttachmentsCategory.objects.get_or_create(category=Category.objects.get(name='Correspondence')) ProjectAttachmentsCategory.objects.get_or_create(category=Category.objects.get(name='Documentation')) ProposalAttachmentCategory.objects.get_or_create(category=Category.objects.get(name='Correspondence')) ProposalAttachmentCategory.objects.get_or_create(category=Category.objects.get(name='Documentation')) ProposalCommentCategory.objects.get_or_create(category=Category.objects.get(name='Budget')) ProposalCommentCategory.objects.get_or_create(category=Category.objects.get(name='Partners')) ProposalCommentCategory.objects.get_or_create(category=Category.objects.get(name='Correspondence')) ProposalCommentCategory.objects.get_or_create(category=Category.objects.get(name='Deadline')) ProposalEvaluationAttachmentCategory.objects.get_or_create(category=Category.objects.get(name='Correspondence')) ProposalEvaluationAttachmentCategory.objects.get_or_create(category=Category.objects.get(name='Evaluation')) ProposalEvaluationAttachmentCategory.objects.get_or_create(category=Category.objects.get(name='Documentation')) ProposalEvaluationCommentCategory.objects.get_or_create(category=Category.objects.get(name='Correspondence')) class Migration(migrations.Migration): dependencies = [ ('comments', '0032_fix_plurals'), ] operations = [ migrations.RunPython(add_categories), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,354
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/common/formset_inline_view.py
from django.contrib import messages from django.shortcuts import redirect, render from django.views.generic import TemplateView class InlineFormsetUpdateView(TemplateView): inline_formset = None human_type = None human_type_plural = None parent = None extra_content = None url_id = 'pk' template_name = 'grant_management/formset.tmpl' def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) if self.human_type_plural is None: self.human_type_plural = f'{self.human_type}s' def get_extra_context(self): context = {} context['title'] = self.human_type_plural.capitalize() context['human_type'] = self.human_type context['save_text'] = f'Save {self.human_type_plural.title()}' return context def get(self, request, *args, **kwargs): context = self.get_context_data(**kwargs) context.update(self.get_extra_context()) return render(request, self.template_name, context) def post(self, request, *args, **kwargs): context = self.get_context_data(**kwargs) context.update(self.get_extra_context()) form_kwargs = {} if hasattr(self.inline_formset, 'wants_user') and self.inline_formset.wants_user: form_kwargs = {'user': request.user} inline_formset_kwargs = {'prefix': 'FORM_SET', 'instance': context['project'], 'form_kwargs': form_kwargs} if hasattr(self.inline_formset, 'can_force_save') and self.inline_formset.can_force_save: inline_formset_kwargs['save_force'] = 'save_force' in request.POST forms = self.inline_formset(request.POST, request.FILES, **inline_formset_kwargs) if forms.is_valid(): forms.save() messages.success(request, f'{self.human_type_plural.capitalize()} saved') return redirect(context['destination_url']) messages.error(request, f'{self.human_type_plural.capitalize()} not saved. Verify errors in the form') if hasattr(forms, 'force_save_text'): context['force_save_text'] = forms.force_save_text() context['FORM_SET'] = forms return render(request, self.template_name, context)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,355
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/forms/budget.py
import decimal from crispy_forms.helper import FormHelper from django import forms from django.forms import BaseFormSet, formset_factory from project_core.fields import FlexibleDecimalField from project_core.forms.utils import PlainTextWidget from project_core.models import BudgetCategory, ProposedBudgetItem, BudgetCategoryCall from project_core.templatetags.thousands_separator import thousands_separator class BudgetItemForm(forms.Form): id = forms.IntegerField(widget=forms.HiddenInput(), required=False) category = forms.CharField(widget=PlainTextWidget()) details = forms.CharField(required=False, widget=forms.Textarea(attrs={'rows': 4})) amount = FlexibleDecimalField(required=False, label='Total (CHF)', widget=forms.TextInput(attrs={'size': '5'})) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.is_valid() if 'initial' in kwargs: category = kwargs['initial']['category'] else: category_id = self.cleaned_data['category'] category = BudgetCategory.objects.get(id=category_id) self.fields['category'].help_text = f'<strong>{category.name}</strong><br>{category.description}' self.fields['category'].value = category.id self.fields['amount'].widget.attrs['min'] = 0 self.helper = FormHelper(self) self.helper.form_tag = False self.helper.form_show_labels = False def save_budget(self, proposal): if self.cleaned_data['id']: budget_item = ProposedBudgetItem.objects.get(id=self.cleaned_data['id']) else: budget_item = ProposedBudgetItem() budget_item.amount = self.cleaned_data['amount'] budget_item.details = self.cleaned_data['details'] budget_item.category = BudgetCategory.objects.get(id=self.cleaned_data['category']) budget_item.proposal = proposal budget_item.save() def clean(self): cleaned_data = super().clean() category = BudgetCategory.objects.get(id=cleaned_data['category']) if 'amount' not in cleaned_data: self.add_error('amount', 'Please write a number (do not use thousands separator if you have a problem)') valid_amount = False amount = None else: valid_amount = True amount = cleaned_data['amount'] details = cleaned_data['details'] or '' if valid_amount: if amount is not None: if details == '' and amount > 0: self.add_error('details', 'Please fill in details for {}'.format(category)) elif amount < 0: self.add_error('amount', 'Cannot be negative {}'.format(category)) else: if details != '': self.add_error('amount', 'Please declare a budget amount for {}'.format(category)) return cleaned_data class BudgetFormSet(BaseFormSet): def __init__(self, *args, **kwargs): proposal = kwargs.pop('proposal', None) self._call = kwargs.pop('call', None) if proposal: initial_budget = [] for proposed_item_budget in ProposedBudgetItem.objects.filter(proposal=proposal): order = BudgetCategoryCall.objects.get(call=proposal.call, budget_category=proposed_item_budget.category).order initial_budget.append({'id': proposed_item_budget.id, 'category': proposed_item_budget.category, 'amount': proposed_item_budget.amount, 'details': proposed_item_budget.details, 'order': order}) initial_budget.sort(key=lambda budget: budget['order']) kwargs['initial'] = initial_budget super().__init__(*args, **kwargs) self.helper = FormHelper() self.helper.form_tag = False self.helper.form_show_labels = False def clean(self): super().clean() budget_amount = decimal.Decimal('0.00') maximum_budget = self._call.budget_maximum if not self.is_valid(): # if one of the budget items is not valid: doesn't validate the general form # E.g. if an amount is negative it will have an error in the amount but the # amount is removed from the form.cleaned_data return for budget_item_form in self.forms: amount = budget_item_form.cleaned_data['amount'] or 0 budget_amount += amount if budget_amount > maximum_budget: raise forms.ValidationError( 'Maximum allowed budget for this call is {} CHF. Your total proposed budget is {} CHF'.format( thousands_separator(maximum_budget), thousands_separator(budget_amount))) def save_budgets(self, proposal): for form in self.forms: form.save_budget(proposal) BudgetItemFormSet = formset_factory(BudgetItemForm, formset=BudgetFormSet, can_delete=False, extra=0) # It's used like: # budget_form = BudgetItemFormSet(proposal=proposal, prefix=BUDGET_FORM_NAME)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,356
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/utils/orcid.py
from crispy_forms.bootstrap import AppendedText from crispy_forms.layout import Div from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from django.utils.safestring import mark_safe def orcid_div(field_name): return Div( Div(AppendedText(field_name, mark_safe('<i class="fab fa-orcid" style="color:#a6ce39"></i>')), css_class='col-8'), css_class='row' ) def field_set_read_only(fields): # Only use this function if disabled=True cannot be used # (disabled=True makes Django not add the field in self.cleaned_data, # in ORCID iD context we want the read only fields in the self.cleaned_data at the moment for field in fields: field.widget.attrs.update({'readonly': 'readonly'}) def raise_error_if_orcid_invalid(orcid): if orcid == '0000-0002-1825-0097': raise ValidationError('0000-0002-1825-0097 is the example ORCID and cannot be used') def orcid_validators(): return [raise_error_if_orcid_invalid, RegexValidator(regex='^[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]$', message='Invalid format for ORCID iD. E.g.: 0000-0002-1825-0097.', code='Invalid format') ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,357
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/tests/views/logged/test_project.py
from django.test import TestCase from django.urls import reverse from project_core.tests import database_population class ProjectListTest(TestCase): def test_get(self): client = database_population.create_management_logged_client() database_population.create_project('TEST-2021-001', 'Test project') response = client.get(reverse('logged-project-list')) self.assertEqual(response.status_code, 200) self.assertContains(response, 'TEST-2021-001') self.assertContains(response, 'Test project')
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,358
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/forms/partners.py
from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div, Field from django import forms from django.db import transaction from django.forms import ModelForm, BaseInlineFormSet, inlineformset_factory from project_core.forms.utils import get_field_information, LabelAndOrderNameChoiceField from project_core.models import ProposalPartner, Proposal, PersonPosition, PhysicalPerson, PersonTitle, CareerStage, \ Role from variable_templates.utils import apply_templates_to_fields from .utils import organisations_name_autocomplete from ..utils.orcid import field_set_read_only, orcid_div from ..utils.utils import create_person_position class ProposalPartnerItemForm(ModelForm): id = forms.IntegerField(widget=forms.HiddenInput(), required=False) person__physical_person__orcid = forms.CharField( **get_field_information(PhysicalPerson, 'orcid', required=True, help_text='Enter the partner\'s ORCID iD (e.g. 0000-0002-1825-0097).<br>' 'Please ask the partner to create an <a href="https://orcid.org">ORCID iD</a> if they do not already have one'), label='ORCID iD') person__physical_person__first_name = forms.CharField( **get_field_information(PhysicalPerson, 'first_name', help_text=''), label='First name(s)') person__physical_person__surname = forms.CharField(**get_field_information(PhysicalPerson, 'surname', help_text=''), label='Surname(s)') person__academic_title = forms.ModelChoiceField(PersonTitle.objects.all().order_by('title'), label='Academic title') person__career_stage = forms.ModelChoiceField(CareerStage.objects.all().order_by('list_order'), label='Career stage') person__group = forms.CharField(**get_field_information(PersonPosition, 'group', label='Group / lab', help_text='Please type the names of the group(s) or laboratories to which the partner belongs for the purposes of this proposal')) def __init__(self, *args, **kwargs): call = kwargs.pop('call') super().__init__(*args, **kwargs) self.helper = FormHelper(self) self.helper.form_tag = False person__organisations_initial = None field_set_read_only( [self.fields['person__physical_person__first_name'], self.fields['person__physical_person__surname']]) if self.instance.pk: self.fields['id'] = self.instance.id self.fields['person__group'].initial = self.instance.person.group self.fields['person__career_stage'].initial = self.instance.person.career_stage self.fields['person__academic_title'].initial = self.instance.person.academic_title self.fields['person__physical_person__orcid'].initial = self.instance.person.person.orcid self.fields['person__physical_person__first_name'].initial = self.instance.person.person.first_name self.fields['person__physical_person__surname'].initial = self.instance.person.person.surname person__organisations_initial = self.instance.person.organisation_names.all() self.fields['person__organisations'] = organisations_name_autocomplete(initial=person__organisations_initial, help_text='Please select the organisation(s) to which the partner is affiliated for the purposes of this proposal.') apply_templates_to_fields(self.fields, call) self.helper.layout = Layout( orcid_div('person__physical_person__orcid'), Div( Div('id', hidden=True), Div(Field('DELETE'), hidden=True), Div('person__physical_person__first_name', css_class='col-4'), Div('person__physical_person__surname', css_class='col-4'), Div('person__academic_title', css_class='col-2'), Div('person__career_stage', css_class='col-2'), css_class='row' ), Div( Div('person__organisations', css_class='col-12'), css_class='row' ), Div( Div('person__group', css_class='col-12'), css_class='row' ), Div( Div('role', css_class='col-12'), css_class='row' ), Div( Div('role_description', css_class='col-12'), css_class='row' ), Div( Div('competences', css_class='col-12'), css_class='row' ) ) def save_partner(self, proposal): cd = self.cleaned_data person_position = create_person_position(cd['person__physical_person__orcid'], cd['person__physical_person__first_name'], cd['person__physical_person__surname'], academic_title=cd['person__academic_title'], group=cd['person__group'], career_stage=cd['person__career_stage'], organisation_names=cd['person__organisations']) proposal_partner, created = ProposalPartner.objects.get_or_create(person=person_position, role=cd['role'], role_description=cd['role_description'], competences=cd['competences'], proposal=proposal) return proposal_partner class Meta: model = ProposalPartner fields = ['role_description', 'competences', 'role', ] field_classes = {'role': LabelAndOrderNameChoiceField} help_texts = {'role': 'Select the role of the partner in the proposed {{ activity }}'} class ProposalPartnersFormSet(BaseInlineFormSet): def __init__(self, *args, **kwargs): self._applicant_role_description_form = kwargs.pop('applicant_role_description_form', None) self._applicant_person_form = kwargs.pop('person_form', None) super().__init__(*args, **kwargs) self.helper = FormHelper() self.helper.form_tag = False self.helper.form_id = 'proposal_partners_form' def clean(self): super().clean() if not hasattr(self, 'cleaned_data'): return orcids = set() principal_investigators_count = 0 co_principal_investigators_count = 0 principal_investigator = Role.objects.get(name='Principal Investigator') co_principal_investigator = Role.objects.get(name='Co-Principal Investigator') applicant_orcid = None if self._applicant_role_description_form.is_valid(): applicant_role = self._applicant_role_description_form.cleaned_data['role'] if applicant_role == principal_investigator: principal_investigators_count += 1 elif applicant_role == co_principal_investigator: co_principal_investigators_count += 1 if self._applicant_person_form.is_valid(): applicant_orcid = self._applicant_person_form.cleaned_data['orcid'] for form_data in self.cleaned_data: if not form_data or form_data['DELETE']: continue partner_orcid = form_data['person__physical_person__orcid'] if partner_orcid in orcids: raise forms.ValidationError( 'A proposal partner has been entered more than once. Use the remove button to delete the duplicated partner.') if applicant_orcid is not None and partner_orcid == applicant_orcid: raise forms.ValidationError( 'A proposal partner has the same ORCID iD as the applicant. Please do not include the applicant as a partner.' ) partner_role = form_data['role'] if partner_role == principal_investigator: principal_investigators_count += 1 elif partner_role == co_principal_investigator: co_principal_investigators_count += 1 orcids.add(partner_orcid) if principal_investigators_count > 1: raise forms.ValidationError( 'Only one person can be a Principal Investigator. If two or more people are sharing this role please enter them as Co-Principal Investigators.' ) if principal_investigators_count == 0 and co_principal_investigators_count < 2: raise forms.ValidationError( 'Please make sure that there is at least one Principal Investigator or at least two Co-Principal Investigators.' ) @staticmethod def _delete_proposal_partner(proposal_partner): if proposal_partner is None: return proposal_partner.delete() def save_partners(self, proposal): with transaction.atomic(): for form in self.forms: if form.cleaned_data: if form.cleaned_data['DELETE'] and form.cleaned_data['id']: ProposalPartnersFormSet._delete_proposal_partner(form.cleaned_data['id']) elif form.cleaned_data['DELETE'] is False: previous_proposal_partner = form.cleaned_data['id'].id if form.cleaned_data['id'] else None new_proposal_partner = form.save_partner(proposal) if previous_proposal_partner != new_proposal_partner.id: ProposalPartnersFormSet._delete_proposal_partner(form.cleaned_data['id']) ProposalPartnersInlineFormSet = inlineformset_factory( Proposal, ProposalPartner, form=ProposalPartnerItemForm, formset=ProposalPartnersFormSet, extra=1, can_delete=True)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,359
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0156_proposal_add_field_request_overall_budget.py
# Generated by Django 3.1.4 on 2021-01-06 15:13 import django.core.validators from django.db import migrations, models import project_core.models import project_core.utils.SpiS3Boto3Storage import project_core.utils.utils class Migration(migrations.Migration): dependencies = [ ('project_core', '0155_unique_indices_call_part_file'), ] operations = [ migrations.AddField( model_name='call', name='request_overall_budget', field=models.BooleanField(default=False, help_text='True to add the question "Requested overall budget". Useful to request a bulk number instead of the budget breakdown. Budget breakdown is displayed/hidden depending on the categories checked in its section'), ), migrations.AddField( model_name='historicalcall', name='request_overall_budget', field=models.BooleanField(default=False, help_text='True to add the question "Requested overall budget". Useful to request a bulk number instead of the budget breakdown. Budget breakdown is displayed/hidden depending on the categories checked in its section'), ), migrations.AlterField( model_name='callpartfile', name='file', field=models.FileField(storage=project_core.utils.SpiS3Boto3Storage.SpiS3Boto3Storage(), upload_to=project_core.models.call_part_file_rename, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['pdf', 'docx', 'jpg', 'jpeg', 'png']), project_core.utils.utils.file_size_validator]), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,360
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/common/proposal.py
import logging import mimetypes import os import re from botocore.exceptions import EndpointConnectionError from django.contrib import messages from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from django.http import HttpResponse from django.http import HttpResponseForbidden from django.shortcuts import render, redirect from django.urls import reverse from django.utils import timezone from django.views import View from django.views.generic import TemplateView from ProjectApplication import settings from comments.utils import comments_attachments_forms from evaluation.models import CallEvaluation from project_core.forms.applicant_role import RoleDescriptionForm from project_core.forms.budget import BudgetItemFormSet from project_core.forms.datacollection import DataCollectionForm from project_core.forms.funding import ProposalFundingItemFormSet from project_core.forms.partners import ProposalPartnersInlineFormSet from project_core.forms.person import PersonForm from project_core.forms.postal_address import PostalAddressForm from project_core.forms.project_overarching import ProjectOverarchingForm from project_core.forms.proposal import ProposalForm from project_core.forms.scientific_clusters import ScientificClustersInlineFormSet from project_core.models import Proposal, ProposalQAText, Call, ProposalStatus, ProposalQAFile, CallCareerStage from project_core.views.common.proposal_parts import ProposalParts from variable_templates.utils import get_template_value_for_call, apply_templates_to_string PROPOSAL_FORM_NAME = 'proposal_form' PERSON_FORM_NAME = 'person_form' POSTAL_ADDRESS_FORM_NAME = 'postal_address_form' QUESTIONS_FORM_NAME = 'questions_form' BUDGET_FORM_NAME = 'budget_form' FUNDING_FORM_NAME = 'funding_form' DATA_COLLECTION_FORM_NAME = 'data_collection_form' PROPOSAL_PARTNERS_FORM_NAME = 'proposal_partners_form' APPLICANT_ROLE_DESCRIPTION_FORM_NAME = 'applicant_role_description_form' PROPOSAL_PROJECT_OVERARCHING_FORM_NAME = 'project_overarching_form' SCIENTIFIC_CLUSTERS_FORM_NAME = 'scientific_clusters_form' logger = logging.getLogger('comments') def _prepare_answers(call_questions, proposal): questions_answers = [] for call_question in call_questions: try: answer = ProposalQAText.objects.get(proposal=proposal, call_question=call_question) except ObjectDoesNotExist: answer = None questions_answers.append(answer) return questions_answers def get_parts_with_answers(proposal): parts = [] for part in proposal.call.parts(): questions_answers_text = _prepare_answers(part.questions_type_text(), proposal) questions_answers_file = _prepare_answers(part.questions_type_files(), proposal) parts.append({'title': apply_templates_to_string(part.title, proposal.call), 'introductory_text': apply_templates_to_string(part.introductory_text, proposal.call), 'heading_number': part.heading_number, 'questions_type_text': questions_answers_text, 'questions_type_file': questions_answers_file, 'div_id': part.div_id() }) return parts class AbstractProposalDetailView(TemplateView): template = '' def prepare_context(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) if 'uuid' in kwargs: # Public requests are based on 'uuid' proposal = Proposal.objects.get(uuid=kwargs['uuid']) elif 'pk' in kwargs: # Logged requests (for the comments specially) are based on 'id' proposal = Proposal.objects.get(id=kwargs['pk']) else: assert False call = proposal.call context.update(call_context_for_template(call)) context['proposal'] = proposal context['part_numbers'] = call.get_part_numbers_for_call() context['parts_with_answers'] = ProposalParts(request.POST, request.FILES, proposal, call).get_parts() if request.user.groups.filter(name='logged').exists(): href = description = None if proposal.status_is_draft(): href = reverse('proposal-update', kwargs={'uuid': proposal.uuid}) description = 'Link to draft proposal' elif proposal.status_is_submitted(): href = reverse('proposal-detail', kwargs={'uuid': proposal.uuid}) description = 'Link to view proposal' if href and description: context[ 'link_to_edit_or_display'] = f'(<a href="{href}"><i class="fas fa-link"></i> {description}</a>)' context.update(comments_attachments_forms('logged-proposal-comment-add', proposal)) update_files_enabled = not CallEvaluation.objects.filter(call=proposal.call).exists() context['update_files_enabled'] = update_files_enabled if update_files_enabled is False: context[ 'reason_update_files_disabled'] = 'Files cannot be changed because the evaluation has already started' return context def get(self, request, *args, **kwargs): context = self.prepare_context(request, *args, **kwargs) return render(request, self.template, context) def action_is_save_draft(post_vars): return 'save_draft' in post_vars def action_is_submit(post_vars): return 'submit' in post_vars def action_is_save(post_vars): return 'save_changes' in post_vars def get_number(string): # If string is a number: returns the number (as int) # If string is not a number but starts as a number: returns the number until the non-number part # If string does not start as a number: returns None # Examples: '2424' return 2424 # '13[0]' returns 13 m = re.match('^([0-9]+)', string) if m: return int(m[1]) return None class AbstractProposalView(TemplateView): # TODO: Refactor this class and break up in parts # This is the longer, worse class in this project created_or_updated_url = '' form_template = '' action_url_add = '' action_url_update = '' success_message = '' extra_context = {} def get(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) context.update(self.extra_context) if 'uuid' in kwargs: proposal_uuid = kwargs['uuid'] proposal: Proposal = Proposal.objects.get(uuid=proposal_uuid) call = proposal.call proposal_form = ProposalForm(call=call, prefix=PROPOSAL_FORM_NAME, instance=proposal) person_form = PersonForm(prefix=PERSON_FORM_NAME, person_position=proposal.applicant, career_stages_queryset=call.enabled_career_stages_queryset()) postal_address_form = PostalAddressForm(prefix=POSTAL_ADDRESS_FORM_NAME, instance=proposal.postal_address) scientific_clusters_form = ScientificClustersInlineFormSet(prefix=SCIENTIFIC_CLUSTERS_FORM_NAME, instance=proposal) budget_form = BudgetItemFormSet(proposal=proposal, prefix=BUDGET_FORM_NAME) funding_form = ProposalFundingItemFormSet(prefix=FUNDING_FORM_NAME, instance=proposal) applicant_role_description_form = RoleDescriptionForm(prefix=APPLICANT_ROLE_DESCRIPTION_FORM_NAME, instance=proposal.applicant_role_description, call=call) proposal_partners_form = ProposalPartnersInlineFormSet(prefix=PROPOSAL_PARTNERS_FORM_NAME, instance=proposal, form_kwargs={'call': call}) data_collection_form = DataCollectionForm(prefix=DATA_COLLECTION_FORM_NAME, person_position=proposal.applicant) overarching_form = ProjectOverarchingForm(prefix=PROPOSAL_PROJECT_OVERARCHING_FORM_NAME, instance=proposal.overarching_project) context['proposal_action_url'] = reverse(self.action_url_update, kwargs={'uuid': proposal.uuid}) context['action'] = 'Edit' context['proposal_status_is_draft'] = proposal.status_is_draft() context['extra_parts'] = ProposalParts(None, None, proposal).get_parts() else: if request.GET.get('call', None) is None: logger.warning( f'NOTIFY: User tried to access to {request.build_absolute_uri()}: call parameter is missing') return redirect(reverse('call-list')) call_pk = context['call_pk'] = get_number(request.GET.get('call')) if call_pk is None: logger.warning( f'NOTIFY: User tried to access to {request.build_absolute_uri()}: call expected to be a number') messages.warning(request, 'This call does not exist. Please see the list of open calls below') return redirect(reverse('call-list')) try: call = Call.objects.get(pk=call_pk) except ObjectDoesNotExist: logger.warning( f'NOTIFY: User tried to access to {request.build_absolute_uri()}: call does not exist') messages.warning(request, 'This call does not exist. Please see the list of open calls below') return redirect(reverse('call-list')) proposal_form = ProposalForm(call=call, prefix=PROPOSAL_FORM_NAME) person_form = PersonForm(prefix=PERSON_FORM_NAME, only_basic_fields=False, career_stages_queryset=call.enabled_career_stages_queryset()) postal_address_form = PostalAddressForm(prefix=POSTAL_ADDRESS_FORM_NAME) scientific_clusters_form = ScientificClustersInlineFormSet(prefix=SCIENTIFIC_CLUSTERS_FORM_NAME) initial_budget = [] for budget_category in call.budgetcategorycall_set.filter(enabled=True).order_by('order', 'budget_category__name'): initial_budget.append({'category': budget_category.budget_category, 'amount': None, 'details': None}) budget_form = BudgetItemFormSet(call=call, prefix=BUDGET_FORM_NAME, initial=initial_budget) funding_form = ProposalFundingItemFormSet(prefix=FUNDING_FORM_NAME) applicant_role_description_form = RoleDescriptionForm(prefix=APPLICANT_ROLE_DESCRIPTION_FORM_NAME, call=call) proposal_partners_form = ProposalPartnersInlineFormSet(prefix=PROPOSAL_PARTNERS_FORM_NAME, form_kwargs={'call': call}) overarching_form = ProjectOverarchingForm(prefix=PROPOSAL_PROJECT_OVERARCHING_FORM_NAME) data_collection_form = DataCollectionForm(prefix=DATA_COLLECTION_FORM_NAME) if getattr(self, 'preview', False): context['proposal_action_url'] = None context['preview'] = True else: context['proposal_action_url'] = f'{reverse(self.action_url_add)}?call={call.id}' context['action'] = 'New' context['extra_parts'] = ProposalParts(None, None, proposal=None, call=call).get_parts() context.update(call_context_for_template(call)) context[PROPOSAL_FORM_NAME] = proposal_form context[POSTAL_ADDRESS_FORM_NAME] = postal_address_form context[PERSON_FORM_NAME] = person_form context[SCIENTIFIC_CLUSTERS_FORM_NAME] = scientific_clusters_form context[BUDGET_FORM_NAME] = budget_form context[FUNDING_FORM_NAME] = funding_form context[APPLICANT_ROLE_DESCRIPTION_FORM_NAME] = applicant_role_description_form context[PROPOSAL_PARTNERS_FORM_NAME] = proposal_partners_form context[DATA_COLLECTION_FORM_NAME] = data_collection_form context[PROPOSAL_PROJECT_OVERARCHING_FORM_NAME] = overarching_form context['part_numbers'] = call.get_part_numbers_for_call() context['activity'] = get_template_value_for_call('activity', call) if timezone.now() > call.submission_deadline: messages.error(request, 'New proposals for this call cannot be accepted because the submission deadline has now passed.') return render(request, self.form_template, context) @transaction.atomic def post(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) # Optional form, depending on call.other_funding_question funding_form = applicant_role_description_form = proposal_partners_form = None proposal_project_overarching_form = scientific_clusters_form = budget_form = None if 'uuid' in kwargs: # Editing an existing proposal proposal_uuid = kwargs['uuid'] proposal = Proposal.objects.get(uuid=proposal_uuid) call = proposal.call if not request.user.groups.filter(name='management').exists(): proposal_status = proposal.proposal_status proposal_status_draft = ProposalStatus.objects.get(name='Draft') if timezone.now() > call.submission_deadline: if action_is_submit(request.POST) and proposal_status == proposal_status_draft: messages.error(request, 'The submission deadline has now passed. Your proposal cannot be submitted.') elif action_is_submit(request.POST) and proposal_status != proposal_status_draft: messages.error(request, 'The submission deadline has now passed. Your submitted proposal can no longer be modified.') else: # The user pressed 'Save Draft' messages.error(request, 'The submission deadline has now passed. You cannot modify this proposal.') return redirect(reverse('proposal-cannot-modify')) if proposal_status != proposal_status_draft: # This is a user trying to modify a submitted proposal messages.error(request, 'Your proposal has already been submitted. It can no longer be edited.') return redirect(reverse('proposal-cannot-modify')) else: # New proposal call = Call.objects.get(id=int(self.request.GET['call'])) career_stages = CallCareerStage.objects.filter(call=call) if timezone.now() > call.submission_deadline: messages.error(request, 'The submission deadline has now passed. Your proposal can no longer be submitted.') return redirect(reverse('proposal-cannot-modify')) proposal = None if proposal: # Editing an existing proposal proposal_form = ProposalForm(request.POST, instance=proposal, prefix=PROPOSAL_FORM_NAME) person_form = PersonForm(request.POST, person_position=proposal.applicant, prefix=PERSON_FORM_NAME, career_stages_queryset=call.enabled_career_stages_queryset()) postal_address_form = PostalAddressForm(request.POST, instance=proposal.postal_address, prefix=POSTAL_ADDRESS_FORM_NAME) proposal_parts = ProposalParts(request.POST, request.FILES, proposal) if call.budget_requested_part(): budget_form = BudgetItemFormSet(request.POST, call=call, proposal=proposal, prefix=BUDGET_FORM_NAME) if call.other_funding_question: funding_form = ProposalFundingItemFormSet(request.POST, prefix=FUNDING_FORM_NAME, instance=proposal) if call.proposal_partner_question: applicant_role_description_form = RoleDescriptionForm(request.POST, prefix=APPLICANT_ROLE_DESCRIPTION_FORM_NAME, instance=proposal.applicant_role_description, call=call) proposal_partners_form = ProposalPartnersInlineFormSet(request.POST, prefix=PROPOSAL_PARTNERS_FORM_NAME, instance=proposal, applicant_role_description_form=applicant_role_description_form, person_form=person_form, form_kwargs={ 'call': proposal.call}) # TODO exclude the values if call.overarching_project_question: proposal_project_overarching_form = ProjectOverarchingForm(request.POST, prefix=PROPOSAL_PROJECT_OVERARCHING_FORM_NAME, instance=proposal.overarching_project) if call.scientific_clusters_question: scientific_clusters_form = ScientificClustersInlineFormSet(request.POST, instance=proposal, prefix=SCIENTIFIC_CLUSTERS_FORM_NAME) data_collection_form = DataCollectionForm(request.POST, prefix=DATA_COLLECTION_FORM_NAME, person_position=proposal.applicant) else: # Creating a new proposal proposal_form = ProposalForm(request.POST, call=call, prefix=PROPOSAL_FORM_NAME) postal_address_form = PostalAddressForm(request.POST, prefix=POSTAL_ADDRESS_FORM_NAME) proposal_parts = ProposalParts(request.POST, request.FILES, proposal=None, call=call) person_form = PersonForm(request.POST, prefix=PERSON_FORM_NAME, career_stages_queryset=call.enabled_career_stages_queryset()) if call.budget_requested_part(): budget_form = BudgetItemFormSet(request.POST, call=call, prefix=BUDGET_FORM_NAME) if call.other_funding_question: funding_form = ProposalFundingItemFormSet(request.POST, prefix=FUNDING_FORM_NAME) if call.proposal_partner_question: applicant_role_description_form = RoleDescriptionForm(request.POST, prefix=APPLICANT_ROLE_DESCRIPTION_FORM_NAME, call=call) proposal_partners_form = ProposalPartnersInlineFormSet(request.POST, prefix=PROPOSAL_PARTNERS_FORM_NAME, applicant_role_description_form=applicant_role_description_form, person_form=person_form, form_kwargs={'call': call}) if call.overarching_project_question: proposal_project_overarching_form = ProjectOverarchingForm(request.POST, prefix=PROPOSAL_PROJECT_OVERARCHING_FORM_NAME) if call.scientific_clusters_question: scientific_clusters_form = ScientificClustersInlineFormSet(request.POST, prefix=SCIENTIFIC_CLUSTERS_FORM_NAME) data_collection_form = DataCollectionForm(request.POST, prefix=DATA_COLLECTION_FORM_NAME) forms_to_validate = [person_form, postal_address_form, proposal_form, *proposal_parts.get_forms(), data_collection_form] if call.other_funding_question: forms_to_validate.append(funding_form) if call.proposal_partner_question: forms_to_validate.append(applicant_role_description_form) forms_to_validate.append(proposal_partners_form) if call.overarching_project_question: forms_to_validate.append(proposal_project_overarching_form) if call.scientific_clusters_question: forms_to_validate.append(scientific_clusters_form) if call.budget_requested_part(): forms_to_validate.append(budget_form) all_valid = True for form in forms_to_validate: is_valid = form.is_valid() all_valid = all_valid and is_valid all_valid = all_valid and self._validate_project_title_applicant(proposal_form, person_form) if all_valid: proposal = proposal_form.save(commit=False) applicant = person_form.save_person() data_collection_form.update(applicant) proposal.applicant = applicant proposal_is_draft_or_submitted = False if action_is_save_draft(request.POST): proposal.proposal_status = ProposalStatus.objects.get(name='Draft') proposal_is_draft_or_submitted = True elif action_is_submit(request.POST): proposal.proposal_status = ProposalStatus.objects.get(name='Submitted') proposal_is_draft_or_submitted = True elif action_is_save(request.POST): pass else: assert False if not proposal_is_draft_or_submitted and not request.user.groups.filter( name=settings.MANAGEMENT_GROUP_NAME).exists(): return HttpResponseForbidden('Insufficient permissions to save the proposal with the selected status') if call.overarching_project_question: project_overarching = proposal_project_overarching_form.save() proposal.overarching_project = project_overarching postal_address = postal_address_form.save() proposal.postal_address = postal_address proposal.save() proposal_form.save(commit=True) if call.other_funding_question: funding_form.save_fundings(proposal) for question_form in proposal_parts.get_forms(): if not question_form.save_answers(proposal): messages.error(request, 'File attachments could not be saved - please try attaching the files again or contact SPI if this error reoccurs') if call.budget_requested_part(): budget_form.save_budgets(proposal) if call.proposal_partner_question: proposal.applicant_role_description = applicant_role_description_form.save() proposal.save() proposal_partners_form.save_partners(proposal) if call.scientific_clusters_question: scientific_clusters_form = ScientificClustersInlineFormSet(request.POST, instance=proposal, prefix=SCIENTIFIC_CLUSTERS_FORM_NAME) scientific_clusters_form.save() messages.success(request, self.success_message) return redirect( reverse(self.created_or_updated_url, kwargs={'uuid': proposal.uuid}) ) context[PERSON_FORM_NAME] = person_form context[POSTAL_ADDRESS_FORM_NAME] = postal_address_form context[PROPOSAL_FORM_NAME] = proposal_form for question_form in proposal_parts.get_forms(): context[question_form.prefix] = question_form if call.other_funding_question: context[FUNDING_FORM_NAME] = funding_form if call.proposal_partner_question: context[APPLICANT_ROLE_DESCRIPTION_FORM_NAME] = applicant_role_description_form context[PROPOSAL_PARTNERS_FORM_NAME] = proposal_partners_form if call.overarching_project_question: context[PROPOSAL_PROJECT_OVERARCHING_FORM_NAME] = proposal_project_overarching_form if call.scientific_clusters_question: context[SCIENTIFIC_CLUSTERS_FORM_NAME] = scientific_clusters_form if call.budget_requested_part(): context[BUDGET_FORM_NAME] = budget_form context[DATA_COLLECTION_FORM_NAME] = data_collection_form context['activity'] = get_template_value_for_call('activity', call) context['action'] = 'Edit' context['part_numbers'] = call.get_part_numbers_for_call() context['extra_parts'] = proposal_parts.get_parts() context.update(call_context_for_template(call)) messages.error(request, 'Proposal not saved. Please correct the errors in the form and try again.') return render(request, 'common/form-proposal.tmpl', context) def _validate_project_title_applicant(self, proposal_form, person_form): proposal_title = proposal_form.cleaned_data['title'] call_id = proposal_form.cleaned_data['call_id'] for person_position in person_form.get_person_positions(): proposals = Proposal.objects.filter(title=proposal_title, applicant=person_position, call_id=call_id).exclude(id=proposal_form.instance.id) if len(proposals) > 0: proposal_form.raise_duplicated_title() return False return True def call_context_for_template(call): context = {'maximum_budget': call.budget_maximum, 'call_name': call.long_name, 'call_introductory_message': call.introductory_message, 'call_submission_deadline': call.submission_deadline, 'other_funding_question': call.other_funding_question, 'overarching_project_question': call.overarching_project_question, 'scientific_clusters_question': call.scientific_clusters_question, 'proposal_partner_question': call.proposal_partner_question, 'budget_part': call.budget_requested_part() } return context class ProposalQuestionAnswerFileView(View): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get(self, request, *args, **kwargs): question_answer = ProposalQAFile.objects.get(id=kwargs['proposal_qa_file_id'], md5=kwargs['md5']) filename, file_extension = os.path.splitext(question_answer.file.name) content_type = mimetypes.types_map.get(file_extension.lower(), 'application/octet-stream') try: response = HttpResponse( question_answer.file.file.file, content_type=content_type ) response['Content-Disposition'] = 'attachment; filename=%s' % os.path.basename(question_answer.file.name) except EndpointConnectionError: response = HttpResponse(content='Error: cannot connect to S3', content_type='text/plain') return response
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,361
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0104_delete_colour.py
# Generated by Django 2.2.6 on 2020-02-13 10:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('comments', '0017_uses_model_from_colour_application'), ('project_core', '0103_colours_are_7_chars'), ] operations = [ migrations.DeleteModel( name='Colour', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,362
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/forms/call_question.py
from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div, Submit, HTML from django import forms from django.contrib.admin.widgets import FilteredSelectMultiple from django.db.models import Max from django.urls import reverse from project_core.forms.utils import cancel_edit_button from project_core.models import CallQuestion, CallPart, TemplateQuestion class CallQuestionForm(forms.ModelForm): def __init__(self, *args, **kwargs): self._call_part_pk = kwargs.pop('call_part_pk', None) super().__init__(*args, **kwargs) assert self.instance.pk, 'Needs to exist - they are created adding template questions' self.helper = FormHelper(self) cancel_edit_url = reverse('logged-call-part-question-detail', kwargs={'call_pk': self.instance.call_part.call.pk, 'call_question_pk': self.instance.pk }) call = self.instance.call_part.call self.fields['call_part'].queryset = CallPart.objects.filter(call=call).order_by('order') self.helper.layout = Layout( Div( Div('order', css_class='col-6'), css_class='row' ), Div( Div('call_part', css_class='col-12'), css_class='row' ), Div( Div('question_text', css_class='col-12'), css_class='row' ), Div( Div('question_description', css_class='col-12'), css_class='row' ), Div( Div('answer_max_length', css_class='col-12'), css_class='row' ), Div( Div('answer_required', css_class='col-12'), css_class='row' ), FormActions( Submit('save', 'Save Call Question'), cancel_edit_button(cancel_edit_url) ) ) class Meta: model = CallQuestion fields = ['call_part', 'question_text', 'question_description', 'order', 'answer_required', 'answer_max_length'] widgets = {'question_text': forms.TextInput} class CallQuestionFromTemplateQuestionForm(forms.Form): def __init__(self, *args, **kwargs): call_part_pk = kwargs.pop('call_part_pk') super().__init__(*args, **kwargs) self._call_part = CallPart.objects.get(pk=call_part_pk) used_templates = [] for call_question in self._call_part.callquestion_set.all(): used_templates.append(call_question.template_question) create_template_question_url = reverse('logged-template-question-add') self.fields['template_questions'] = forms.ModelMultipleChoiceField(initial=used_templates, label='', queryset=TemplateQuestion.objects.all(), required=False, widget=FilteredSelectMultiple( is_stacked=True, verbose_name='questions', )) template_questions_label = f'Template questions <div class="pr-3 float-right"><a target="_blank" href="{create_template_question_url}">Create template question <i class="fas fa-external-link-alt"></i></a></div>' cancel_edit_url = reverse('logged-call-update', kwargs={'pk': self._call_part.call.pk}) cancel_edit_url += "#parts" self.helper = FormHelper(self) self.helper.layout = Layout( Div(Div(HTML(template_questions_label), css_class='col-4'), css_class='row'), Div( Div('template_questions', css_class='col-6'), css_class='row' ), FormActions( Submit('save', 'Save Template Questions'), cancel_edit_button(cancel_edit_url) ) ) def save(self): template_questions_wanted = [] for template_question in self.cleaned_data['template_questions']: call_question = CallQuestion.from_template(template_question) template_questions_wanted.append(template_question.id) if self._call_part.callquestion_set.filter(template_question=template_question).exists(): # This question was already added continue call_question.call_part = self._call_part last_order = CallQuestion.objects.filter(call_part=self._call_part).aggregate(Max('order'))['order__max'] last_order = last_order + 1 if last_order else 1 call_question.order = last_order + 1 call_question.save() for call_question in self._call_part.callquestion_set.all(): if call_question.template_question.id not in template_questions_wanted: call_question.delete()
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,363
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/comments/migrations/0021_callevaluationcomment_callevaluationcommentcategory.py
# Generated by Django 3.0.3 on 2020-03-04 14:57 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('evaluation', '0010_file_name_processed_on_save'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('comments', '0020_proposalevaluationattachment_proposalevaluationattachmentcategory_proposalevaluationcomment_proposal'), ] operations = [ migrations.CreateModel( name='CallEvaluationCommentCategory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('category', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='comments.Category')), ], options={ 'verbose_name_plural': 'Call Evaluation Comment Categories', }, ), migrations.CreateModel( name='CallEvaluationComment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('text', models.TextField(help_text='Comment text')), ('call_evaluation', models.ForeignKey(help_text='Type of comment', on_delete=django.db.models.deletion.PROTECT, to='comments.CallEvaluationCommentCategory')), ('created_by', models.ForeignKey(blank=True, help_text='User by which the entry was created', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='comments_callevaluationcomment_created_by_related', to=settings.AUTH_USER_MODEL)), ('proposal_evaluation', models.ForeignKey(help_text='Call Evaluation about which the comment was made', on_delete=django.db.models.deletion.PROTECT, to='evaluation.ProposalEvaluation')), ], options={ 'unique_together': {('call_evaluation', 'created_on', 'created_by')}, }, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,364
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0010_callquestion_question_description.py
# Generated by Django 2.2.4 on 2019-09-27 07:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0009_budgetdetails_blank'), ] operations = [ migrations.AddField( model_name='callquestion', name='question_description', field=models.TextField(blank=True, null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,365
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/tests/views/logged/test_template_question.py
from django.test import TestCase from django.urls import reverse from project_core.tests import database_population class TemplateQuestionTest(TestCase): def setUp(self): self._user = database_population.create_management_user() self._question1, self._question2 = database_population.create_template_questions() self._client_management = database_population.create_management_logged_client() def test_load_template_question_add(self): response = self._client_management.get(reverse('logged-template-question-add')) self.assertEqual(response.status_code, 200) def test_load_template_question_update(self): response = self._client_management.get(reverse('logged-template-question-update', kwargs={'pk': self._question1.id})) self.assertEqual(response.status_code, 200) self.assertContains(response, self._question1.question_description) def test_load_template_question_detail(self): response = self._client_management.get(reverse('logged-template-question-detail', kwargs={'pk': self._question1.id})) self.assertEqual(response.status_code, 200) self.assertContains(response, self._question1.question_description)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,366
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0066_auto_20220629_1301.py
# Generated by Django 3.2.13 on 2022-06-29 11:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0177_add_on_webite_field'), ('grant_management', '0065_coinvestors_project'), ] operations = [ migrations.RenameField( model_name='coinvestors', old_name='co_investor', new_name='co_investigator', ), migrations.AlterField( model_name='coinvestors', name='project', field=models.ForeignKey(help_text='Project to which the publication is related', on_delete=django.db.models.deletion.PROTECT, related_name='project_person', to='project_core.project'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,367
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/tests/forms/test_fieldnotes.py
from django.test import TestCase from grant_management.forms.fieldnotes import FieldNoteModelForm from grant_management.models import FieldNote from project_core.tests import database_population class FieldNoteModelFormTest(TestCase): def setUp(self): self._project = database_population.create_project() def test_fieldnote_valid(self): data = {'project': self._project, 'url': 'https://test.org/something', 'title': 'A very interesting fieldnote', } self.assertEqual(FieldNote.objects.all().count(), 0) fieldnote_form = FieldNoteModelForm(data=data) self.assertTrue(fieldnote_form.is_valid()) fieldnote_form.save() self.assertEqual(FieldNote.objects.all().count(), 1)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,368
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/logged/call_part.py
from django.contrib import messages from django.core.exceptions import ObjectDoesNotExist from django.db.models import ProtectedError from django.shortcuts import redirect from django.urls import reverse from django.utils.safestring import mark_safe from django.views import View from django.views.generic import CreateView, UpdateView, DeleteView, ListView from project_core.forms.call_part import CallPartForm from project_core.models import CallPart, Call def call_part_section(call): return reverse('logged-call-detail', kwargs={'pk': call.pk}) + '#parts' class CallPartList(ListView): model = CallPart template_name = 'logged/call_part-list.tmpl' def get_queryset(self): return CallPart.objects.filter(call_id=self.kwargs['call_pk']) def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) call = Call.objects.get(pk=self.kwargs['call_pk']) context['call'] = call context.update({'active_section': 'calls', 'active_subsection': 'call-list', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) context['breadcrumb'] = [{'name': 'Calls', 'url': reverse('logged-call-list')}, {'name': f'Details ({call.short_name})', 'url': call_part_section(call)}, {'name': 'List Call Parts'} ] return context class CallPartDetail(DeleteView): template_name = 'logged/call_part-detail.tmpl' model = CallPart pk_url_kwarg = 'call_part_pk' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) call = self.object.call context.update({'active_section': 'calls', 'active_subsection': 'call-list', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) context['call'] = call context.update({'active_section': 'calls', 'active_subsection': 'call-list', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) context['breadcrumb'] = [{'name': 'Calls', 'url': reverse('logged-call-list')}, {'name': f'Details ({call.short_name})', 'url': call_part_section(call)}, {'name': 'List Call Parts', 'url': reverse('logged-call-part-list', kwargs={'call_pk': call.pk})}, {'name': f'Call Part ({self.object.title_rendered()})'} ] return context class CallPartCreate(CreateView): form_class = CallPartForm template_name = 'logged/call_part-form.tmpl' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) call = Call.objects.get(pk=self.kwargs['call_pk']) context['call'] = call context['action'] = 'Create' context.update({'active_section': 'calls', 'active_subsection': 'call-list', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) context['breadcrumb'] = [{'name': 'Calls', 'url': reverse('logged-call-list')}, {'name': f'Details ({call.short_name})', 'url': call_part_section(call) }, {'name': 'List Call Parts', 'url': reverse('logged-call-part-list', kwargs={'call_pk': call.pk})}, {'name': f'New Call Part'} ] return context def get_form_kwargs(self): form_kwargs = super().get_form_kwargs() form_kwargs['call_pk'] = self.kwargs['call_pk'] return form_kwargs def get_success_url(self): return reverse('logged-call-part-detail', kwargs={'call_pk': self.kwargs['call_pk'], 'call_part_pk': self.object.pk}) class CallPartUpdate(UpdateView): model = CallPart form_class = CallPartForm template_name = 'logged/call_part-form.tmpl' pk_url_kwarg = 'call_part_pk' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) call = Call.objects.get(pk=self.kwargs['call_pk']) context['call'] = call context['action'] = 'Edit' context.update({'active_section': 'calls', 'active_subsection': 'call-list', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) context['breadcrumb'] = [{'name': 'Calls', 'url': reverse('logged-call-list')}, {'name': f'Details ({call.short_name})', 'url': call_part_section(call)}, {'name': 'List Call Parts', 'url': reverse('logged-call-part-list', kwargs={'call_pk': call.pk})}, {'name': f'Call Part ({self.object.title_rendered()})'} ] return context def get_form_kwargs(self): form_kwargs = super().get_form_kwargs() form_kwargs['call_pk'] = self.kwargs['call_pk'] return form_kwargs def get_success_url(self): return reverse('logged-call-part-detail', kwargs={'call_pk': self.kwargs['call_pk'], 'call_part_pk': self.kwargs['call_part_pk']}) class CallPartDelete(View): def post(self, request, *args, **kwargs): call_part_id = request.POST['callPartId'] call_id = request.POST['callId'] destination = reverse('logged-call-part-list', kwargs={'call_pk': call_id}) try: call_part = CallPart.objects.get(pk=call_part_id) except ObjectDoesNotExist: messages.warning(request, 'Call part not found: it has not been deleted') return redirect(destination) try: call_part.delete() messages.success(request, 'Call part deleted') except ProtectedError: messages.error(request, mark_safe(f'Call part "<strong>{call_part.title}</strong>" could not be deleted. Please delete any questions and files attached to the part and try again')) return redirect(destination)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,369
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0036_license_public_text_is_text_field.py
# Generated by Django 3.0.5 on 2020-05-12 13:20 from django.db import migrations, models def add_basic_licenses(apps, schema_editor): License = apps.get_model('grant_management', 'License') License.objects.get_or_create(name='Creative Commons Attribution Share Alike 4.0 International', spdx_identifier='CC-BY-SA-4.0', public_text='<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.') License.objects.get_or_create(name='Creative Commons Attribution 4.0 International', spdx_identifier='CC-BY-4.0', public_text='<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.') class Migration(migrations.Migration): dependencies = [ ('grant_management', '0035_medium_makes_license_optional'), ] operations = [ migrations.AlterField( model_name='license', name='public_text', field=models.TextField(blank=True, help_text='Explanatory text for this license. Include the logo and URL to license text.', null=True), ), migrations.RunPython(add_basic_licenses), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,370
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/tests/forms/test_financial_report.py
from datetime import datetime from django.test import TestCase from grant_management.forms.reports import FinancialReportItemModelForm from grant_management.models import FinancialReport from project_core.tests import database_population class FinancialReportItemFormTest(TestCase): def setUp(self): self._project = database_population.create_project() def test_valid_financial_report(self): data = {'project': self._project, 'due_date': datetime(2020, 1, 12) } self.assertEqual(FinancialReport.objects.all().count(), 0) financial_report_item_form = FinancialReportItemModelForm(data=data) self.assertTrue(financial_report_item_form.is_valid()) financial_report_item_form.save() self.assertEqual(FinancialReport.objects.all().count(), 1) def test_received_date_after_sent_date(self): data = {'project': self._project, 'received_date': datetime(2020, 5, 5), 'sent_for_approval_date': datetime(2020, 1, 5), 'due_date': datetime(2020, 1, 5) } financial_report_item_form = FinancialReportItemModelForm(data=data) self.assertFalse(financial_report_item_form.is_valid()) self.assertIn('sent_for_approval_date', financial_report_item_form.errors)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,371
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0067_alter_coinvestors_co_investigator.py
# Generated by Django 3.2.13 on 2022-07-08 07:04 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0178_auto_20220708_0904'), ('grant_management', '0066_auto_20220629_1301'), ] operations = [ migrations.AlterField( model_name='coinvestors', name='co_investigator', field=models.ForeignKey(blank=True, help_text='Co-Investigator', null=True, on_delete=django.db.models.deletion.PROTECT, to='project_core.physicalperson'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,372
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0161_call_file_name_is_a_slug.py
# Generated by Django 3.1.5 on 2021-01-11 17:12 import django.core.validators from django.db import migrations, models import re class Migration(migrations.Migration): dependencies = [ ('project_core', '0160_reduce_size_title_abstract_scientific_cluster'), ] operations = [ migrations.AlterField( model_name='callpartfile', name='name', field=models.CharField(help_text='Name of the file', max_length=64, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), 'Enter a valid “slug” consisting of letters, numbers, underscores or hyphens.', 'invalid')]), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,373
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/templatetags/git_commit.py
import subprocess from django import template register = template.Library() @register.simple_tag def version_date(): try: date_time = subprocess.run(['/usr/bin/git', 'log', '-1', '--format=%cd'], capture_output=True).stdout return date_time.decode('utf-8').strip() except FileNotFoundError: return 'Unknown'
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,374
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0088_organisation_mandatory_fields.py
# Generated by Django 2.2.6 on 2019-11-29 11:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0087_uses_organisation_names_for_funding_and_applicant'), ] operations = [ migrations.AlterField( model_name='organisation', name='postal_code', field=models.CharField(blank=True, help_text='Postal code of the organisation', max_length=50, null=True), ), migrations.AlterField( model_name='organisation', name='street', field=models.CharField(blank=True, help_text='Street address of the organisation', max_length=500, null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,375
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0046_add_social_media_networks.py
# Generated by Django 3.0.5 on 2020-05-19 13:57 from django.db import migrations def add_social_networks(apps, schema_editor): SocialNetwork = apps.get_model('grant_management', 'SocialNetwork') for social_network_name in ['Blog', 'Facebook', 'Instagram', 'Mastodon', 'Pinterest', 'Twitter', 'Web Page']: SocialNetwork.objects.get_or_create(name=social_network_name) class Migration(migrations.Migration): dependencies = [ ('grant_management', '0045_milestone_category_to_category'), ] operations = [ migrations.RunPython(add_social_networks), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,376
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/forms/person.py
from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div from django import forms from django.core.exceptions import ObjectDoesNotExist from django.core.validators import RegexValidator, ValidationError from django.forms import Form from phonenumber_field.formfields import PhoneNumberField from project_core.models import PersonTitle, Gender, PhysicalPerson, PersonPosition, Contact, CareerStage from project_core.utils.orcid import orcid_div, field_set_read_only from .utils import organisations_name_autocomplete, get_field_information from ..utils.utils import create_person_position from ..widgets import XDSoftYearMonthPickerInput HELP_TEXTS_HEAD_OF_YOUR_RESEARCH = {'orcid': 'Enter the ORCID iD (e.g.: 0000-0002-1825-0097).<br>' 'Please ask head of research unit if unknown', 'first_name': 'Populated from ORCID iD', 'surname': 'Populated from ORCID iD', 'academic_title': 'Mandatory if ORCID iD is entered'} class PersonForm(Form): def __init__(self, *args, **kwargs): self.person_position = kwargs.pop('person_position', None) self._only_basic_fields = kwargs.pop('only_basic_fields', False) self._all_fields_are_optional = kwargs.pop('all_fields_are_optional', False) help_texts = kwargs.pop('help_texts', {}) career_stage_queryset = kwargs.pop('career_stages_queryset', None) super().__init__(*args, **kwargs) orcid_initial = first_name_initial = surname_initial = organisations_initial = group_initial = \ academic_title_initial = email_initial = phone_initial = gender_initial = career_stage_initial = phd_date_initial = None if self.person_position: orcid_initial = self.person_position.person.orcid first_name_initial = self.person_position.person.first_name surname_initial = self.person_position.person.surname organisations_initial = self.person_position.organisation_names.all() group_initial = self.person_position.group academic_title_initial = self.person_position.academic_title career_stage_initial = self.person_position.career_stage gender_initial = self.person_position.person.gender email_initial = self.person_position.main_email() phone_initial = self.person_position.main_phone() if self.person_position.person.phd_date: # In the database is always saved as yyyy-mm (validator in the model) but it's visualized as mm-yyyy phd_date_parts = self.person_position.person.phd_date.split('-') phd_date_initial = f'{phd_date_parts[1]}-{phd_date_parts[0]}' self.fields['orcid'] = forms.CharField(initial=orcid_initial, **get_field_information(PhysicalPerson, 'orcid', label='ORCID iD', required=True, help_text='Enter your ORCID iD (e.g.: 0000-0002-1825-0097).<br>' 'Please create an <a href="https://orcid.org">ORCID iD</a> if you do not already have one')) self.fields['academic_title'] = forms.ModelChoiceField(queryset=PersonTitle.objects.all(), initial=academic_title_initial, required=not self._only_basic_fields) self.fields['first_name'] = forms.CharField(initial=first_name_initial, label='First name(s)', help_text='Your name is populated from your ORCID record. If you would like to change it please amend it in <a href="https://orcid.org/login">ORCID</a>') self.fields['surname'] = forms.CharField(initial=surname_initial, label='Surname(s)', help_text='Your surname is populated from your ORCID record. If you would like to change it please amend it in <a href="https://orcid.org/login">ORCID</a>') field_set_read_only([self.fields['first_name'], self.fields['surname']]) if self._only_basic_fields == False: self.fields['gender'] = forms.ModelChoiceField(queryset=Gender.objects.all(), initial=gender_initial) if career_stage_queryset is None: career_stage_queryset = CareerStage.objects.all().order_by('list_order', 'name') self.fields['career_stage'] = forms.ModelChoiceField( queryset=career_stage_queryset, initial=career_stage_initial) self.fields['email'] = forms.EmailField(initial=email_initial, help_text='Please write a valid email address. You will receive a confirmation email when saving and submitting your application form. This email address will also be used for communication purposes') self.fields['phone'] = PhoneNumberField(initial=phone_initial, help_text='Phone number e.g.: +41222222222 . Extension can be added with xNN at the end') self.fields['phd_date'] = forms.CharField(initial=phd_date_initial, label='Date of PhD', help_text='Where applicable, please enter the date on which you were awarded, or expect to be awarded your PhD (use the format mm-yyyy)', required=False, widget=XDSoftYearMonthPickerInput, validators=[RegexValidator(regex='^[0-9]{2}-[0-9]{4}$', message='Format is mm-yyyy', code='Invalid format')]) self.fields['organisation_names'] = organisations_name_autocomplete(initial=organisations_initial, help_text='Please select the organisation(s) to which you are affiliated for the purposes of this proposal.') self.fields['group'] = forms.CharField(initial=group_initial, help_text='Please type the names of the group(s) or laboratories to which you are affiliated for the purposes of this proposal', label='Group / lab', required=False) # If adding fields here: see below to remove them from the self.helper.layout used_help_texts = [] for field_str, field in self.fields.items(): if self._all_fields_are_optional: field.required = False if field_str in help_texts: self.fields[field_str].help_text = help_texts[field_str] used_help_texts.append(field_str) if len(used_help_texts) != len(help_texts): print('Unused help texts:', help_texts.keys() - used_help_texts) self.helper = FormHelper(self) self.helper.form_tag = False self.helper.layout = Layout( orcid_div('orcid'), Div( Div('first_name', css_class='col-4'), Div('surname', css_class='col-4'), Div('academic_title', css_class='col-2'), Div('gender', css_class='col-2'), css_class='row' ), Div( Div('career_stage', css_class='col-8'), Div('phd_date', css_class='col-4'), css_class='row' ), Div( Div('email', css_class='col-6'), Div('phone', css_class='col-6'), css_class='row' ), Div( Div('organisation_names', css_class='col-12'), css_class='row' ), Div( Div('group', css_class='col-12'), css_class='row' ), ) if self._only_basic_fields: # The Layout always includes all the fields. Now it's better to remove the fields that don't exist # to avoid django-crispy-forms warnings (not fatal) PersonForm._delete_field_from_layout(self.helper.layout.fields, 'gender') PersonForm._delete_field_from_layout(self.helper.layout.fields, 'career_stage') PersonForm._delete_field_from_layout(self.helper.layout.fields, 'email') PersonForm._delete_field_from_layout(self.helper.layout.fields, 'phone') PersonForm._delete_field_from_layout(self.helper.layout.fields, 'phd_date') PersonForm._delete_field_from_layout(self.helper.layout.fields, 'organisation_names') PersonForm._delete_field_from_layout(self.helper.layout.fields, 'group') @staticmethod def _delete_field_from_layout(container, field_str): for item in container: if type(item) == Div: PersonForm._delete_field_from_layout(item, field_str) elif type(item) == str and item == field_str: container.remove(field_str) def get_person_positions(self): """ Matches and returns the person_position from the database. """ try: physical_person = PhysicalPerson.objects.get( orcid=self.cleaned_data['orcid'] ) except ObjectDoesNotExist: # Non-existing PHysicalPerson so it doesn't have any PersonPositions associated return [] person_positions = PersonPosition.objects.filter( person=physical_person, academic_title=self.cleaned_data['academic_title'], group=self.cleaned_data['group'], career_stage=self.cleaned_data['career_stage'] ) return person_positions def clean_phd_date(self): if 'phd_date' not in self.cleaned_data: return None if self.cleaned_data['phd_date'] == '': return None # It has the correct format mm-yyyy because the field has a validator # In the DB it's always yyyy-mm because the model has this validator (consistent with general mysql date format) month, year = self.cleaned_data['phd_date'].split('-') month_int = int(month) if month_int < 1 or month_int > 12: raise ValidationError(f'Invalid month: {month}', code='invalid', params={'value': month}) return f'{year}-{month}' def clean(self): cd = super().clean() if self.errors: # If there are errors they might be related to orcid (e.g. using the example # ORCID iD, so cd['orcid'] doesn't exist. At this point we don't do further cleaning: # the user needs to fix the errors in the form before further cleaning is done. return cd # If ORCID iD is filled in: other fields are mandatory if self._all_fields_are_optional and cd['orcid']: for field_str, field in self.fields.items(): if field_str not in cd or not cd[field_str]: # It needs to be in cd and have a value self.add_error(field_str, 'Mandatory field if ORCiD iD is filled in') if self._all_fields_are_optional and not cd['orcid']: for field_str, field in self.fields.items(): if field_str in cd and cd[field_str]: self.add_error(field_str, 'It cannot contain any information if ORCiD ID is empty') return cd def save_person(self): cd = self.cleaned_data person_position = create_person_position(cd['orcid'], cd['first_name'], cd['surname'], gender=cd.get('gender', None), phd_date=cd.get('phd_date', None), academic_title=cd.get('academic_title'), group=cd.get('group'), career_stage=cd.get('career_stage'), organisation_names=cd.get('organisation_names', [])) if cd.get('email', None): # Should this be in the model? # TODO: discuss how to replace emails email_contact = person_position.main_email_model() if email_contact is None: email_contact = Contact() email_contact.method = Contact.EMAIL email_contact.person_position = person_position email_contact.entry = cd.get('email') email_contact.save() if cd.get('phone', None): # Like before, should this be in the model and consolidated? # TODO: discuss how to replace phones and handling of multiple phones phone_contact = person_position.main_phone_model() if phone_contact is None: phone_contact = Contact() phone_contact.method = Contact.PHONE phone_contact.person_position = person_position phone_contact.entry = cd.get('phone').as_international phone_contact.save() return person_position
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,377
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/templatetags/thousands_separator.py
from django import template register = template.Library() @register.filter(name='thousands_separator') def thousands_separator(value): """ Using settings.THOUSANDS_SEPARATOR generic way has two problems: a) it then is not possible to use DATE_FORMAT as we want b) all the numbers have thousand separators not only amounts """ if value is None: return None value = float(value) return f'{value:_.2f}'.replace('_', "'")
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,378
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0071_auto_20221107_1715.py
# Generated by Django 3.2.16 on 2022-11-07 16:15 from django.db import migrations, models import django.db.models.deletion import grant_management.models import storages.backends.s3boto3 class Migration(migrations.Migration): dependencies = [ ('project_core', '0180_auto_20221104_1341'), ('grant_management', '0070_underspending'), ] operations = [ migrations.AddField( model_name='projectsocialnetwork', name='file', field=models.FileField(blank=True, null=True, storage=storages.backends.s3boto3.S3Boto3Storage(), upload_to=grant_management.models.outreach_file_rename), ), migrations.AlterField( model_name='projectsocialnetwork', name='project', field=models.ForeignKey(help_text='Project to which this outreach page is related', on_delete=django.db.models.deletion.PROTECT, to='project_core.project'), ), migrations.AlterField( model_name='projectsocialnetwork', name='social_network', field=models.ForeignKey(help_text='Outreach with information about the project', on_delete=django.db.models.deletion.PROTECT, to='grant_management.socialnetwork'), ), migrations.AlterField( model_name='projectsocialnetwork', name='url', field=models.URLField(blank=True, help_text='URL of outreach (e.g. https://twitter.com/SwissPolar)', null=True), ), migrations.AlterField( model_name='socialnetwork', name='name', field=models.CharField(help_text='Outreach name (e.g. Twitter, Facebook, Instagram, Blog)', max_length=100), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,379
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0018_callquestion_question.py
# Generated by Django 2.2.6 on 2019-10-07 10:15 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0017_refactor_question_templatequestion'), ] operations = [ migrations.AddField( model_name='callquestion', name='question', field=models.ForeignKey(default=1, help_text='Template question on which this call question is based', on_delete=django.db.models.deletion.PROTECT, to='project_core.TemplateQuestion'), preserve_default=False, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,380
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0032_add_date_created_source-keywords.py
# Generated by Django 2.2.6 on 2019-10-14 17:06 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('project_core', '0031_import_organisations'), ] operations = [ migrations.AddField( model_name='keyword', name='date_created', field=models.DateTimeField(default=django.utils.timezone.now, help_text='Date and time at which the keyword was created'), ), migrations.AddField( model_name='keyword', name='source', field=models.CharField(default='', help_text='Source from which the keyword originated', max_length=200), preserve_default=False, ), migrations.AlterField( model_name='source', name='source', field=models.CharField(help_text='Source from which a UID may originate', max_length=200), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,381
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0037_added_created_modified_fields_call.py
# Generated by Django 2.2.6 on 2019-10-21 12:18 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('project_core', '0036_modified_by_nullable_funding_instrument'), ] operations = [ migrations.AddField( model_name='call', name='created_by', field=models.ForeignKey(help_text='User id of person creating the call', on_delete=django.db.models.deletion.PROTECT, related_name='call_created_by_set', to=settings.AUTH_USER_MODEL, null=True), preserve_default=False, ), migrations.AddField( model_name='call', name='date_created', field=models.DateTimeField(default=django.utils.timezone.now, help_text='Date and time on which the call was created'), ), migrations.AddField( model_name='call', name='date_modified', field=models.DateTimeField(blank=True, default=django.utils.timezone.now, help_text='Date and time on which the call was modified', null=True), ), migrations.AddField( model_name='call', name='modified_by', field=models.ForeignKey(blank=True, help_text='User id of person modifying the call', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='call_modified_by_set', to=settings.AUTH_USER_MODEL), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,382
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0007_rename_person_organisation_to_organisations.py
# Generated by Django 2.2.4 on 2019-09-24 06:36 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('project_core', '0006_rename_proposal_geographical_area_to_areas'), ] operations = [ migrations.RenameField( model_name='person', old_name='organisation', new_name='organisations', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,383
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0069_keyword_description_nullable.py
# Generated by Django 2.2.6 on 2019-10-23 13:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0068_personposition_model_booleans'), ] operations = [ migrations.AlterField( model_name='keyword', name='description', field=models.CharField(blank=True, help_text='Description of a keyword that should be used to distinguish it from another keyword', max_length=512, null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,384
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0181_auto_20230206_0753.py
# Generated by Django 3.2.16 on 2023-02-06 06:53 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0180_auto_20221104_1341'), ] operations = [ migrations.AlterField( model_name='call', name='finance_year', field=models.IntegerField(help_text='Finance year of this call. It is used, for example, for the project key from this call', validators=[django.core.validators.MinValueValidator(2015, 'Finance year cannot be before SPI existed'), django.core.validators.MaxValueValidator(2025, 'Finance year cannot be more than two years after the current year')]), ), migrations.AlterField( model_name='historicalcall', name='finance_year', field=models.IntegerField(help_text='Finance year of this call. It is used, for example, for the project key from this call', validators=[django.core.validators.MinValueValidator(2015, 'Finance year cannot be before SPI existed'), django.core.validators.MaxValueValidator(2025, 'Finance year cannot be more than two years after the current year')]), ), migrations.AlterField( model_name='historicalproject', name='finance_year', field=models.IntegerField(help_text='Finance year of this project', validators=[django.core.validators.MinValueValidator(2015, 'Finance year cannot be before SPI existed'), django.core.validators.MaxValueValidator(2025, 'Finance year cannot be more than two years after the current year')]), ), migrations.AlterField( model_name='project', name='finance_year', field=models.IntegerField(help_text='Finance year of this project', validators=[django.core.validators.MinValueValidator(2015, 'Finance year cannot be before SPI existed'), django.core.validators.MaxValueValidator(2025, 'Finance year cannot be more than two years after the current year')]), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,385
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0011_change_financial_report_date_name.py
# Generated by Django 3.0.3 on 2020-04-14 10:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('grant_management', '0010_makes_signed_by_optional'), ] operations = [ migrations.RemoveField( model_name='financialreport', name='sent_for_approval_date', ), migrations.AddField( model_name='financialreport', name='approval_date', field=models.DateField(blank=True, help_text='Date that the finance report was approved', null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,386
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/evaluation/tests/forms/test_proposal_evaluation.py
from datetime import datetime from django.contrib.auth.models import User, Group from django.core.exceptions import PermissionDenied from django.test import TestCase from ProjectApplication import settings from evaluation.forms.proposal_evaluation import ProposalEvaluationForm from evaluation.models import ProposalEvaluation, CallEvaluation from project_core.models import ProposalStatus from project_core.tests import database_population from project_core.tests.database_population import create_proposal, create_reviewer class ProposalEvaluationFormTest(TestCase): def setUp(self): self._user = User.objects.create_user('TestUser', 'test@example.com', 'password') group, _ = Group.objects.get_or_create(name=settings.MANAGEMENT_GROUP_NAME) ProposalStatus.objects.get_or_create(name=settings.PROPOSAL_STATUS_SUBMITTED) group.user_set.add(self._user) group.save() self._user_no_manager = User.objects.create_user('TestUserNoManager', 'test2@example.com', 'password') @staticmethod def _create_call_evaluation(call): call_evaluation = CallEvaluation() call_evaluation.call = call call_evaluation.panel_date = datetime.today() call_evaluation.save() def test_save(self): self.assertEqual(ProposalEvaluation.objects.count(), 0) proposal = create_proposal() ProposalEvaluationFormTest._create_call_evaluation(proposal.call) proposal.proposal_status = ProposalStatus.objects.get(name=settings.PROPOSAL_STATUS_SUBMITTED) proposal.save() reviewers = [create_reviewer()] proposal.call.reviewer_set.add(*reviewers) data = {'proposal': proposal, 'allocated_budget': 10_000, 'panel_remarks': 'Very good', 'feedback_to_applicant': 'Keep working on it!', 'panel_recommendation': ProposalEvaluation.PANEL_RECOMMENDATION_FUND, 'board_decision': ProposalEvaluation.BOARD_DECISION_FUND, 'decision_date': datetime.today(), 'reviewers': reviewers } proposal_evaluation_form = ProposalEvaluationForm(data=data, proposal=proposal) self.assertTrue(proposal_evaluation_form.is_valid()) proposal_evaluation_form.save(user=self._user) self.assertEqual(ProposalEvaluation.objects.count(), 1) def test_clean_missing_file(self): proposal = create_proposal() proposal.proposal_status = ProposalStatus.objects.get(name=settings.PROPOSAL_STATUS_SUBMITTED) proposal.save() data = {'proposal': proposal, 'allocated_budget': 10_000, 'panel_remarks': 'Very good', 'decision_letter_date': datetime.today(), 'feedback_to_applicant': 'Keep working on it!', 'panel_recommendation': ProposalEvaluation.PANEL_RECOMMENDATION_FUND, 'board_decision': ProposalEvaluation.BOARD_DECISION_FUND, } proposal_evaluation_form = ProposalEvaluationForm(data=data, proposal=proposal) self.assertFalse(proposal_evaluation_form.is_valid()) self.assertIn('decision_letter', proposal_evaluation_form.errors) def test_save_permission_denied(self): proposal = create_proposal() proposal.proposal_status = ProposalStatus.objects.get(name=settings.PROPOSAL_STATUS_SUBMITTED) proposal.save() data = {'proposal': proposal, 'allocated_budget': 10_000, 'panel_remarks': 'Very good', 'feedback_to_applicant': 'Keep working on it!', 'panel_recommendation': ProposalEvaluation.PANEL_RECOMMENDATION_FUND, 'board_decision': ProposalEvaluation.BOARD_DECISION_FUND, } proposal_evaluation_form = ProposalEvaluationForm(data=data, proposal=proposal) self.assertRaises(PermissionDenied, proposal_evaluation_form.save, user=self._user_no_manager) def test_save_permission_denied_call_closed(self): proposal = create_proposal() proposal.proposal_status = ProposalStatus.objects.get(name=settings.PROPOSAL_STATUS_SUBMITTED) proposal.save() reviewers = [create_reviewer()] proposal.call.reviewer_set.add(*reviewers) data = {'proposal': proposal, 'allocated_budget': 10_000, 'panel_remarks': 'Very good', 'feedback_to_applicant': 'Keep working on it!', 'panel_recommendation': ProposalEvaluation.PANEL_RECOMMENDATION_FUND, 'board_decision': ProposalEvaluation.BOARD_DECISION_FUND, 'decision_date': datetime.today(), 'reviewers': reviewers } call_evaluation = CallEvaluation() call_evaluation.panel_date = datetime.today() call_evaluation.call = proposal.call call_evaluation.close(database_population.create_management_user()) proposal_evaluation_form = ProposalEvaluationForm(data=data, proposal=proposal) self.assertTrue(proposal_evaluation_form.is_valid()) self.assertRaises(PermissionDenied, proposal_evaluation_form.save, user=self._user) self.assertEqual(ProposalEvaluation.objects.count(), 0)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,387
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/logged/__init__.py
from . import autocomplete from . import call from . import funding_instrument from . import lists from . import news from . import person_position from . import project from . import proposal from . import template_question from . import homepage from . import call_part from . import call_question from . import call_part_file
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,388
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0017_refactor_question_templatequestion.py
# Generated by Django 2.2.6 on 2019-10-07 10:11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('project_core', '0016_refactor_stepdate'), ] operations = [ migrations.RenameModel( old_name='Question', new_name='TemplateQuestion', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,389
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/templatetags/eligibility.py
from django import template from project_core.models import Proposal register = template.Library() @register.filter(name='is_eligibility_not_set') def is_eligibility_not_set(eligibility): return eligibility == Proposal.ELIGIBILITYNOTCHECKED @register.filter(name='is_eligibility_eligible') def is_eligibility_not_set(eligibility): return eligibility == Proposal.ELIGIBLE
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,390
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/logged/proposals_export_to_zip.py
import io import zipfile from django.http import FileResponse from django.utils import timezone from django.views import View from evaluation.models import Reviewer from project_core.models import Call, Proposal from project_core.views.common.proposal_zip import add_proposal_to_zip class CreateZipFile: def __init__(self, proposals, request): self._proposals = iter(proposals) self._request = request self._buffer = io.BytesIO() self._zipfile = zipfile.ZipFile(self._buffer, 'w') self._used_directory_names = [] self._last_read_position = 0 with self._zipfile.open('README.txt', mode='w') as readme_file: readme_file.write(b'This ZIP file includes confidential proposals and personal information. Please keep it private and confidential.') self._last_wrote_position = self._buffer.tell() def _add_new_proposal(self): try: proposal = next(self._proposals) except StopIteration: self._zipfile.close() return self._buffer.seek(self._last_wrote_position) directory_name = add_proposal_to_zip(proposal, self._zipfile, self._request, self._used_directory_names) self._last_wrote_position = self._buffer.tell() self._used_directory_names.append(directory_name) def read(self, size): first_read = self._last_read_position == 0 self._buffer.seek(self._last_read_position) read_buffer = self._buffer.read(size) self._last_read_position = self._buffer.tell() if len(read_buffer) < size and not first_read: self._add_new_proposal() self._buffer.seek(self._last_read_position) read_buffer += self._buffer.read(size - len(read_buffer)) self._last_read_position = self._buffer.tell() return read_buffer class ProposalsExportZip(View): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get(self, request, *args, **kwargs): if 'call' in kwargs: call = Call.objects.get(id=kwargs['call']) proposals = call.proposal_set.all() base_filename = f'proposals-{call.short_name}' else: proposals = Proposal.objects.all() proposals = Reviewer.filter_proposals(proposals, self.request.user) base_filename = 'proposals-all' date = timezone.now().strftime('%Y%m%d-%H%M%S') filename = f'{base_filename}-{date}.zip' filename = filename.replace(' ', '_') return FileResponse(CreateZipFile(proposals, request), filename=filename)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,391
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/logged/funding_instrument.py
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django.contrib import messages from django.shortcuts import render, redirect from django.urls import reverse from django.views.generic import TemplateView, DetailView, ListView from project_core.forms.funding_instrument import FundingInstrumentForm from project_core.models import FundingInstrument from variable_templates.forms.template_variables import TemplateVariableItemFormSet from variable_templates.utils import get_template_variables_for_funding_instrument FUNDING_INSTRUMENT_FORM_NAME = 'funding_instrument_form' TEMPLATE_VARIABLES_FORM_NAME = 'template_variables_form' class FundingInstrumentList(ListView): model = FundingInstrument context_object_name = 'funding_instruments' template_name = 'logged/funding_instrument-list.tmpl' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'calls', 'active_subsection': 'funding-instrument-list', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) context['breadcrumb'] = [{'name': 'Funding instruments'}] return context class FundingInstrumentMixin: fields = ['long_name', 'short_name', 'description'] @property def success_msg(self): return NotImplemented class AddCrispySubmitButtonMixin: def get_form(self, form_class=None): form = super().get_form(form_class) form.helper = FormHelper() form.helper.add_input(Submit('submit', 'Submit')) return form class FundingInstrumentView(TemplateView): @staticmethod def _cancel_url(kwargs): if 'pk' in kwargs: return reverse('logged-funding-instrument-detail', kwargs={'pk': kwargs['pk']}) else: return reverse('logged-funding-instrument-list') def get(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) context['cancel_url'] = FundingInstrumentView._cancel_url(kwargs) if 'pk' in kwargs: funding_instrument = FundingInstrument.objects.get(pk=kwargs['pk']) context[FUNDING_INSTRUMENT_FORM_NAME] = FundingInstrumentForm(instance=funding_instrument, prefix=FUNDING_INSTRUMENT_FORM_NAME) context[TEMPLATE_VARIABLES_FORM_NAME] = TemplateVariableItemFormSet(funding_instrument=funding_instrument, prefix=TEMPLATE_VARIABLES_FORM_NAME) context['action_url'] = reverse('logged-funding-instrument-update', kwargs={'pk': kwargs['pk']}) context.update({'active_section': 'calls', 'active_subsection': 'funding-instrument-list', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) breadcrumb = f'Edit ({funding_instrument.short_name})' context['action_submit_button'] = 'Save Funding Instrument' context['action_title'] = 'Edit' else: context[FUNDING_INSTRUMENT_FORM_NAME] = FundingInstrumentForm(prefix=FUNDING_INSTRUMENT_FORM_NAME) context[TEMPLATE_VARIABLES_FORM_NAME] = TemplateVariableItemFormSet(prefix=TEMPLATE_VARIABLES_FORM_NAME) context.update({'active_section': 'calls', 'active_subsection': 'funding-instrument-add', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) breadcrumb = 'Create' context['action_submit_button'] = 'Create Funding Instrument' context['action_title'] = 'Create' context['breadcrumb'] = [{'name': 'Funding instruments', 'url': reverse('logged-funding-instrument-list')}, {'name': breadcrumb}] return render(request, 'logged/funding_instrument-form.tmpl', context) def post(self, request, *args, **kwargs): context = super().get_context_data(**kwargs) context['cancel_url'] = FundingInstrumentView._cancel_url(kwargs) if 'pk' in kwargs: funding_instrument = FundingInstrument.objects.get(id=kwargs['pk']) funding_instrument_form = FundingInstrumentForm(request.POST, instance=funding_instrument, prefix=FUNDING_INSTRUMENT_FORM_NAME) context['action_submit_button'] = 'Save Funding Instrument' context['action_title'] = 'Edit' else: funding_instrument_form = FundingInstrumentForm(request.POST, prefix=FUNDING_INSTRUMENT_FORM_NAME) context['action_submit_button'] = 'Create Funding Instrument' context['action_title'] = 'Create' template_variables_form = TemplateVariableItemFormSet(request.POST, prefix=TEMPLATE_VARIABLES_FORM_NAME) if funding_instrument_form.is_valid() and template_variables_form.is_valid(): funding_instrument = funding_instrument_form.save() template_variables_form.save_into_funding_instrument(funding_instrument) messages.success(request, 'Funding instrument has been saved') return redirect(reverse('logged-funding-instrument-detail', kwargs={'pk': funding_instrument.pk})) context[FUNDING_INSTRUMENT_FORM_NAME] = funding_instrument_form context[TEMPLATE_VARIABLES_FORM_NAME] = template_variables_form context['action_url'] = reverse('logged-funding-instrument-update', kwargs={'pk': kwargs['pk']}) context.update({'active_section': 'calls', 'active_subsection': 'funding-instrument-list', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) messages.error(request, 'Funding Instrument not saved. Please correct the errors in the form and try again.') return render(request, 'logged/funding_instrument-form.tmpl', context) class FundingInstrumentDetailView(FundingInstrumentMixin, DetailView): template_name = 'logged/funding_instrument-detail.tmpl' context_object_name = 'funding_instrument' model = FundingInstrument def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context.update({'active_section': 'calls', 'active_subsection': 'funding-instrument-list', 'sidebar_template': 'logged/_sidebar-calls.tmpl'}) context['template_variables'] = get_template_variables_for_funding_instrument(kwargs['object']) context['breadcrumb'] = [{'name': 'Funding instruments', 'url': reverse('logged-funding-instrument-list')}, {'name': f'Details ({context["funding_instrument"].short_name})'}] return context
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,392
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/filters.py
from functools import reduce from operator import or_ from django.db.models import Q from django_filters.rest_framework import CharFilter, FilterSet from project_core.models import Project class ProjectFilterSet(FilterSet): key_any = CharFilter(method='filter_any', label="Key, Title, Keyword, PI, Lay summary or Organisation") geographical_areas = CharFilter(method='filter_geographical_areas') funding_instrument = CharFilter(method='filter_funding_instrument') start_date = CharFilter(method='filter_start_date') def filter_any(self, queryset, name, value): fields = [ "key", "title", "keywords__name", "principal_investigator__person__first_name", "principal_investigator__person__surname", "laysummary__text", "principal_investigator__organisation_names__name" ] q_field = reduce(or_, (Q(**{f"{field}__icontains": word}) for word in value.split() for field in fields)) return queryset.filter(q_field).distinct() def filter_geographical_areas(self, queryset, name, value): return queryset.filter(geographical_areas__name=value) def filter_funding_instrument(self, queryset, name, value): return queryset.filter(funding_instrument__long_name=value) def filter_start_date(self, queryset, name, value): return queryset.filter(start_date__year__lte=value, end_date__year__gte=value) class Meta: model = Project fields = ('key_any', 'geographical_areas', 'funding_instrument', 'start_date')
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,393
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/evaluation/migrations/0024_improve_plural_forms.py
# Generated by Django 3.0.10 on 2020-10-15 09:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('evaluation', '0023_criterion_criterioncallevaluation'), ] operations = [ migrations.AlterModelOptions( name='criterion', options={'verbose_name_plural': 'Criteria'}, ), migrations.AlterModelOptions( name='criterioncallevaluation', options={'verbose_name_plural': 'Criterion Call Evaluations'}, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,394
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0006_rename_proposal_geographical_area_to_areas.py
# Generated by Django 2.2.4 on 2019-09-24 06:22 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('project_core', '0005_create_questions_models'), ] operations = [ migrations.RenameField( model_name='proposal', old_name='geographical_area', new_name='geographical_areas', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,395
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0153_auto_20201223_call_question_call_parts.py
# Generated by Django 3.1.4 on 2020-12-23 13:12 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0152_create_default_part'), ] operations = [ migrations.RemoveField( model_name='historicalcallquestion', name='call', ), migrations.AlterField( model_name='callquestion', name='call_part', field=models.ForeignKey(default=1, help_text='To which Call Part this question belongs to', on_delete=django.db.models.deletion.PROTECT, to='project_core.callpart'), preserve_default=False, ), migrations.AlterUniqueTogether( name='callpart', unique_together={('call', 'title')}, ), migrations.AlterUniqueTogether( name='callquestion', unique_together={('call_part', 'order'), ('call_part', 'template_question')}, ), migrations.RemoveField( model_name='callquestion', name='call', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,396
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0016_new_dates_handling.py
# Generated by Django 3.0.5 on 2020-04-29 08:27 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0118_calls_need_to_be_part_of_a_funding_instrument'), ('grant_management', '0015_add_lay_summary'), ] operations = [ migrations.RemoveField( model_name='media', name='reception_date', ), migrations.RemoveField( model_name='media', name='sent_date', ), migrations.AlterField( model_name='financialreport', name='reception_date', field=models.DateField(blank=True, help_text='Date the financial report was received', null=True), ), migrations.AlterField( model_name='financialreport', name='sent_date', field=models.DateField(blank=True, help_text='Date the financial report was sent to review', null=True), ), migrations.AlterField( model_name='invoice', name='reception_date', field=models.DateField(blank=True, help_text='Date the invoice was received', null=True), ), migrations.AlterField( model_name='invoice', name='sent_date', field=models.DateField(blank=True, help_text='Date the invoice was sent for payment', null=True), ), migrations.AlterField( model_name='laysummary', name='author', field=models.ForeignKey(blank=True, help_text='Person who entered this summary', null=True, on_delete=django.db.models.deletion.PROTECT, to='project_core.PhysicalPerson'), ), migrations.AlterField( model_name='laysummary', name='reception_date', field=models.DateField(blank=True, help_text='Date the Lay Summary was received', null=True), ), migrations.AlterField( model_name='laysummary', name='sent_date', field=models.DateField(blank=True, help_text='Date the Lay Summary was sent', null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,397
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0058_alter_laysummary_verbose_name_plural.py
# Generated by Django 3.2.3 on 2021-05-24 14:37 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('grant_management', '0057_mediumdeleted'), ] operations = [ migrations.AlterModelOptions( name='laysummary', options={'verbose_name_plural': 'Lay Summaries'}, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,398
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/tests/forms/test_close_project.py
from django.test import TestCase from django.urls import reverse from grant_management.forms.close_project import CloseProjectModelForm from grant_management.models import Invoice from project_core.models import Project from project_core.tests import database_population class CloseProjectFormTest(TestCase): def setUp(self): self._project = database_population.create_project() self._user = database_population.create_management_user() def test_aborted(self): data = {'status': 'Aborted', 'abortion_reason': 'Permit did not arrive on time', 'close': 'Close', 'ignore_allocated_budget_not_fully_paid': True } self.assertEqual(self._project.status, Project.ONGOING) close_project_form = CloseProjectModelForm(data=data, instance=self._project) self.assertTrue(close_project_form.is_valid()) close_project_form.close(self._user) self.assertEqual(self._project.status, Project.ABORTED) def test_completed(self): data = {'status': 'Completed', 'abortion_reason': '', 'close': 'Close', 'ignore_allocated_budget_not_fully_paid': True } self.assertEqual(self._project.status, Project.ONGOING) close_project_form = CloseProjectModelForm(data=data, instance=self._project) self.assertTrue(close_project_form.is_valid()) close_project_form.close(self._user) self.assertEqual(self._project.status, Project.COMPLETED) def test_unpaid_invoice_cannot_close(self): data = {'status': 'Completed', 'abortion_reason': '', 'close': 'Close' } Invoice.objects.create(due_date=self._project.start_date, project=self._project) self.assertEqual(self._project.status, Project.ONGOING) close_project_form = CloseProjectModelForm(data=data, instance=self._project) self.assertFalse(close_project_form.is_valid()) self.assertEqual(close_project_form.errors['status'][0], 'Cannot be closed: there are unpaid invoices') def test_unpaid_invoice_no_close_button_displayed(self): Invoice.objects.create(due_date=self._project.start_date, project=self._project) c = database_population.create_management_logged_client() response = c.get(reverse('logged-grant_management-close_project', kwargs={'project': self._project.id})) self.assertNotContains(response, 'name="close"') def test_close_button_displayed(self): c = database_population.create_management_logged_client() response = c.get(reverse('logged-grant_management-close_project', kwargs={'project': self._project.id})) self.assertContains(response, 'name="close"')
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,399
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/comments/migrations/0031_grantagreementattachment_grantagreementattachmentcategory_grantagreementcomment_grantagreementcommen.py
# Generated by Django 3.0.5 on 2020-05-29 13:48 import comments.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import storages.backends.s3boto3 class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('grant_management', '0048_installment_helptext'), ('comments', '0030_auto_20200520_1245'), ] operations = [ migrations.CreateModel( name='GrantAgreementCommentCategory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('category', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='comments.Category')), ], options={ 'verbose_name_plural': 'GrantAgreement Comment Categories', }, ), migrations.CreateModel( name='GrantAgreementAttachmentCategory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('category', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='comments.Category')), ], options={ 'verbose_name_plural': 'Grant Agreement Attachment Categories', }, ), migrations.CreateModel( name='GrantAgreementComment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('text', models.TextField(help_text='Comment text')), ('category', models.ForeignKey(help_text='Type of comment', on_delete=django.db.models.deletion.PROTECT, to='comments.GrantAgreementCommentCategory')), ('created_by', models.ForeignKey(blank=True, help_text='User by which the entry was created', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='comments_grantagreementcomment_created_by_related', to=settings.AUTH_USER_MODEL)), ('grant_agreement', models.ForeignKey(help_text='GrantAgreement about which the comment was made', on_delete=django.db.models.deletion.PROTECT, to='grant_management.GrantAgreement')), ], options={ 'unique_together': {('grant_agreement', 'created_on', 'created_by')}, }, ), migrations.CreateModel( name='GrantAgreementAttachment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('text', models.TextField(blank=True, help_text='Comment of the attachment', null=True)), ('file', models.FileField(storage=storages.backends.s3boto3.S3Boto3Storage(), upload_to=comments.models.grant_agreement_attachment_rename)), ('category', models.ForeignKey(help_text='Category of the attachment', on_delete=django.db.models.deletion.PROTECT, to='comments.GrantAgreementAttachmentCategory')), ('created_by', models.ForeignKey(blank=True, help_text='User by which the entry was created', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='comments_grantagreementattachment_created_by_related', to=settings.AUTH_USER_MODEL)), ('grant_agreement', models.ForeignKey(help_text='GrantAgreement that this attachment belongs to', on_delete=django.db.models.deletion.PROTECT, to='grant_management.GrantAgreement')), ], options={ 'abstract': False, 'unique_together': {('created_on', 'created_by')}, }, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,400
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0022_promotes_received_date_to_base_class.py
# Generated by Django 3.0.5 on 2020-04-30 14:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('grant_management', '0021_scientificreport'), ] operations = [ migrations.AddField( model_name='media', name='received_date', field=models.DateField(blank=True, help_text='Date the document was received', null=True), ), migrations.AlterField( model_name='blogpost', name='received_date', field=models.DateField(blank=True, help_text='Date the document was received', null=True), ), migrations.AlterField( model_name='financialreport', name='received_date', field=models.DateField(blank=True, help_text='Date the document was received', null=True), ), migrations.AlterField( model_name='financialreport', name='sent_date', field=models.DateField(blank=True, help_text='Date the report was sent to approved', null=True), ), migrations.AlterField( model_name='invoice', name='received_date', field=models.DateField(blank=True, help_text='Date the document was received', null=True), ), migrations.AlterField( model_name='laysummary', name='received_date', field=models.DateField(blank=True, help_text='Date the document was received', null=True), ), migrations.AlterField( model_name='scientificreport', name='received_date', field=models.DateField(blank=True, help_text='Date the document was received', null=True), ), migrations.AlterField( model_name='scientificreport', name='sent_date', field=models.DateField(blank=True, help_text='Date the report was sent to approved', null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,401
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/tests/database_population.py
from datetime import datetime, date from io import StringIO from django.contrib.auth.models import User, Group from django.core.exceptions import ObjectDoesNotExist from django.core.files.uploadedfile import SimpleUploadedFile from django.http import HttpRequest from django.test import Client from django.utils import timezone from django.utils.timezone import utc from ProjectApplication import settings from evaluation.models import Reviewer, Criterion from grant_management.models import LaySummaryType, Medium from project_core.models import BudgetCategory, Call, TemplateQuestion, GeographicalArea, Keyword, KeywordUid, Source, \ PersonTitle, Gender, Organisation, Country, OrganisationUid, ProposalStatus, CareerStage, OrganisationName, \ Proposal, PersonPosition, PhysicalPerson, FundingInstrument, Role, Project, FinancialKey, CallPart, CallPartFile, \ CallQuestion, CallCareerStage def create_call_long_name(long_name, short_name, funding_instrument=None): if funding_instrument is None: funding_instrument = create_funding_instrument() call, created = Call.objects.get_or_create(long_name=long_name, short_name=short_name, call_open_date=utc.localize(datetime(2019, 1, 1)), submission_deadline=utc.localize(datetime(2025, 1, 31)), finance_year=2020, budget_maximum=100_000, other_funding_question=False, proposal_partner_question=True, funding_instrument=funding_instrument) return call def create_call(funding_instrument=None): call = create_call_long_name('GreenLAnd Circumnavigation Expedition 2018', 'GLACE 2018', funding_instrument=funding_instrument) for career_stage in CareerStage.objects.all(): CallCareerStage.objects.create(call=call, career_stage=career_stage) return call def create_call_part(call) -> CallPart: call_part, created = CallPart.objects.get_or_create(call=call, title='Weather', order=10) return call_part def create_call_question(call_part) -> CallQuestion: template_question = create_template_questions()[0] call_question, created = CallQuestion.objects.get_or_create(call_part=call_part, template_question=template_question, question_text='How far are you going to go?', question_description='In meters', answer_type=CallQuestion.TEXT, order=10 ) return call_question def create_call_part_file(call_part) -> CallPartFile: call_part_file, created = CallPartFile.objects.get_or_create(file=SimpleUploadedFile('form_to_download.docx', b'Some form to download'), call_part=call_part, name='Form to download' ) return call_part_file def create_funding_instrument(): user = create_management_user() financial_key, created = FinancialKey.objects.get_or_create(name='BE', description='Related to Big Expeditions', funding_instrument=True, created_by=user) funding_instrument, created = FundingInstrument.objects.get_or_create(long_name='Big Expeditions', short_name=financial_key) return funding_instrument def create_geographical_areas(): antarctic, created = GeographicalArea.objects.get_or_create(name='Antarctic', definition='Very south') arctic, created = GeographicalArea.objects.get_or_create(name='Arctic', definition='Very north') high_peak, created = GeographicalArea.objects.get_or_create(name='High peaks', definition='Very high') return antarctic, arctic, high_peak def create_keywords(): source, created = Source.objects.get_or_create(source='Unit test') keyword_uuid, created = KeywordUid.objects.get_or_create(uid='test-2040242', source=source) algae, created = Keyword.objects.get_or_create(name='Algae', uid=keyword_uuid) birds, created = Keyword.objects.get_or_create(name='Birds', uid=keyword_uuid) penguins, created = Keyword.objects.get_or_create(name='Penguins', uid=keyword_uuid) ice, created = Keyword.objects.get_or_create(name='Ice', uid=keyword_uuid) micro_plastics, created = Keyword.objects.get_or_create(name='Micro-plastics', uid=keyword_uuid) source, created = Source.objects.get_or_create(source='External User') keyword_uuid, created = KeywordUid.objects.get_or_create(uid='de20ndwneip', source=source) cloud, created = Keyword.objects.get_or_create(name='Cloud', uid=keyword_uuid) rain, created = Keyword.objects.get_or_create(name='Rain', uid=keyword_uuid) snow, created = Keyword.objects.get_or_create(name='Snow', uid=keyword_uuid) return algae, birds, penguins, ice, micro_plastics, cloud, rain, snow def create_career_stage(): career, created = CareerStage.objects.get_or_create(name='PhD More than 5 years') return career def create_proposal_status(): proposal_status_submitted, created = ProposalStatus.objects.get_or_create(name='Submitted') proposal_status_draft, created = ProposalStatus.objects.get_or_create(name='Draft') return proposal_status_submitted, proposal_status_draft def create_budget_categories(): travel, created = BudgetCategory.objects.get_or_create(name='Travel', defaults={ 'description': 'Funds needed to reach the destination'}) data_processing, created = BudgetCategory.objects.get_or_create(name='Data processing', defaults={ 'description': 'Funds needed to process data'}) equipment_consumables, created = BudgetCategory.objects.get_or_create(name='Equipment / consumables', defaults={ 'description': 'Budget required for equipment or other consumables that would be needed for the proposed work'}) return travel, data_processing, equipment_consumables def create_template_questions(): template_question1, created = TemplateQuestion.objects.get_or_create( question_text='Explain which methods of transport are needed to go to the location', question_description='Explain it detailed', answer_type=TemplateQuestion.TEXT, answer_max_length=500) template_question2, created = TemplateQuestion.objects.get_or_create( question_text='Explain how to do science', question_description='In very short', answer_type=TemplateQuestion.TEXT, answer_max_length=50) return template_question1, template_question2 def create_management_user(): try: user = User.objects.get(username='unittest_management') return user except ObjectDoesNotExist: pass user = User.objects.create_user(username='unittest_management', password='12345') group, _ = Group.objects.get_or_create(name=settings.MANAGEMENT_GROUP_NAME) group.user_set.add(user) group.save() return user def create_management_logged_client(): create_management_user() client = Client() client.login(username='unittest_management', password='12345', request=HttpRequest()) return client def create_reviewer_user(): try: user = User.objects.get(username='unittest_reviewer') except ObjectDoesNotExist: user = User.objects.create_user(username='unittest_reviewer', password='12345') group, _ = Group.objects.get_or_create(name=settings.REVIEWER_GROUP_NAME) group.user_set.add(user) group.save() return user def create_reviewer_logged_client(): create_reviewer_user() client = Client() client.login(username='unittest_reviewer', password='12345', request=HttpRequest()) return client def create_applicant_user(): try: user = User.objects.get(username='unittest_applicant') except ObjectDoesNotExist: user = User.objects.create_user(username='unittest_applicant', password='12345') group, _ = Group.objects.get_or_create(name=settings.APPLICANT_GROUP_NAME) group.user_set.add(user) group.save() return user def create_applicant_logged_client(): create_applicant_user() client = Client() client.login(username='unittest_applicant', password='12345', request=HttpRequest()) return client def create_evaluation_criteria(): criterion1, created = Criterion.objects.get_or_create(name='Software is open', description='Evaluate if the software is open or not') criterion2, created = Criterion.objects.get_or_create(name='Data management completed', description='Does this contain data management') return criterion1, criterion2 def create_reviewer(): reviewer_user = create_reviewer_user() physical_person, _ = PhysicalPerson.objects.get_or_create(first_name='Alan', surname='Smithee', orcid='1111-0002-1825-0097' ) reviewer, _ = Reviewer.objects.get_or_create(user=reviewer_user, person=physical_person) return reviewer def create_person_titles(): person_title_mr, created = PersonTitle.objects.get_or_create(title='Mr') return person_title_mr, def create_genders(): gender, created = Gender.objects.get_or_create(name='Man') return gender, def create_organisations(): country, created = Country.objects.get_or_create(name='Switzerland') source, created = Source.objects.get_or_create(source='Somewhere in the brain') organisation1_uid, created = OrganisationUid.objects.get_or_create(source=source, uid='646a6e1c-2378-46d9-af42-a3710c5aee89') organisation1, created = Organisation.objects.get_or_create(long_name='École Polytechnique Fédérale de Lausanne', short_name='EPFL', country=country, uid=organisation1_uid) organisation2_uid, created = OrganisationUid.objects.get_or_create(source=source, uid='646a6e1c-2378-46d9-af42-a3710c5aee89') organisation2, created = Organisation.objects.get_or_create(long_name='Swiss Polar Foundation', short_name='SPF', country=country, uid=organisation2_uid) return organisation1, organisation2 def create_roles(): collaborator = Role.objects.get_or_create(name='Collaborator', description='Collaborates') principal_investigator = Role.objects.get_or_create(name='Principal Investigator', description='Principal Investigator') co_principal_investigator = Role.objects.get_or_create(name='Co-Principal Investigator', description='Co-Principal Investigator') return collaborator, principal_investigator, co_principal_investigator def create_organisation_names(): organisation1, created = OrganisationName.objects.get_or_create(name='EPFL') organisation2, created = OrganisationName.objects.get_or_create(name='SPF') return organisation1, organisation2 def create_physical_person(first_name='John', surname='Smith', orcid='0000-0002-1825-0097'): physical_person, _ = PhysicalPerson.objects.get_or_create(first_name=first_name, surname=surname, orcid=orcid ) return physical_person def create_academic_title(title='Mr'): academic_title, _ = PersonTitle.objects.get_or_create(title=title) return academic_title def create_person_position(first_name='John', surname='Smith', orcid='0000-0002-1825-0097', title='Mr'): physical_person = create_physical_person(first_name=first_name, surname=surname, orcid=orcid) academic_title = create_academic_title(title=title) person_position, _ = PersonPosition.objects.get_or_create(person=physical_person, academic_title=academic_title) return person_position def create_proposal(): applicant = create_person_position() call = create_call() proposal_status_draft = create_proposal_status()[1] proposal, _ = Proposal.objects.get_or_create(title='A test proposal', start_date=date(2010, 12, 10), end_date=date(2011, 11, 11), duration_months=2, applicant=applicant, proposal_status=proposal_status_draft, eligibility=Proposal.ELIGIBILITYNOTCHECKED, call=call) keywords = create_keywords() proposal.keywords.add(keywords[2]) proposal.save() return proposal def create_project(key='SPI-2020-001', title='This is a test project'): proposal = create_proposal() antarctic, arctic, high_peaks = create_geographical_areas() keywords = create_keywords() project, _ = Project.objects.get_or_create(key=key, title=title, location='Somewhere in the world', start_date=date(2020, 1, 10), end_date=date(2022, 5, 7), call=proposal.call, funding_instrument=proposal.call.funding_instrument, finance_year=proposal.call.finance_year, proposal=proposal, allocated_budget=20_000, status=Project.ONGOING, principal_investigator=proposal.applicant) project.geographical_areas.add(arctic) project.keywords.add(keywords[0]) return project def create_lay_summary_original(): lay_summary, _ = LaySummaryType.objects.get_or_create(name='Original', description='Original from the PI') return lay_summary def create_file(): a_file = StringIO('some file content') a_file.name = 'a_file.pdf' return a_file def create_medium(project): photographer = create_physical_person() medium, _ = Medium.objects.get_or_create(project=project, received_date=timezone.now(), copyright='The copyright of the photo', file=SimpleUploadedFile('photo_expedition.jpg', b'This is a JPEG photo of an expedition'), descriptive_text='Photo taken in an expedition', photographer=photographer ) return medium
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,402
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/tests/forms/test_datasets.py
from datetime import datetime from django.test import TestCase from grant_management.forms.datasets import DatasetModelForm from grant_management.models import Dataset from project_core.tests import database_population class DatasetModelFormTest(TestCase): def setUp(self): self._project = database_population.create_project() def test_dataset_valid(self): data = {'project': self._project, 'doi': 'doi:24294213', 'url': 'https://zenodo.org/something', 'title': 'A very interesting dataset', 'published_date': datetime(2020, 5, 18), } self.assertEqual(Dataset.objects.all().count(), 0) dataset_form = DatasetModelForm(data=data) self.assertTrue(dataset_form.is_valid()) dataset_form.save() self.assertEqual(Dataset.objects.all().count(), 1)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,403
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0068_coinvestors_organisation_text.py
# Generated by Django 3.2.13 on 2022-07-28 08:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('grant_management', '0067_alter_coinvestors_co_investigator'), ] operations = [ migrations.AddField( model_name='coinvestors', name='organisation_text', field=models.CharField(blank=True, help_text='Organisation Text', max_length=100, null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,404
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0061_key_and_primary_image.py
# Generated by Django 3.2.9 on 2021-12-13 15:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('grant_management', '0060_unique_together_locations'), ] operations = [ migrations.AddField( model_name='medium', name='key_image', field=models.BooleanField(default=False, help_text='Select as a key image to be displayed on website'), ), migrations.AddField( model_name='medium', name='primary_image', field=models.BooleanField(default=False, help_text='Select as a primary image on website'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,405
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/evaluation/migrations/0007_removes_created_by.py
# Generated by Django 3.0.3 on 2020-02-27 09:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('evaluation', '0006_historicalproposalevaluation'), ] operations = [ migrations.RemoveField( model_name='callevaluation', name='created_by', ), migrations.RemoveField( model_name='callevaluation', name='modified_by', ), migrations.RemoveField( model_name='historicalproposalevaluation', name='created_by', ), migrations.RemoveField( model_name='historicalproposalevaluation', name='modified_by', ), migrations.RemoveField( model_name='proposalevaluation', name='created_by', ), migrations.RemoveField( model_name='proposalevaluation', name='modified_by', ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,406
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0024_address_fields_comments.py
# Generated by Django 2.2.6 on 2019-10-07 12:53 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('project_core', '0023_geographicalarea_name'), ] operations = [ migrations.RemoveField( model_name='organisation', name='address', ), migrations.AddField( model_name='organisation', name='city', field=models.CharField(default='street', help_text='City in which the organisation is based', max_length=100), preserve_default=False, ), migrations.AddField( model_name='organisation', name='postal_code', field=models.CharField(default='postcode', help_text='Postal code of the organisation', max_length=50), preserve_default=False, ), migrations.AddField( model_name='organisation', name='street', field=models.CharField(default='street', help_text='Street address of the organisation', max_length=1000), preserve_default=False, ), migrations.CreateModel( name='ProposalComment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('text', models.TextField(help_text='Text of a comment')), ('time', models.DateTimeField(default=django.utils.timezone.now, help_text='Date and time on which a comment was made')), ('proposal', models.ForeignKey(help_text='Proposal about which the comment was made', on_delete=django.db.models.deletion.PROTECT, to='project_core.Proposal')), ('user', models.ForeignKey(help_text='User by which the comment was made', on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='CallComment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('text', models.TextField(help_text='Text of a comment')), ('time', models.DateTimeField(default=django.utils.timezone.now, help_text='Date and time on which a comment was made')), ('call', models.ForeignKey(help_text='Call about which the comment was made', on_delete=django.db.models.deletion.PROTECT, to='project_core.Call')), ('user', models.ForeignKey(help_text='User by which the comment was made', on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), ], options={ 'abstract': False, }, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,407
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0124_financialkey_funding_instrument.py
# Generated by Django 3.0.5 on 2020-05-20 15:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0123_funding_instrument_delete_short_name_temp'), ] operations = [ migrations.AddField( model_name='financialkey', name='funding_instrument', field=models.BooleanField(default=True, help_text='This field is booked or used for a funding instrument'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,408
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/comments/migrations/0029_fixes_invoice_category_foreign_key.py
# Generated by Django 3.0.5 on 2020-05-06 14:59 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('comments', '0028_invoicecomment_invoicecommentcategory'), ] operations = [ migrations.AlterField( model_name='invoicecomment', name='category', field=models.ForeignKey(help_text='Type of comment', on_delete=django.db.models.deletion.PROTECT, to='comments.InvoiceCommentCategory'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,409
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/evaluation/migrations/0004_create_proposal_evaluation.py
# Generated by Django 3.0.3 on 2020-02-18 12:06 import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0104_delete_colour'), ('evaluation', '0003_rename_reviewer_field_to_user'), ] operations = [ migrations.AlterField( model_name='reviewer', name='calls', field=models.ManyToManyField(blank=True, to='project_core.Call'), ), migrations.CreateModel( name='ProposalEvaluation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('final_mark', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(10)])), ('allocated_budget', models.DecimalField(blank=True, decimal_places=2, help_text='Allocated budget', max_digits=10, null=True, validators=[django.core.validators.MinValueValidator(0)])), ('panel_remarks', models.TextField(blank=True, null=True)), ('feedback_to_applicant', models.TextField(blank=True, null=True)), ('panel_recommendation', models.CharField(choices=[('Fund', 'Fund'), ('Reserve', 'Reserve'), ('NotFund', 'Do not fund')], max_length=7)), ('board_decision', models.CharField(choices=[('Fund', 'Fund'), ('NotFund', 'NotFund')], max_length=7)), ('decision_date', models.DateField(blank=True, null=True)), ('proposal', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='project_core.Proposal')), ], ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,410
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/colours/forms.py
from django.forms import ModelForm, TextInput from .models import Colour class ColourForm(ModelForm): class Meta: model = Colour fields = '__all__' widgets = { 'hex_code': TextInput(attrs={'type': 'color'}), }
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,411
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0154_callpartfile.py
# Generated by Django 3.1.4 on 2021-01-05 15:38 import django.core.validators from django.db import migrations, models import django.db.models.deletion import project_core.models import project_core.utils.utils import storages.backends.s3boto3 class Migration(migrations.Migration): dependencies = [ ('project_core', '0153_auto_20201223_call_question_call_parts'), ] operations = [ migrations.CreateModel( name='CallPartFile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('name', models.CharField(help_text='Name of the file', max_length=64)), ('description', models.CharField(help_text='Description of this file', max_length=512)), ('file', models.FileField(storage=storages.backends.s3boto3.S3Boto3Storage(), upload_to=project_core.models.call_part_file_rename, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['pdf', 'docx', 'odt', 'jpg', 'jpeg', 'png']), project_core.utils.utils.file_size_validator])), ('call_part', models.ForeignKey(help_text='Call part that this file belongs to', on_delete=django.db.models.deletion.PROTECT, to='project_core.callpart')), ], options={ 'abstract': False, }, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,412
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0148_make_keywords_in_general_information_question_mandatory.py
# Generated by Django 3.0.10 on 2020-12-03 14:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0147_add_field_to_enable_disable_keywords_question_general_information'), ] operations = [ migrations.AlterField( model_name='call', name='keywords_in_general_information_question', field=models.BooleanField(default=True, help_text='True if we want to ask the keywords in the general section'), ), migrations.AlterField( model_name='historicalcall', name='keywords_in_general_information_question', field=models.BooleanField(default=True, help_text='True if we want to ask the keywords in the general section'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,413
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0098_required_question.py
# Generated by Django 2.2.6 on 2019-12-05 11:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_core', '0097_physicalperson_phd_date'), ] operations = [ migrations.AddField( model_name='callquestion', name='answer_required', field=models.BooleanField(default=True, help_text='True if the answer is required'), ), migrations.AddField( model_name='templatequestion', name='answer_required', field=models.BooleanField(default=True, help_text='True if the answer is required'), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,414
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/tests/views/logged/test_funding_instruments.py
from django.http import HttpRequest from django.test import Client from django.test import TestCase from django.urls import reverse from project_core.tests import database_population class CallListTest(TestCase): def setUp(self): self._user = database_population.create_management_user() self._funding_instrument = database_population.create_funding_instrument() self._client_management = database_population.create_management_logged_client() def test_load_funding_instrument_add(self): login = self._client_management.login(username='unittest_management', password='12345', request=HttpRequest()) self.assertTrue(login) response = self._client_management.get(reverse('logged-funding-instrument-add')) self.assertEqual(response.status_code, 200) def test_load_funding_instruments_list(self): response = self._client_management.get(reverse('logged-funding-instrument-list')) self.assertEqual(response.status_code, 200) def test_load_funding_instrument_update_get(self): response = self._client_management.get(reverse('logged-funding-instrument-update', kwargs={'pk': self._funding_instrument.id})) self.assertEqual(response.status_code, 200) self.assertContains(response, self._funding_instrument.long_name) def test_load_funding_instrument_detail(self): response = self._client_management.get(reverse('logged-funding-instrument-detail', kwargs={'pk': self._funding_instrument.id})) self.assertEqual(response.status_code, 200) self.assertContains(response, self._funding_instrument.long_name)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,415
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/comments/migrations/0028_invoicecomment_invoicecommentcategory.py
# Generated by Django 3.0.5 on 2020-05-06 13:54 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('grant_management', '0027_bblog_post_text'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('comments', '0027_improve_paths_object_storage_for_comment_attachments'), ] operations = [ migrations.CreateModel( name='InvoiceCommentCategory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('category', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='comments.Category')), ], options={ 'verbose_name_plural': 'Invoice Comment Categories', }, ), migrations.CreateModel( name='InvoiceComment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, help_text='Date and time at which the entry was created')), ('modified_on', models.DateTimeField(auto_now=True, help_text='Date and time at which the entry was modified', null=True)), ('text', models.TextField(help_text='Comment text')), ('category', models.ForeignKey(help_text='Type of comment', on_delete=django.db.models.deletion.PROTECT, to='comments.CallEvaluationCommentCategory')), ('created_by', models.ForeignKey(blank=True, help_text='User by which the entry was created', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='comments_invoicecomment_created_by_related', to=settings.AUTH_USER_MODEL)), ('invoice', models.ForeignKey(help_text='Call Evaluation about which the comment was made', on_delete=django.db.models.deletion.PROTECT, to='grant_management.Invoice')), ], options={ 'unique_together': {('invoice', 'created_on', 'created_by')}, }, ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,416
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/grant_management/migrations/0039_medium_copyright_charfield.py
# Generated by Django 3.0.5 on 2020-05-12 13:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('grant_management', '0038_medium_descriptive_text'), ] operations = [ migrations.AlterField( model_name='medium', name='copyright', field=models.CharField(blank=True, help_text='Owner of copyright if it is not the photographer (e.g. institution)', max_length=1024, null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,417
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/urls.py
from django.conf import settings from django.contrib.auth import views as auth_views from django.contrib.auth.forms import AuthenticationForm from django.views.generic.edit import CreateView from django.urls import include, path from django.views.defaults import server_error from django.views.i18n import JavaScriptCatalog from django_otp.forms import OTPAuthenticationForm import project_core.views.common.proposal_pdf import project_core.views.common.proposal_zip import project_core.views.logged.financial_key import project_core.views.logged.proposals_export_to_csv_summary import project_core.views.logged.proposals_export_to_excel import project_core.views.logged.proposals_export_to_zip import project_core.views.logged.user from .views import common from .views import external from .views import logged if settings.ALLOWED_HOSTS[0] == "projects.swisspolar.ch": authentication_form = OTPAuthenticationForm else: authentication_form = AuthenticationForm urlpatterns = [ path('', external.homepage.Homepage.as_view(), name='homepage'), path(f'{settings.ADMIN_URL}jsi18n/', JavaScriptCatalog.as_view(), name='javascript-jsi18n'), path('applicant/calls-list/', external.call.CallList.as_view(), name='call-list'), path('applicant/proposal/add/', external.proposal.ProposalView.as_view(), name='proposal-add'), path('applicant/proposal/<uuid:uuid>/update/', external.proposal.ProposalView.as_view(), name='proposal-update'), path('proposal/<uuid:uuid>/', external.proposal.ProposalDetailView.as_view(), name='proposal-detail'), path('proposal/thank-you/<uuid:uuid>/', external.proposal.ProposalThankYouView.as_view(), name='proposal-thank-you'), path('applicant/proposal/cannot-modify/', external.proposal.ProposalCannotModify.as_view(), name='proposal-cannot-modify'), path('proposal/<uuid:uuid>/pdf', common.proposal_pdf.ProposalDetailViewPdf.as_view(), name='proposal-detail-pdf'), path('proposal/<uuid:uuid>/zip', common.proposal_zip.ProposalDetailViewZip.as_view(), name='proposal-detail-zip'), path('proposal/question_answer/file/<int:proposal_qa_file_id>/<str:md5>/', common.proposal.ProposalQuestionAnswerFileView.as_view(), name='proposal-question-answer-file'), path('logged/proposals/', logged.proposal.ProposalList.as_view(), name='logged-proposal-list'), path('logged/proposal/preview/', logged.proposal.ProposalPreview.as_view(), name='logged-proposal-preview'), path('logged/proposal/<int:pk>/update/', logged.proposal.ProposalView.as_view(), name='logged-proposal-update'), path('logged/proposal/<int:pk>/', logged.proposal.ProposalDetailView.as_view(), name='logged-proposal-detail'), path('logged/proposal/<int:pk>/comment/add/', logged.proposal.ProposalCommentAdd.as_view(), name='logged-proposal-comment-add'), path('logged/proposals/export/excel/<int:call>/', logged.proposals_export_to_excel.ProposalsExportExcel.as_view(), name='logged-export-proposals-for-call-excel'), path('logged/proposals/export/csv/summary/<int:call>/', logged.proposals_export_to_csv_summary.ProposalsExportCsvSummary.as_view(), name='logged-export-proposals-csv-summary-call'), path('logged/proposals/export/csv/summary/<int:call>/', logged.proposals_export_to_csv_summary.ProposalsExportCsvSummary.as_view(), name='logged-export-proposals-csv-summary-call'), path('logged/proposals/export/zip/<int:call>/', logged.proposals_export_to_zip.ProposalsExportZip.as_view(), name='logged-export-proposals-zip-call'), path('logged/proposals/export/csv/summary/', logged.proposals_export_to_csv_summary.ProposalsExportCsvSummary.as_view(), name='logged-export-proposals-csv-summary-all'), path('logged/proposals/export/zip/', logged.proposals_export_to_zip.ProposalsExportZip.as_view(), name='logged-export-proposals-zip-all'), path('logged/call/list/', logged.call.CallList.as_view(), name='logged-call-list'), path('logged/call/add/', logged.call.CallView.as_view(), name='logged-call-add'), path('logged/call/<int:pk>/update/', logged.call.CallView.as_view(), name='logged-call-update'), path('logged/call/<int:pk>/copy/', logged.call.CallCopy.as_view(), name='logged-call-copy'), path('logged/call/<int:call_id>/list_proposals/', logged.call.ProposalList.as_view(), name='logged-call-list-proposals'), path('logged/call/proposal/<int:pk>/', logged.call.ProposalDetail.as_view(), name='logged-call-proposal-detail'), path('logged/call/proposal/<int:pk>/edit/files/', logged.proposal.ProposalUpdateFiles.as_view(), name='logged-call-proposal-detail-update-files'), path('logged/call/<int:pk>/comment/add/', logged.call.CallCommentAdd.as_view(), name='logged-call-comment-add'), path('logged/call/<int:pk>/', logged.call.CallDetailView.as_view(), name='logged-call-detail'), path('logged/calls/', logged.call.CallList.as_view(), name='logged-calls'), # Call Parts path('logged/call/<int:call_pk>/parts/list/', logged.call_part.CallPartList.as_view(), name='logged-call-part-list'), path('logged/call/<int:call_pk>/parts/add/', logged.call_part.CallPartCreate.as_view(), name='logged-call-part-add'), path('logged/call/<int:call_pk>/parts/<int:call_part_pk>/update/', logged.call_part.CallPartUpdate.as_view(), name='logged-call-part-update'), path('logged/call/<int:call_pk>/parts/<int:call_part_pk>/', logged.call_part.CallPartDetail.as_view(), name='logged-call-part-detail'), path('logged/call/call_part/delete/', logged.call_part.CallPartDelete.as_view(), name='logged-call-part-delete'), # Call (part) Files path('logged/call/<int:call_pk>/file/<int:call_file_pk>/', logged.call_part_file.CallFileView.as_view(), name='logged-call-part-file-detail'), path('logged/call/<int:call_pk>/part/<int:call_part_pk>/file/list', logged.call_part_file.CallPartFileList.as_view(), name='logged-call-part-file-list'), path('logged/call/<int:call_pk>/file/<int:call_file_pk>/update/', logged.call_part_file.CallPartFileUpdate.as_view(), name='logged-call-part-file-update'), path('logged/call/<int:call_pk>/call_part/<int:call_part_pk>/file/add/', logged.call_part_file.CallPartFileCreate.as_view(), name='logged-call-part-file-add'), path('logged/call/call_part/file/delete/', logged.call_part_file.CallPartFileDelete.as_view(), name='logged-call-part-file-delete'), # Call (part) Questions path('logged/call/<int:call_pk>/question/<int:call_question_pk>/', logged.call_question.CallPartQuestionView.as_view(), name='logged-call-part-question-detail'), path('logged/call/<int:call_pk>/question/<int:call_question_pk>/update/', logged.call_question.CallPartQuestionUpdate.as_view(), name='logged-call-part-question-update'), path('logged/call/<int:call_pk>/question/<int:call_part_pk>/add/', logged.call_question.CallPartQuestionTemplateQuestionUpdate.as_view(), name='logged-call-part-question-add'), path('logged/', logged.homepage.Homepage.as_view(), name='logged-homepage'), path('logged/news/', logged.news.News.as_view(), name='logged-news'), path('logged/template_question/add/', logged.template_question.TemplateQuestionCreateView.as_view(), name='logged-template-question-add'), path('logged/template_question/<int:pk>/', logged.template_question.TemplateQuestionDetailView.as_view(), name='logged-template-question-detail'), path('logged/template_question/<int:pk>/update/', logged.template_question.TemplateQuestionUpdateView.as_view(), name='logged-template-question-update'), path('logged/template_questions/', logged.template_question.TemplateQuestionList.as_view(), name='logged-template-question-list'), path('logged/funding_instrument/add/', logged.funding_instrument.FundingInstrumentView.as_view(), name='logged-funding-instrument-add'), path('logged/funding_instrument/<int:pk>/', logged.funding_instrument.FundingInstrumentDetailView.as_view(), name='logged-funding-instrument-detail'), path('logged/funding_instrument/<int:pk>/update/', logged.funding_instrument.FundingInstrumentView.as_view(), name='logged-funding-instrument-update'), path('logged/funding_instruments/', logged.funding_instrument.FundingInstrumentList.as_view(), name='logged-funding-instrument-list'), path('logged/person_position/add/', logged.person_position.PersonPositionCreateView.as_view(), name='logged-person-position-add'), path('logged/person_position/<int:pk>/', logged.person_position.PersonPositionDetailView.as_view(), name='logged-person-position-detail'), path('logged/person_position/<int:pk>/update/', logged.person_position.PersonPositionUpdateView.as_view(), name='logged-person-position-update'), path('logged/person_position/list/', logged.person_position.PersonPositionListView.as_view(), name='logged-person-position-list'), path('logged/lists/', logged.lists.ListsView.as_view(), name='logged-lists'), path('logged/project/list/', logged.project.ProjectList.as_view(), name='logged-project-list'), path('logged/project/<int:pk>/', logged.project.ProjectDetailView.as_view(), name='logged-project-detail'), path('logged/project/<int:pk>/comment/add/', logged.project.ProjectCommentAdd.as_view(), name='logged-project-comment-add'), path('logged/financial_keys/list/', logged.financial_key.FinancialKeyListView.as_view(), name='logged-financial-key-list'), path('logged/financial_keys/add/', logged.financial_key.FinancialKeyAdd.as_view(), name='logged-financial-key-update'), path('logged/user/list', logged.user.UserListView.as_view(), name='logged-user-list'), path('logged/user/add', logged.user.UserAdd.as_view(), name='logged-user-add'), path('logged/user/<int:pk>/', logged.user.UserDetailView.as_view(), name='logged-user-detail'), path('logged/user/edit/<int:pk>/', logged.user.UserUpdate.as_view(), name='logged-user-update'), path('accounts/login/', auth_views.LoginView.as_view(template_name='registration/login.tmpl', extra_context={'contact': settings.LOGIN_CONTACT}, authentication_form=authentication_form ), name='accounts-login'), path('accounts/applicant/login/', auth_views.LoginView.as_view(template_name='registration/login_applicant.tmpl', extra_context={'contact': settings.LOGIN_CONTACT}, authentication_form=AuthenticationForm ), name='applicant-login'), path('accounts/password_reset/', auth_views.PasswordResetView.as_view(template_name='registration/password_reset.html'), name='password_reset'), path('accounts/password_reset/done/', auth_views.PasswordResetDoneView.as_view(template_name='registration/password_done.html'), name='password_reset_done'), path('accounts/reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='registration/password_confirm.html'), name='password_reset_confirm'), path('accounts/reset/done/', auth_views.PasswordResetCompleteView.as_view(template_name='registration/password_complete.html'), name='password_reset_complete'), path('accounts/', include('django.contrib.auth.urls')), path('register/', CreateView.as_view( template_name='registration/register.tmpl', form_class=external.user_creation.UserCreationForm, success_url='/register/done', extra_context={'contact': settings.LOGIN_CONTACT}, ), name='register' ), path('register/done', external.homepage.Register.as_view(), name='register-done'), path('autocomplete/organisations/', common.autocomplete.OrganisationsAutocomplete.as_view(create_field='name'), name='autocomplete-organisation-names'), path('autocomplete/keywords/', common.autocomplete.KeywordsAutocomplete.as_view(create_field='name'), name='autocomplete-keywords'), path('logged/autocomplete/tags/', common.autocomplete.TagAutocomplete.as_view(create_field='name'), name='logged-autocomplete-tag'), path('logged/autocomplete/physical_people/', logged.autocomplete.PhysicalPersonAutocomplete.as_view(), name='logged-autocomplete-physical-people'), path('logged/autocomplete/physical_people/non_reviewers', logged.autocomplete.PhysicalPersonNonAutocompleteReviewers.as_view(), name='logged-autocomplete-physical-people-non-reviewers'), path('logged/autocomplete/person_positions/', logged.autocomplete.PersonPositionsAutocomplete.as_view(), name='logged-autocomplete-person-positions'), path('raises500/', server_error), path('api/v1/logged/', logged.project.ProjectLoggedAPI.as_view(), name='project-logged-api'), path('api/v1/project/list/', logged.project.ProjectListAPI.as_view(), name='project-list-api'), path('api/v1/project/list/<uuid:uuid>/', logged.project.ProjectDetailAPI.as_view(), name='project-list-api'), path('api/v1/geographical/list/', logged.project.GeographicalListAPI.as_view(), name='geographical-list-api'), path('api/v1/fundinginstrument/list/', logged.project.FundingInstrumentListAPI.as_view(), name='fonding-list-api'), path('api/v1/trace/list/', logged.project.TraceListAPI.as_view(), name='fonding-list-api'), path('api/v1/trace/<int:id>', logged.project.TraceDetailAPI.as_view(), name='fonding-list-api'), path('api/v1/media_gallery', logged.project.ProjectMediaGalleryAPI.as_view(), name='project-logged-api'), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,418
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/tests/views/logged/test_call_question.py
from django.test import TestCase from django.urls import reverse from project_core.tests import database_population class CallQuestionTest(TestCase): def setUp(self): self._call = database_population.create_call() self._call_part = database_population.create_call_part(self._call) self._call_part_question = database_population.create_call_question(self._call_part) self._client_management = database_population.create_management_logged_client() def test_details(self): response = self._client_management.get( reverse('logged-call-part-question-detail', kwargs={'call_pk': self._call.pk, 'call_question_pk': self._call_part_question.pk })) self.assertEqual(response.status_code, 200) self.assertContains(response, self._call_part_question.question_text)
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,419
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/migrations/0064_countryuid_nullable.py
# Generated by Django 2.2.6 on 2019-10-23 06:50 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0063_geographicalarea_uid_nullable'), ] operations = [ migrations.AlterField( model_name='country', name='uid', field=models.ForeignKey(blank=True, help_text='UID of country name', null=True, on_delete=django.db.models.deletion.PROTECT, to='project_core.CountryUid'), ), migrations.AlterField( model_name='geographicalarea', name='uid', field=models.ForeignKey(blank=True, help_text='UID of a geographical area', null=True, on_delete=django.db.models.deletion.PROTECT, to='project_core.GeographicalAreaUid'), ), migrations.AlterField( model_name='organisation', name='uid', field=models.ForeignKey(help_text='UID of a country', on_delete=django.db.models.deletion.PROTECT, to='project_core.OrganisationUid'), ), migrations.AlterField( model_name='source', name='description', field=models.TextField(blank=True, help_text='Description of the source eg. URL, version', null=True), ), ]
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}
55,420
Swiss-Polar-Institute/project-application
refs/heads/master
/ProjectApplication/project_core/views/common/proposal_pdf.py
import logging import pdfkit from django.http import HttpResponse from django.urls import reverse from django.views import View from project_core.models import Proposal logger = logging.getLogger('project_core') def create_pdf_for_proposal(proposal, request): url = reverse('proposal-detail', kwargs={'uuid': proposal.uuid}) url = request.build_absolute_uri(url) if url.startswith('http://testserver/'): url = url.replace('http://testserver/', 'http://localhost:9998/', 1) options = { 'page-size': 'A4', 'margin-top': '0.75in', 'margin-right': '0.75in', 'margin-bottom': '0.95in', 'margin-left': '0.75in', 'encoding': "UTF-8", 'minimum-font-size': "12" } return pdfkit.from_url(url, options=options, verbose=True) class ProposalDetailViewPdf(View): def get(self, request, *args, **kwargs): proposal = Proposal.objects.get(uuid=kwargs['uuid']) proposal_pdf = create_pdf_for_proposal(proposal, request) response = HttpResponse(content_type='application/pdf') response['Content-Disposition'] = f'attachment; filename="{proposal.file_name()}.pdf' response.write(proposal_pdf) return response
{"/ProjectApplication/project_core/forms/call.py": ["/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/call_part_file.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/grant_management/tests/test_models.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/variable_templates/tests/database_population.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/financial_key.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/views/logged/test_proposal.py": ["/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/views/logged/__init__.py"], "/ProjectApplication/project_core/tests/templatetags/test_short_filename_from_path.py": ["/ProjectApplication/project_core/templatetags/filename_from_path.py"], "/ProjectApplication/project_core/forms/proposal.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/fields.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/templatetags/thousands_separator.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/comments/tests/forms/test_comment.py": ["/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/variable_templates/tests/test_utils.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/models.py": ["/ProjectApplication/project_core/utils/SpiS3Boto3Storage.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/evaluation/admin.py": ["/ProjectApplication/evaluation/models.py"], "/ProjectApplication/project_core/utils/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/contacts.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py", "/ProjectApplication/project_core/utils/orcid.py"], "/ProjectApplication/project_core/management/commands/deleteunusedexternalkeywords.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/views/logged/call.py": ["/ProjectApplication/project_core/views/logged/funding_instrument.py", "/ProjectApplication/project_core/views/common/proposal.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/project_core/forms/postal_address.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/colours/admin.py": ["/ProjectApplication/colours/forms.py", "/ProjectApplication/colours/models.py"], "/ProjectApplication/project_core/forms/utils.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/management/commands/importorganisations.py": ["/ProjectApplication/project_core/management/commands/createorganisationnames.py"], "/ProjectApplication/comments/tests/forms/test_attachment.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/comments/tests/test_utils.py": ["/ProjectApplication/comments/forms/attachment.py", "/ProjectApplication/comments/forms/comment.py", "/ProjectApplication/comments/models.py"], "/ProjectApplication/grant_management/admin.py": ["/ProjectApplication/grant_management/models.py"], "/ProjectApplication/evaluation/forms/proposal_evaluation.py": ["/ProjectApplication/evaluation/models.py", "/ProjectApplication/evaluation/utils.py"], "/ProjectApplication/project_core/forms/call_part.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/tests/templatetags/test_ordinal.py": ["/ProjectApplication/project_core/templatetags/ordinal.py"], "/ProjectApplication/variable_templates/forms/template_variables.py": ["/ProjectApplication/variable_templates/models.py"], "/ProjectApplication/project_core/forms/funding_instrument.py": ["/ProjectApplication/project_core/models.py"], "/ProjectApplication/project_core/forms/partners.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/orcid.py", "/ProjectApplication/project_core/utils/utils.py"], "/ProjectApplication/project_core/forms/person.py": ["/ProjectApplication/project_core/forms/utils.py", "/ProjectApplication/project_core/utils/utils.py", "/ProjectApplication/project_core/widgets.py"], "/ProjectApplication/colours/forms.py": ["/ProjectApplication/colours/models.py"], "/ProjectApplication/grant_management/views.py": ["/ProjectApplication/grant_management/forms/close_project.py", "/ProjectApplication/grant_management/forms/datasets.py", "/ProjectApplication/grant_management/forms/locations.py", "/ProjectApplication/grant_management/forms/co_investigators.py", "/ProjectApplication/grant_management/forms/media.py", "/ProjectApplication/grant_management/forms/project.py"]}