Skip to main content

preprint server

Project description

DEVELOP WITH POETRY

Install poetry. Then

poetry install
poetry run python manage.py migrate

To start the local server:

poetry run python manage.py runserver

DEPLOY WITH DOCKER

Build:

docker-compose build

Create superuser or change password:

docker-compose run web ./manage.py createsuperuser
docker-compose run web ./manage.py changepassword <username>

Run:

docker-compose up

INSTALL PIPRINTS

Install poetry then

poetry install

Customize your instance by setting environment variables in .env

copy .env.example .env

IMPORTANT: change the SECRET_KEY to some other random and secret value. If anyone knows the secret_key you are using (maybe because you are using the default), then they are able to log in your site as any user (including administrators)!

At last execute

    poetry run python manage.py collectstatic

to collect all static files in a single directory,

    poetry run python manage.py migrate

to initialize the database and

    poetry run python manage.py createsuperuser

to create a superuser in the database.

You can start a development server with:

poetry run python manage.py runserver

When using in production, use the provided WSGI script (you can configure the virtualenv to use in config.ini).

Once you have a running webserver, you can access the /admin/ page to configure everything else.

From the /admin/ interface you must create a SiteParameters object to extend the default Site object (initially called example.com).

You can create new users by filing a user request from the /request/ page then manage the request (with admin credentials) from the /person_requests/ page.

You can change a user's password with the command

    poetry run python manage.py changepassword <username>

DEVELOPMENT SERVER

Per provare il codice develop bisogna dare questi comandi (bisogna avere accesso a cvgmt@cvgmt.sns.it):

ssh -L 8080:localhost:8080 cvgmt@cvgmt.sns.it
./piprints_develop/manage.py runserver 8080

a quel punto si può aprire la pagina tramite un tunnel in locale:

http://localhost:8080

e si dovrebbe vedere un clone di cvgmt (database clonato, documenti clonati) su cui si possono fare tutte le prove che volete. Premere ctrl-C per fermare il server e ctrl-D per chiudere il tunnel.

BACKUP

Per fare un dump del database il comando che sembra funzionare e' questo:

da un lato:

python manage.py dumpdata --exclude=contenttypes --exclude=auth.Permission --exclude=admin -o mydump.json

dall'altro lato:

python manage.py flush   ## cancella il database!!
python manage.py loaddata mydump.json

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

piprints-4.0.0.tar.gz (7.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

piprints-4.0.0-py3-none-any.whl (7.2 MB view details)

Uploaded Python 3

File details

Details for the file piprints-4.0.0.tar.gz.

File metadata

  • Download URL: piprints-4.0.0.tar.gz
  • Upload date:
  • Size: 7.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-52-generic

File hashes

Hashes for piprints-4.0.0.tar.gz
Algorithm Hash digest
SHA256 2e4ce9f4c82b7094713d16934f5f51b60c7ce24ce6b22a3759c4f50f1898af06
MD5 e3ba497c04c6a73efe7dfa265d4e260a
BLAKE2b-256 43331b1555535fd21c7a97d3aabf21564c87f3cdaeff17819ac76bbc40e6ff63

See more details on using hashes here.

File details

Details for the file piprints-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: piprints-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-52-generic

File hashes

Hashes for piprints-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d39d54ba425a96b43f353492c32d80bd1cc9c532477aef904bbe5b2e8d582f13
MD5 ccd3d1f4948c781366d7c9e9805c2542
BLAKE2b-256 34ae457d63880b4152ef6188ace3387de8700f4a3ce718ba4847d1ad23dc3c2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page