Management commands

Each command can be executed by running docker-compose exec portfolio-django python <command> or if running the project locally by executing python <command> in src.

Available Commands


This command deletes all entries from Portfolio.


This action is not reversible.


This command exports published entries for a specific year as CSV. Exported CSV files can be found in src/export.


  • year - Year of the export.

  • --lang - Label language of the export. Allowed values: de and en


This command imports all entries from a BibTeX file and creates according Portfolio entries for a specific user.


This is still an experimental feature, and implementation as well as mappings of BibTeX types to Portfolio schemas might change in the future.


  • userid - the ID of the user for whom the imported entries should be created

  • file - the full path to the BibTeX file to import entries from

Usage examples

A common usage might look like

python import_bibtex 12345ABCD67890EF12AB3456CD7890F0 references.bib

This assumes the references.bib file resides in the projects src directory. But relative paths can be used as well. So in a local dev environment you might want to use something like ~/Documents/references.bib.

For a containerized setup, the easiest soultion is to copy your file into the src folder, and then execute the command via docker-compose exec:

docker-compose exec portfolio-django python import_bibtex 12345ABCD67890EF12AB3456CD7890F0 references.bib