Skip to content

constantinp2022/documentExporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

document Exporter

How to install

  1. Install python (version 3 was tested)
  2. Install django and all the requirements
cd web_interface
python3 -m pip install -r requirements.txt
  1. Install libreoffice
sudo apt install libreoffice -y
  1. Make the migrations
python3 manage.py makemigrations
  1. Migrate
python3 manage.py migrate
  1. Start the app
python3 manage.py runserver

Point 4.and 5. are for DB




Few tips

  1. Start the app at certain port:
python3 manage.py runserver 127.0.0.1:8000
  1. Start the app and run it in backgroud even after closing ssh session
nohup python3 manage.py runserver 127.0.0.1:8000 &
  1. Close the background task by
kill -9 $pid
  1. $pid variable is just the process id you could find it by running:
ps -ef | grep manage.py

How a template looks like

A template is any docx file. For example teamplate.docx that contain:

Hi {{ employee.first_name }}

It will generate a generated_document.docx/pdf

Hi John

If the Employee first name is John in DB


What it is?

It is a web interface to generate docx/pdf for employees starting from a base template and filling automatically data from a database

What database it uses

At the moment in settings is set up to save in SQLite which is just a local

About

Document Exporter in Python based on DocxTemplate with Django

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors