diff --git a/HISTORY.rst b/HISTORY.rst index 1584eab..6986d39 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,7 @@ History * A default urls.py is provided by the package so can work "out-of-the-box". * Default location for templates moved to ``django_cryptolock`` folder. +* Updated quickstart guide 0.0.1 (2019-11-25) ++++++++++++++++++ diff --git a/Makefile b/Makefile index 3a2516e..50a369d 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ coverage: ## check code coverage quickly with the default Python open htmlcov/index.html docs: ## generate Sphinx HTML documentation, including API docs + rm -f docs/django_cryptolock.migrations.rst rm -f docs/django-cryptolock.rst rm -f docs/modules.rst sphinx-apidoc -o docs/ django_cryptolock diff --git a/README.rst b/README.rst index 40b4a2b..50a2776 100644 --- a/README.rst +++ b/README.rst @@ -35,23 +35,33 @@ Add it to your `INSTALLED_APPS`: ... ) +Migrate your database. + Add Django-Cryptolock's URL patterns: .. code-block:: python - from django_cryptolock import urls as django_cryptolock_urls + from django.conf.urls import url urlpatterns = [ ... - url(r'^', include(django_cryptolock_urls)), + url(r"^auth/", include("django_cryptolock.urls", namespace="django_cryptolock")), ... ] +Add the following settings to your project: + +* ``django_cryptolock.backends.MoneroAddressBackend`` to your ``AUTHENTICATION_BACKENDS`` +* Set ``DJCL_MONERO_NETWORK`` with the network in use: ``mainnet``, ``stagenet`` or ``testnet`` +* Use ``MONERO_WALLET_RPC_PROTOCOL``, ``MONERO_WALLET_RPC_HOST``, ``MONERO_WALLET_RPC_USER`` and ``MONERO_WALLET_RPC_PASS`` to specify which wallet RPC should be used. + +Finaly create the templates files (``login.html`` and ``signup.html``) under a ``django_cryptolock`` subfolder. + Features -------- -* TODO +* Adds authentication based on cryptocurrency wallets a Django project. Running Tests ------------- diff --git a/docs/conf.py b/docs/conf.py index 33ab919..2bc84c1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,6 +24,14 @@ sys.path.append(parent) import django_cryptolock +# Specify settings module +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings") + +# Setup Django +import django + +django.setup() + # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. diff --git a/docs/django_cryptolock.migrations.rst b/docs/django_cryptolock.migrations.rst new file mode 100644 index 0000000..4309d4b --- /dev/null +++ b/docs/django_cryptolock.migrations.rst @@ -0,0 +1,22 @@ +django\_cryptolock.migrations package +===================================== + +Submodules +---------- + +django\_cryptolock.migrations.0001\_initial module +-------------------------------------------------- + +.. automodule:: django_cryptolock.migrations.0001_initial + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: django_cryptolock.migrations + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/django_cryptolock.rst b/docs/django_cryptolock.rst new file mode 100644 index 0000000..20669b6 --- /dev/null +++ b/docs/django_cryptolock.rst @@ -0,0 +1,85 @@ +django\_cryptolock package +========================== + +Subpackages +----------- + +.. toctree:: + + django_cryptolock.migrations + +Submodules +---------- + +django\_cryptolock.apps module +------------------------------ + +.. automodule:: django_cryptolock.apps + :members: + :undoc-members: + :show-inheritance: + +django\_cryptolock.backends module +---------------------------------- + +.. automodule:: django_cryptolock.backends + :members: + :undoc-members: + :show-inheritance: + +django\_cryptolock.forms module +------------------------------- + +.. automodule:: django_cryptolock.forms + :members: + :undoc-members: + :show-inheritance: + +django\_cryptolock.models module +-------------------------------- + +.. automodule:: django_cryptolock.models + :members: + :undoc-members: + :show-inheritance: + +django\_cryptolock.urls module +------------------------------ + +.. automodule:: django_cryptolock.urls + :members: + :undoc-members: + :show-inheritance: + +django\_cryptolock.utils module +------------------------------- + +.. automodule:: django_cryptolock.utils + :members: + :undoc-members: + :show-inheritance: + +django\_cryptolock.validators module +------------------------------------ + +.. automodule:: django_cryptolock.validators + :members: + :undoc-members: + :show-inheritance: + +django\_cryptolock.views module +------------------------------- + +.. automodule:: django_cryptolock.views + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: django_cryptolock + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules.rst b/docs/modules.rst new file mode 100644 index 0000000..e88317b --- /dev/null +++ b/docs/modules.rst @@ -0,0 +1,7 @@ +django_cryptolock +================= + +.. toctree:: + :maxdepth: 4 + + django_cryptolock diff --git a/requirements_dev.txt b/requirements_dev.txt index 7cd64b8..72e9843 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -3,3 +3,4 @@ bumpversion==0.5.3 wheel==0.30.0 twine==3.1.0 +Sphinx==2.2.1