Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Update installation documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshiew committed Dec 14, 2016
1 parent b911b9a commit ddd1113
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ Configuration
---------------


Add ``djstripe`` to your ``INSTALLED_APPS``:
Add ``djstripe`` to your ``INSTALLED_APPS``. You will also need the `sites` framework enabled.:

.. code-block:: python
SITE_ID = 1
INSTALLED_APPS += [
'django.contrib.sites',
# ...,
"djstripe",
]
Add your stripe keys:
Add your Stripe keys:

.. code-block:: python
Expand Down Expand Up @@ -69,40 +73,45 @@ Add some payment plans:
`DJSTRIPE_PLANS` setting, use an `OrderedDict` from the `collections`
module in the standard library, rather than an ordinary dict.

Add to the urls.py::
Add the following to the `urlpatterns` in your `urls.py` to expose payment views and the webhook endpoint:

.. code-block:: python
url(r'^payments/', include('djstripe.urls', namespace="djstripe")),
Run the commands::
.. note:: Using the inbuilt dj-stripe views

python manage.py migrate
There must be a `base.html` template on your template loader path with `javascript` and `content` blocks present
for the dj-stripe views' templates to extend.

python manage.py djstripe_init_customers
.. code-block:: html

python manage.py djstripe_init_plans
{% block content %}{% endblock %}
{% block javascript %}{% endblock %}

If you haven't already, add JQuery and the Bootstrap 3.0.0+ JS and CSS to your base template:
If you haven't already, add JQuery and the Bootstrap 3.0.0+ JS and CSS to your base template as well:

.. code-block:: html
.. code-block:: html

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">

<!-- Latest JQuery (IE9+) -->
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<!-- Latest JQuery (IE9+) -->
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>

<!-- Latest compiled and minified JavaScript -->
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>

Also, if you don't have it already, add a javascript block to your base.html file:
Run the commands::

.. code-block:: html
python manage.py migrate

{% block javascript %}{% endblock %}
python manage.py djstripe_init_customers

python manage.py djstripe_init_plans

Running Tests
--------------
Expand Down

0 comments on commit ddd1113

Please sign in to comment.