diff --git a/commentaries/migrations/0001_initial.py b/commentaries/migrations/0001_initial.py index b9422f0527d9c9c7382df158b645d14044353d75..ae1d80b84d0195a3b141a892dc404bb595546611 100644 --- a/commentaries/migrations/0001_initial.py +++ b/commentaries/migrations/0001_initial.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Commentary', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), ('vetted', models.BooleanField(default=False)), ('type', models.CharField(max_length=9)), ('open_for_commenting', models.BooleanField(default=True)), @@ -26,18 +26,18 @@ class Migration(migrations.Migration): ('pub_date', models.DateField(verbose_name='date of original publication')), ('pub_abstract', models.TextField()), ('nr_clarity_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('clarity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_validity_ratings', models.IntegerField(default=0)), - ('validity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('validity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_rigour_ratings', models.IntegerField(default=0)), - ('rigour_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('rigour_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_originality_ratings', models.IntegerField(default=0)), - ('originality_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('originality_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_significance_ratings', models.IntegerField(default=0)), - ('significance_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('significance_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('latest_activity', models.DateTimeField(default=django.utils.timezone.now)), - ('authors', models.ManyToManyField(related_name='authors_com', to='scipost.Contributor', blank=True)), - ('requested_by', models.ForeignKey(related_name='requested_by', null=True, blank=True, to='scipost.Contributor')), + ('authors', models.ManyToManyField(related_name='authors_com', blank=True, to='scipost.Contributor')), + ('requested_by', models.ForeignKey(null=True, related_name='requested_by', blank=True, to='scipost.Contributor')), ('vetted_by', models.ForeignKey(null=True, blank=True, to='scipost.Contributor')), ], ), diff --git a/commentaries/views.py b/commentaries/views.py index 7d1db2829e0a3af79fd5e3c0f32a7673e65f7e7c..ebac4381489d09bbb29809ede8ba539060761ead 100644 --- a/commentaries/views.py +++ b/commentaries/views.py @@ -15,7 +15,7 @@ from .forms import * from comments.models import Comment, AuthorReply from comments.forms import CommentForm -from contributors.forms import TITLE_CHOICES, AuthenticationForm +from scipost.forms import TITLE_CHOICES, AuthenticationForm from ratings.forms import CommentRatingForm, AuthorReplyRatingForm, CommentaryRatingForm title_dict = dict(TITLE_CHOICES) # Convert titles for use in emails @@ -51,7 +51,7 @@ def request_commentary(request): return render(request, 'commentaries/request_commentary.html', {'form': form}) else: # user is not authenticated: form = AuthenticationForm() - return render(request, 'contributors/login.html', {'form': form}) + return render(request, 'scipost/login.html', {'form': form}) def request_commentary_ack(request): return render(request, 'commentaries/request_commentary_ack.html') diff --git a/comments/migrations/0001_initial.py b/comments/migrations/0001_initial.py index ef5ef7ddc83115d20e605a9e9a254d1ef4ab9ce4..bcbf9a1a3ec65c1928337d42324732b98840ac1d 100644 --- a/comments/migrations/0001_initial.py +++ b/comments/migrations/0001_initial.py @@ -7,30 +7,30 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ + ('commentaries', '0001_initial'), ('scipost', '0001_initial'), ('submissions', '0001_initial'), ('reports', '0001_initial'), - ('commentaries', '0001_initial'), ] operations = [ migrations.CreateModel( name='AuthorReply', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), ('status', models.SmallIntegerField(default=0)), ('reply_text', models.TextField()), ('date_submitted', models.DateTimeField(verbose_name='date submitted')), ('nr_relevance_ratings', models.IntegerField(default=0)), - ('relevance_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('relevance_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_importance_ratings', models.IntegerField(default=0)), - ('importance_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('importance_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_clarity_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('clarity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_validity_ratings', models.IntegerField(default=0)), - ('validity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('validity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_rigour_ratings', models.IntegerField(default=0)), - ('rigour_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('rigour_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('author', models.ForeignKey(to='scipost.Contributor')), ('commentary', models.ForeignKey(null=True, blank=True, to='commentaries.Commentary')), ], @@ -38,28 +38,28 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Comment', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), ('status', models.SmallIntegerField(default=0)), - ('is_rem', models.BooleanField(verbose_name='remark', default=False)), - ('is_que', models.BooleanField(verbose_name='question', default=False)), - ('is_ans', models.BooleanField(verbose_name='answer to question', default=False)), - ('is_obj', models.BooleanField(verbose_name='objection', default=False)), - ('is_rep', models.BooleanField(verbose_name='reply to objection', default=False)), - ('is_val', models.BooleanField(verbose_name='validation or rederivation', default=False)), - ('is_lit', models.BooleanField(verbose_name='pointer to related literature', default=False)), - ('is_sug', models.BooleanField(verbose_name='suggestion for further work', default=False)), + ('is_rem', models.BooleanField(default=False, verbose_name='remark')), + ('is_que', models.BooleanField(default=False, verbose_name='question')), + ('is_ans', models.BooleanField(default=False, verbose_name='answer to question')), + ('is_obj', models.BooleanField(default=False, verbose_name='objection')), + ('is_rep', models.BooleanField(default=False, verbose_name='reply to objection')), + ('is_val', models.BooleanField(default=False, verbose_name='validation or rederivation')), + ('is_lit', models.BooleanField(default=False, verbose_name='pointer to related literature')), + ('is_sug', models.BooleanField(default=False, verbose_name='suggestion for further work')), ('comment_text', models.TextField()), ('date_submitted', models.DateTimeField(verbose_name='date submitted')), ('nr_relevance_ratings', models.IntegerField(default=0)), - ('relevance_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('relevance_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_importance_ratings', models.IntegerField(default=0)), - ('importance_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('importance_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_clarity_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('clarity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_validity_ratings', models.IntegerField(default=0)), - ('validity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('validity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_rigour_ratings', models.IntegerField(default=0)), - ('rigour_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('rigour_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('author', models.ForeignKey(to='scipost.Contributor')), ('commentary', models.ForeignKey(null=True, blank=True, to='commentaries.Commentary')), ('in_reply_to', models.ForeignKey(null=True, blank=True, to='comments.Comment')), diff --git a/ratings/migrations/0001_initial.py b/ratings/migrations/0001_initial.py index e1e59bb0d9629ae7975ab45ea1c2d495dae88a73..c4d9ffa0489776e0cc120a7929effbabe61a59f5 100644 --- a/ratings/migrations/0001_initial.py +++ b/ratings/migrations/0001_initial.py @@ -7,23 +7,23 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('comments', '0001_initial'), + ('commentaries', '0001_initial'), ('scipost', '0001_initial'), ('submissions', '0001_initial'), + ('comments', '0001_initial'), ('reports', '0001_initial'), - ('commentaries', '0001_initial'), ] operations = [ migrations.CreateModel( name='AuthorReplyRating', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('relevance', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('importance', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('validity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('rigour', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), + ('relevance', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('importance', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('clarity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('authorreply', models.ForeignKey(to='comments.AuthorReply')), ('rater', models.ForeignKey(to='scipost.Contributor')), ], @@ -34,12 +34,12 @@ class Migration(migrations.Migration): migrations.CreateModel( name='CommentaryRating', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('validity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('rigour', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('originality', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('significance', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), + ('clarity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('originality', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('significance', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('commentary', models.ForeignKey(to='commentaries.Commentary')), ('rater', models.ForeignKey(to='scipost.Contributor')), ], @@ -50,12 +50,12 @@ class Migration(migrations.Migration): migrations.CreateModel( name='CommentRating', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('relevance', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('importance', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('validity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('rigour', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), + ('relevance', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('importance', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('clarity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('comment', models.ForeignKey(to='comments.Comment')), ('rater', models.ForeignKey(to='scipost.Contributor')), ], @@ -66,12 +66,12 @@ class Migration(migrations.Migration): migrations.CreateModel( name='ReportRating', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('relevance', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('importance', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('validity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('rigour', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), + ('relevance', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('importance', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('clarity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('rater', models.ForeignKey(to='scipost.Contributor')), ('report', models.ForeignKey(to='reports.Report')), ], @@ -82,12 +82,12 @@ class Migration(migrations.Migration): migrations.CreateModel( name='SubmissionRating', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('validity', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('rigour', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('originality', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), - ('significance', models.PositiveSmallIntegerField(verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), null=True, default=0)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), + ('clarity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('originality', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('significance', models.PositiveSmallIntegerField(null=True, default=0, verbose_name=((101, '-'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('rater', models.ForeignKey(to='scipost.Contributor')), ('submission', models.ForeignKey(to='submissions.Submission')), ], diff --git a/reports/migrations/0001_initial.py b/reports/migrations/0001_initial.py index 9bf888a4b444e1dc2fad05cf1cbf5bf3106358bb..63a77dfcec66f8dd61f746770d11ad1a06d29933 100644 --- a/reports/migrations/0001_initial.py +++ b/reports/migrations/0001_initial.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Report', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), ('status', models.SmallIntegerField(default=0)), ('qualification', models.PositiveSmallIntegerField(default=0)), ('strengths', models.TextField()), @@ -23,20 +23,20 @@ class Migration(migrations.Migration): ('report', models.TextField()), ('requested_changes', models.TextField()), ('recommendation', models.SmallIntegerField(choices=[(1, 'Publish as Tier I (top 10% of papers in this journal)'), (2, 'Publish as Tier II (top 50% of papers in this journal)'), (3, 'Publish as Tier III (meets the criteria of this journal)'), (-1, 'Ask for minor revision'), (-2, 'Ask for major revision'), (-3, 'Reject')])), - ('date_invited', models.DateTimeField(verbose_name='date invited', null=True, blank=True)), + ('date_invited', models.DateTimeField(null=True, blank=True, verbose_name='date invited')), ('date_submitted', models.DateTimeField(verbose_name='date submitted')), ('nr_relevance_ratings', models.IntegerField(default=0)), - ('relevance_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('relevance_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_importance_ratings', models.IntegerField(default=0)), - ('importance_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('importance_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_clarity_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('clarity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_validity_ratings', models.IntegerField(default=0)), - ('validity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('validity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_rigour_ratings', models.IntegerField(default=0)), - ('rigour_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('rigour_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('author', models.ForeignKey(to='scipost.Contributor')), - ('invited_by', models.ForeignKey(related_name='invited_by', null=True, blank=True, to='scipost.Contributor')), + ('invited_by', models.ForeignKey(null=True, related_name='invited_by', blank=True, to='scipost.Contributor')), ('submission', models.ForeignKey(to='submissions.Submission')), ], ), diff --git a/submissions/migrations/0001_initial.py b/submissions/migrations/0001_initial.py index c3f11b855a05c445252859ad85bc7efa967c9639..937dbc227a36a45624312153b26ab1714a8fe17d 100644 --- a/submissions/migrations/0001_initial.py +++ b/submissions/migrations/0001_initial.py @@ -15,10 +15,10 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Submission', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)), + ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), ('vetted', models.BooleanField(default=False)), ('submitted_to_journal', models.CharField(max_length=30, choices=[('SciPost Physics Select', 'SciPost Physics Select'), ('SciPost Physics Letters', 'SciPost Physics Letters'), ('SciPost Physics X', 'SciPost Physics X (cross-division)'), ('SciPost Physics', 'SciPost Physics (Experimental, Theoretical and Computational)'), ('SciPost Physics Lecture Notes', 'SciPost Physics Lecture Notes')])), - ('domain', models.CharField(max_length=1, choices=[('E', 'Experimental'), ('T', 'Theoretical'), ('C', 'Computational')], default='E')), + ('domain', models.CharField(default='E', max_length=1, choices=[('E', 'Experimental'), ('T', 'Theoretical'), ('C', 'Computational')])), ('specialization', models.CharField(max_length=1, choices=[('A', 'Atomic, Molecular and Optical Physics'), ('B', 'Biophysics'), ('C', 'Condensed Matter Physics'), ('F', 'Fluid Dynamics'), ('G', 'Gravitation, Cosmology and Astroparticle Physics'), ('H', 'High-Energy Physics'), ('M', 'Mathematical Physics'), ('N', 'Nuclear Physics'), ('Q', 'Quantum Statistical Mechanics'), ('S', 'Statistical and Soft Matter Physics')])), ('status', models.SmallIntegerField(choices=[(0, 'unassigned'), (1, 'editor in charge assigned'), (2, 'under review'), (3, 'reviewed, peer checking period'), (4, 'reviewed, peer checked, editorial decision pending'), (5, 'editorial decision')])), ('open_for_reporting', models.BooleanField(default=True)), @@ -29,18 +29,18 @@ class Migration(migrations.Migration): ('arxiv_link', models.URLField(verbose_name='arXiv link (including version nr)')), ('submission_date', models.DateField(verbose_name='date of original publication')), ('nr_clarity_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('clarity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_validity_ratings', models.IntegerField(default=0)), - ('validity_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('validity_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_rigour_ratings', models.IntegerField(default=0)), - ('rigour_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('rigour_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_originality_ratings', models.IntegerField(default=0)), - ('originality_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('originality_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('nr_significance_ratings', models.IntegerField(default=0)), - ('significance_rating', models.DecimalField(decimal_places=0, max_digits=3, null=True, default=0)), + ('significance_rating', models.DecimalField(null=True, decimal_places=0, default=0, max_digits=3)), ('latest_activity', models.DateTimeField(default=django.utils.timezone.now)), - ('authors', models.ManyToManyField(related_name='authors_sub', to='scipost.Contributor', blank=True)), - ('editor_in_charge', models.ForeignKey(related_name='editor_in_charge', null=True, blank=True, to='scipost.Contributor')), + ('authors', models.ManyToManyField(related_name='authors_sub', blank=True, to='scipost.Contributor')), + ('editor_in_charge', models.ForeignKey(null=True, related_name='editor_in_charge', blank=True, to='scipost.Contributor')), ('submitted_by', models.ForeignKey(to='scipost.Contributor')), ], ), diff --git a/submissions/views.py b/submissions/views.py index b3385c921e974b286839a6de2bb73e738c440601..9ce1914ce4beead87793797c5c70fd08117cbc12 100644 --- a/submissions/views.py +++ b/submissions/views.py @@ -13,7 +13,7 @@ from .models import * from .forms import * from comments.models import Comment, AuthorReply -from contributors.models import Contributor +from scipost.models import Contributor from submissions.models import Submission from comments.forms import CommentForm