Skip to content

Commit

Permalink
docs: more text replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
iutinvg committed Oct 17, 2015
1 parent 67ffa6b commit 6fa4159
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 85 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
_build
*.deb
.vagrant
django_couchbase.egg-info
django_cbtools.egg-info
dist
dist.sh
44 changes: 23 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
================
Django Couchbase
================
==============
Django CBTools
==============

Django Couchbase is a wrapper around `couchbase <https://pypi.python.org/pypi/couchbase>`_
Django CBTools is a wrapper around `couchbase <https://pypi.python.org/pypi/couchbase>`_
python library plus several hook to
`Sync-Gateway <http://developer.couchbase.com/mobile/develop/references/sync-gateway/rest-api/index.html>`_ API.

Expand Down Expand Up @@ -53,27 +53,29 @@ Quick Install

Install package::

pip install git+https://github.com/smarttradeapp/django_couchbase.git
pip install django-cbtools

The following configuration settings are used for the package (you can use the set below for the fast installation)::

COUCHBASE_BUCKET = 'default'
COUCHBASE_HOSTS = ['127.0.0.1']
COUCHBASE_PASSWORD = None
COUCHBASE_DESIGN = 'django_couchbase'
COUCHBASE_DESIGN = 'default'
SYNC_GATEWAY_BUCKET = 'default'
SYNC_GATEWAY_URL = 'http://127.0.0.1:4984'
SYNC_GATEWAY_ADMIN_URL = 'http://127.0.0.1:4985'
SYNC_GATEWAY_USER = "django_couchbase_admin"
SYNC_GATEWAY_PASSWORD = "django_couchbase_admin_password"
SYNC_GATEWAY_GUEST_USER = "django_couchbase_guest"
SYNC_GATEWAY_GUEST_PASSWORD = "django_couchbase_guest_password"
SYNC_GATEWAY_USER = "demo_admin"
SYNC_GATEWAY_PASSWORD = "demo_admin_password"
SYNC_GATEWAY_GUEST_USER = "demo_guest"
SYNC_GATEWAY_GUEST_PASSWORD = "demo_guest_password"

Add ``django_couchbase`` to ``INSTALLED_APPS``::
For more detals for settings see :ref:`ref-settings`.

Add ``django_cbtools`` to ``INSTALLED_APPS``::

INSTALLED_APPS = (
# ...
'django_couchbase',
'django_cbtools',
)

Create folder ``couchbase_views`` in the project root.
Expand All @@ -83,7 +85,7 @@ Testing
-------

You should create a testing couchbase bucket to run the package tests
(and further your apps tests). For example ``django_couchbase_test``.
(and further your apps tests). For example ``default_test``.

The testing bucket must contain ``test`` in the name. Otherwise some
helper functions will raise exception.
Expand All @@ -98,9 +100,9 @@ to take in account additional bucket, for example::
"server": "http://127.0.0.1:8091",
"bucket": "default"
},
"django_couchbase_test": {
"default_test": {
"server": "http://127.0.0.1:8091",
"bucket": "django_couchbase_test"
"bucket": "default_test"
}
}
}
Expand All @@ -110,15 +112,15 @@ similar file to run your own tests. If you don't it's time to create it now.
The following settings should be changed in order to run Couchbase-related tests properly:

1. ``COUCHBASE_BUCKET`` is targetted to test bucket
1. ``SYNC_GATEWAY_BUCKET`` is targetted to test bucket
2. ``COUCHBASE_STALE`` is set to disable Couchbase caching
2. ``SYNC_GATEWAY_BUCKET`` is targetted to test bucket
3. ``COUCHBASE_STALE`` is set to disable Couchbase caching

Like that, in file ``test_settings.py``::
Like that, in file ``settings_test.py``::

# ...
COUCHBASE_BUCKET = 'django_couchbase_test'
COUCHBASE_BUCKET = 'default_test'
COUCHBASE_STALE = False
SYNC_GATEWAY_BUCKET = 'django_couchbase_test'
SYNC_GATEWAY_BUCKET = 'default_test'
# ...

