Skip to content

Commit

Permalink
Update project's docs
Browse files Browse the repository at this point in the history
  • Loading branch information
samitnuk authored and Alexander Gaevsky committed Aug 27, 2018
1 parent b5437e2 commit 07beac0
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 10 deletions.
27 changes: 20 additions & 7 deletions README.rst
Expand Up @@ -2,16 +2,29 @@
django-oscar-invoices
=====================

How invoices are generated?
---------------------------
Quickstart
==========

In order to generate invoice it's required to create two model records:
Installation
------------

* Merchant account, ``oscar_invoices.abstract_models.AbstractLegalEntity``.
In contains shop name, seller's business name, website, email, VAT number etc.
.. code-block:: console
$ pip install django-oscar-invoices
Setup
-----

1. Add ``oscar_invoices`` to the ``INSTALLED_APPS`` variable of your
project's ``settings.py``.

2. Sync the database using ``python manage.py migrate``.

3. Create instances of ``LegalEntity`` and ``LegalEntityAddress``.

4. Integrate ``InvoiceCreator`` in your checkout process.

* Merchant address, ``oscar_invoices.abstract_models.AbstractLegalEntityAddress``. It's
quite similar to the order shipping or billing address.

By default, we generate only HTML invoice document and allow user to decide how to
generate PDF documents. You can integrate `python-pdfkit`_, `WeasyPrint`_, `xhtml2pdf`_,
Expand Down
5 changes: 3 additions & 2 deletions docs/source/index.rst
Expand Up @@ -4,10 +4,10 @@ django-oscar-invoices

In order to generate invoice it's required to create two model records:

* Merchant account, ``oscar_invoices.abstract_models.AbstractLegalEntity``.
* Merchant account, ``oscar_invoices.models.LegalEntity``.
In contains shop name, seller's business name, website, email, VAT number etc.

* Merchant address, ``oscar_invoices.abstract_models.AbstractLegalEntityAddress``. It's
* Merchant address, ``oscar_invoices.models.LegalEntityAddress``. It's
quite similar to the order shipping or billing address.

By default, we generate only HTML invoice document and allow user to decide how to
Expand All @@ -32,6 +32,7 @@ to `order_placed` signal receiver.
.. toctree::
:maxdepth: 1

quickstart
settings
storages

Expand Down
22 changes: 22 additions & 0 deletions docs/source/quickstart.rst
@@ -0,0 +1,22 @@
Quickstart
==========

Installation
------------

.. code-block:: console
$ pip install django-oscar-invoices
Setup
=====

1. Add ``oscar_invoices`` to the ``INSTALLED_APPS`` variable of your
project's ``settings.py``.

2. Sync the database using ``python manage.py migrate``.

3. Create instances of ``LegalEntity`` and ``LegalEntityAddress``.

4. Integrate ``InvoiceCreator`` in your checkout process.
2 changes: 1 addition & 1 deletion docs/source/settings.rst
Expand Up @@ -15,7 +15,7 @@ should not be publicly available (as media files).

Default: ``invoices/%Y/%m/``

The location within the ``MEDIA_ROOT`` folder that is used to store product images.
The location within the ``MEDIA_ROOT`` folder that is used to store generated invoices.
The folder name can contain date format strings as described in the `Django Docs`_.

.. _`Django Docs`: https://docs.djangoproject.com/en/stable/ref/models/fields/#filefield
Expand Down

0 comments on commit 07beac0

Please sign in to comment.