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.1.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.1-py3-none-any.whl (7.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: piprints-4.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 8cac292c21b0b50dff126947de6cc9bb13d9e8e5ca31194edc06dac4ec61781b
MD5 780323d1aca7433bd4c54bd9b2010fc1
BLAKE2b-256 d870777969c37958bf767773823e8f1a63370f9a0dd9eadde69525974d538a01

See more details on using hashes here.

File details

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

File metadata

  • Download URL: piprints-4.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ebfc2b53aba17e2b86ca9a73922fb63b6ecb16e90d0aa31b6c0bbb4ca0beebcf
MD5 caae5df84a0ad8fd85525ff102268750
BLAKE2b-256 ff7417b59893f307b73afefe816a995779fdd434c2a51124dcfc121864cb9e0e

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