You will have to have at least one view-file in ``couchbase_views`` folder, ``by_channel.js``::
Expand All @@ -134,4 +136,4 @@ You will have to have at least one view-file in ``couchbase_views`` folder, ``by

Now run tests as usual for django::

python manage.py test --settings=<your-project>.test_settings django_couchbase
python manage.py test --settings=<your-project>.settings_test django_cbtools
6 changes: 3 additions & 3 deletions demo/demo/settings_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Django settings for django_couchbase_sandbox project.
Django settings for demo project.
Generated by 'django-admin startproject' using Django 1.8.3.
Expand Down Expand Up @@ -51,7 +51,7 @@
'django.middleware.security.SecurityMiddleware',
)

ROOT_URLCONF = 'django_couchbase_sandbox.urls'
ROOT_URLCONF = 'demo.urls'

TEMPLATES = [
{
Expand All @@ -69,7 +69,7 @@
},
]

WSGI_APPLICATION = 'django_couchbase_sandbox.wsgi.application'
WSGI_APPLICATION = 'demo.wsgi.application'


# Database
Expand Down
2 changes: 1 addition & 1 deletion demo/demo/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""django_couchbase_sandbox URL Configuration
"""demo URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Expand Down
2 changes: 1 addition & 1 deletion demo/demo/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
WSGI config for django_couchbase_sandbox project.
WSGI config for demo project.
It exposes the WSGI callable as a module-level variable named ``application``.
Expand Down
12 changes: 6 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
master_doc = 'index'

# General information about the project.
project = u'Django Couchbase'
project = u'Django CBTools'
copyright = u'2015, Viacheslav Iutin'
author = u'Viacheslav Iutin'

Expand Down Expand Up @@ -200,7 +200,7 @@
#html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'DjangoCouchbasedoc'
htmlhelp_basename = 'DjangoCbtoolsdoc'

# -- Options for LaTeX output ---------------------------------------------

Expand All @@ -222,7 +222,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'DjangoCouchbase.tex', u'Django Couchbase Documentation',
(master_doc, 'DjangoCbtools.tex', u'Django CBTools Documentation',
u'Viacheslav Iutin', 'manual'),
]

Expand Down Expand Up @@ -252,7 +252,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'djangocouchbase', u'Django Couchbase Documentation',
(master_doc, 'djangocbtools', u'Django CBTools Documentation',
[author], 1)
]

Expand All @@ -266,8 +266,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'DjangoCouchbase', u'Django Couchbase Documentation',
author, 'DjangoCouchbase', 'One line description of project.',
(master_doc, 'DjangoCbtools', u'Django CBTools Documentation',
author, 'DjangoCbtools', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Welcome to Django Couchbase's documentation!
============================================
Welcome to Django CBTools documentation!
========================================

Contents:

Expand Down
30 changes: 15 additions & 15 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,29 @@ Quick Install

Install package::

pip install git+https://github.com/smarttradeapp/django_couchbase.git
pip install django-cbtools

The following configuration settings are used for the package (you can use the set below for the fast installation)::

COUCHBASE_BUCKET = 'default'
COUCHBASE_HOSTS = ['127.0.0.1']
COUCHBASE_PASSWORD = None
COUCHBASE_DESIGN = 'django_couchbase'
COUCHBASE_DESIGN = 'default'
SYNC_GATEWAY_BUCKET = 'default'
SYNC_GATEWAY_URL = 'http://127.0.0.1:4984'
SYNC_GATEWAY_ADMIN_URL = 'http://127.0.0.1:4985'
SYNC_GATEWAY_USER = "django_couchbase_admin"
SYNC_GATEWAY_PASSWORD = "django_couchbase_admin_password"
SYNC_GATEWAY_GUEST_USER = "django_couchbase_guest"
SYNC_GATEWAY_GUEST_PASSWORD = "django_couchbase_guest_password"
SYNC_GATEWAY_USER = "demo_admin"
SYNC_GATEWAY_PASSWORD = "demo_admin_password"
SYNC_GATEWAY_GUEST_USER = "demo_guest"
SYNC_GATEWAY_GUEST_PASSWORD = "demo_guest_password"

For more detals for settings see :ref:`ref-settings`.

Add ``django_couchbase`` to ``INSTALLED_APPS``::
Add ``django_cbtools`` to ``INSTALLED_APPS``::

INSTALLED_APPS = (
# ...
'django_couchbase',
'django_cbtools',
)

Create folder ``couchbase_views`` in the project root.
Expand All @@ -68,7 +68,7 @@ Testing
-------

You should create a testing couchbase bucket to run the package tests
(and further your apps tests). For example ``django_couchbase_test``.
(and further your apps tests). For example ``default_test``.

The testing bucket must contain ``test`` in the name. Otherwise some
helper functions will raise exception.
Expand All @@ -83,9 +83,9 @@ to take in account additional bucket, for example::
"server": "http://127.0.0.1:8091",
"bucket": "default"
},
"django_couchbase_test": {
"default_test": {
"server": "http://127.0.0.1:8091",
"bucket": "django_couchbase_test"
"bucket": "default_test"
}
}
}
Expand All @@ -98,12 +98,12 @@ The following settings should be changed in order to run Couchbase-related tests
2. ``SYNC_GATEWAY_BUCKET`` is targetted to test bucket
3. ``COUCHBASE_STALE`` is set to disable Couchbase caching

Like that, in file ``test_settings.py``::
Like that, in file ``settings_test.py``::

# ...
COUCHBASE_BUCKET = 'django_couchbase_test'
COUCHBASE_BUCKET = 'default_test'
COUCHBASE_STALE = False
SYNC_GATEWAY_BUCKET = 'django_couchbase_test'
SYNC_GATEWAY_BUCKET = 'default_test'
# ...

You will have to have at least one view-file in ``couchbase_views`` folder, ``by_channel.js``::
Expand All @@ -119,4 +119,4 @@ You will have to have at least one view-file in ``couchbase_views`` folder, ``by

Now run tests as usual for django::

python manage.py test --settings=<your-project>.test_settings django_couchbase
python manage.py test --settings=<your-project>.settings_test django_cbtools
23 changes: 14 additions & 9 deletions docs/settings.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
.. _ref-settings:

=========================
Django-Couchbase Settings
=========================
=======================
Django-Cbtools Settings
=======================

Full list of setting Django-Cbtools recognizes.

.. warning::

Please don't use username and password from the lines below!

Full list of setting Django-Couchbase recognizes.

``COUCHBASE_BUCKET``
====================
Expand Down Expand Up @@ -44,7 +49,7 @@ A name of design document where couchbase will store the views.

An example::

COUCHBASE_DESIGN = 'django_couchbase'
COUCHBASE_DESIGN = 'design_doc_name'


``COUCHBASE_STALE``
Expand Down Expand Up @@ -101,7 +106,7 @@ The user which will be used to access the couchbase by your application.

An example::

SYNC_GATEWAY_USER = "django_couchbase_admin"
SYNC_GATEWAY_USER = "admin"


``SYNC_GATEWAY_PASSWORD``
Expand All @@ -111,7 +116,7 @@ Password for the user above.

An example::

SYNC_GATEWAY_PASSWORD = "django_couchbase_admin_password"
SYNC_GATEWAY_PASSWORD = "admin_password"


``SYNC_GATEWAY_GUEST_USER``
Expand All @@ -121,7 +126,7 @@ Guest user.

An example::

SYNC_GATEWAY_GUEST_USER = "django_couchbase_guest"
SYNC_GATEWAY_GUEST_USER = "guest"


``SYNC_GATEWAY_GUEST_PASSWORD``
Expand All @@ -131,4 +136,4 @@ Password for the user above.

An example::

SYNC_GATEWAY_GUEST_PASSWORD = "django_couchbase_guest_password"
SYNC_GATEWAY_GUEST_PASSWORD = "guest_password"

0 comments on commit 6fa4159

Please sign in to comment.