SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 1ced2c0e authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files
parents c377d4d0 c9b3c667
No related branches found
No related tags found
No related merge requests found
# 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.')]),
),
]
...@@ -4,7 +4,7 @@ __license__ = "AGPL v3" ...@@ -4,7 +4,7 @@ __license__ = "AGPL v3"
JOURNAL_DOI_LABEL_REGEX = r'(SciPost)[a-zA-Z]+|(MigPol)' 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) ISSUE_DOI_LABEL_REGEX = r'({})\.\w+(\.[0-9]+)?'.format(JOURNAL_DOI_LABEL_REGEX)
......
__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)
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
{% render_bundle 'vendors~homepage~main~qr' %} {% render_bundle 'vendors~homepage~main~qr' %}
{% render_bundle 'vendors~apimail~main' %} {% render_bundle 'vendors~apimail~main' %}
{% render_bundle 'vendors~main' %}
{% render_bundle 'main' %} {% render_bundle 'main' %}
<link rel="shortcut icon" href="{% static 'scipost/images/scipost_favicon.png' %}"/> <link rel="shortcut icon" href="{% static 'scipost/images/scipost_favicon.png' %}"/>
......
#!/bin/bash #!/bin/bash
pkill -f bin/celery 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 mkdir -p /home/scipost/SciPost_logs
touch /home/scipost/SciPost_logs/celery_worker.log touch /home/scipost/SciPost_logs/celery_worker.log
touch /home/scipost/SciPost_logs/celery_beat.log touch /home/scipost/SciPost_logs/celery_beat.log
touch /home/scipost/SciPost_logs/rabbitmq.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 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 & nohup celery -A SciPost_v1 beat --loglevel=info --scheduler django_celery_beat.schedulers:DatabaseScheduler > /home/scipost/SciPost_logs/celery_beat.log 2>&1 &
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment