diff --git a/journals/migrations/0105_auto_20210114_1555.py b/journals/migrations/0105_auto_20210114_1555.py new file mode 100644 index 0000000000000000000000000000000000000000..237ec24cde6bffafccf055336554ecc4ec5e9282 --- /dev/null +++ b/journals/migrations/0105_auto_20210114_1555.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.16 on 2021-01-14 14:55 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('journals', '0104_auto_20201026_2144'), + ] + + operations = [ + migrations.AlterField( + model_name='volume', + name='doi_label', + field=models.CharField(db_index=True, max_length=200, unique=True, validators=[django.core.validators.RegexValidator('^((SciPost)[a-zA-Z]+|(MigPol))\\.\\w$', 'Only expressions with regex ((SciPost)[a-zA-Z]+|(MigPol))\\.\\w are allowed.')]), + ), + ] diff --git a/journals/regexes.py b/journals/regexes.py index 299c6f619c5c2cd96df16815e54a312427f22efe..cf08477da84d051ba39d7dc9b3ddd0336c7f97ce 100644 --- a/journals/regexes.py +++ b/journals/regexes.py @@ -4,7 +4,7 @@ __license__ = "AGPL v3" JOURNAL_DOI_LABEL_REGEX = r'(SciPost)[a-zA-Z]+|(MigPol)' -VOLUME_DOI_LABEL_REGEX = r'({}\.\w)'.format(JOURNAL_DOI_LABEL_REGEX) +VOLUME_DOI_LABEL_REGEX = r'({})\.\w'.format(JOURNAL_DOI_LABEL_REGEX) ISSUE_DOI_LABEL_REGEX = r'({})\.\w+(\.[0-9]+)?'.format(JOURNAL_DOI_LABEL_REGEX) diff --git a/scipost/management/commands/export_Fellows.py b/scipost/management/commands/export_Fellows.py new file mode 100644 index 0000000000000000000000000000000000000000..b6520b8fb098bd32230dfaa1e179bbd7ae8d3b09 --- /dev/null +++ b/scipost/management/commands/export_Fellows.py @@ -0,0 +1,33 @@ +__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" +__license__ = "AGPL v3" + + +import csv +from datetime import datetime + +from django.core.management.base import BaseCommand + +from colleges.models import Fellowship + + +class Command(BaseCommand): + """ + Use this command to export the (currently active, non-guest) Fellows table. + """ + + def handle(self, *args, **kwargs): + # File variables + filename = 'export_%s_active_Fellows.csv' % datetime.now().strftime('%Y_%m_%d') + filename = filename.replace(' ', '_') + + # Query + queryset = Fellowship.objects.active().filter(guest=False) + + # Open + write the file + with open(filename, 'w') as _file: + for f in queryset.all(): + aff = f.contributor.profile.affiliations.first() + aff_text = '' + if aff: + aff_text = str(aff.organization) + ', ' + aff.organization.country.name + print(f, ',', f.contributor.profile.email, ',', aff_text, file=_file) diff --git a/scipost/templates/scipost/bare_base.html b/scipost/templates/scipost/bare_base.html index 38e6b07a6538e3e7e72e9365d8971c6511b28821..78728b040251cb8c670470915e271a62a1645adb 100644 --- a/scipost/templates/scipost/bare_base.html +++ b/scipost/templates/scipost/bare_base.html @@ -9,7 +9,6 @@ {% render_bundle 'vendors~homepage~main~qr' %} {% render_bundle 'vendors~apimail~main' %} - {% render_bundle 'vendors~main' %} {% render_bundle 'main' %} <link rel="shortcut icon" href="{% static 'scipost/images/scipost_favicon.png' %}"/> diff --git a/start_celery.sh b/start_celery.sh index be2a9fa161d765cf7dad210f16bf5a109ff7bfcb..1dc80af43b75c77b57b17a3a1ef5ca1fb76bdf80 100755 --- a/start_celery.sh +++ b/start_celery.sh @@ -1,13 +1,13 @@ #!/bin/bash pkill -f bin/celery -cd /home/scipost/SciPost && source ../venv-3.8.5/bin/activate +cd /home/scipost/SciPost && source venv-3.8.5/bin/activate mkdir -p /home/scipost/SciPost_logs touch /home/scipost/SciPost_logs/celery_worker.log touch /home/scipost/SciPost_logs/celery_beat.log touch /home/scipost/SciPost_logs/rabbitmq.log -nohup rabbitmq-server > /home/scipost/SciPost_logs/rabbitmq.log 2>&1 & +#nohup rabbitmq-server > /home/scipost/SciPost_logs/rabbitmq.log 2>&1 & nohup celery -A SciPost_v1 worker --loglevel=info -E > /home/scipost/SciPost_logs/celery_worker.log 2>&1 & nohup celery -A SciPost_v1 beat --loglevel=info --scheduler django_celery_beat.schedulers:DatabaseScheduler > /home/scipost/SciPost_logs/celery_beat.log 2>&1 &