Faktura is a simple Django app to conduct Web-based invoice generation and evidence.
For generating PDF we use https://wkhtmltopdf.org/ package. Make sure you have installed it in your OS. Package installation will also download and install https://github.com/incuna/django-wkhtmltopdf.
Install django-faktura via pip:
pip install django-faktura
Add "faktura" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'wkhtmltopdf', # Dependency for PDF generation 'faktura', ]
Include the polls URLconf in your project urls.py like this:
path('invoices/', include('faktura.urls')),
Run python manage.py migrate to create the faktura models.
Start the development server and visit http://127.0.0.1:8000/admin/ to manage your invoices (you'll need the Admin app enabled).
Visit http://127.0.0.1:8000/invoices/ to view the invoices list.
In order to generate invoice PDF with wkhtmltopdf, make sure your project has STATIC_ROOT set. If STATIC_ROOT is not set PDF generation will fail with AttributeError (#15).
In order to run tests execute command:
python setup.py test
We do have additional requirements for running tests in multiple Python and Django environments via TOX. Install them (into your virtualenv):
pip install -r requirements-test.txt
To run complex test suite via TOX, execute command:
tox
I did this app because SPy o.z. (non profit supporting Slovak Python community) needed something for invoice evidence. I like to program and I wanted to try design a clean Django app and learn one or two things about testing stand alone app and packaging.
You can use my refferal link: https://m.do.co/c/18b211fa1d99 and create account with Digital Ocean and get $50 credit, and you'll help me out to cover my hosting costs.
If you like what I do (stuff like this django app, or my role in community), you can buy me a coffee:
If you use this app for your business consider makeing a recurent donation: