[Python-modules-commits] [django-simple-captcha] 01/05: Import django-simple-captcha_0.5.0.orig.tar.gz
Brian May
bam at moszumanska.debian.org
Fri Dec 4 00:35:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
bam pushed a commit to branch master
in repository django-simple-captcha.
commit 1f67652dd2c36057028760405212c1f421866299
Author: Brian May <bam at debian.org>
Date: Fri Dec 4 11:14:55 2015 +1100
Import django-simple-captcha_0.5.0.orig.tar.gz
---
.pep8 | 3 +
CHANGES | 4 +-
MANIFEST.in | 5 +
PKG-INFO | 2 +-
captcha/__init__.py | 2 +-
django_simple_captcha.egg-info/PKG-INFO | 2 +-
django_simple_captcha.egg-info/SOURCES.txt | 109 +-
docs/.DS_Store | Bin 0 -> 6148 bytes
docs/Makefile | 89 +
docs/_build/doctrees/advanced.doctree | Bin 0 -> 31619 bytes
docs/_build/doctrees/environment.pickle | Bin 0 -> 15936 bytes
docs/_build/doctrees/index.doctree | Bin 0 -> 9242 bytes
docs/_build/doctrees/usage.doctree | Bin 0 -> 20599 bytes
docs/_build/html/.buildinfo | 4 +
docs/_build/html/.doctrees/advanced.doctree | Bin 0 -> 45903 bytes
docs/_build/html/.doctrees/environment.pickle | Bin 0 -> 17394 bytes
docs/_build/html/.doctrees/index.doctree | Bin 0 -> 8370 bytes
docs/_build/html/.doctrees/usage.doctree | Bin 0 -> 21586 bytes
docs/_build/html/_images/captcha3.png | Bin 0 -> 9633 bytes
docs/_build/html/_images/dict.png | Bin 0 -> 7859 bytes
docs/_build/html/_images/math.png | Bin 0 -> 7491 bytes
docs/_build/html/_images/random_chars.png | Bin 0 -> 8136 bytes
docs/_build/html/_sources/advanced.txt | 244 +
docs/_build/html/_sources/index.txt | 40 +
docs/_build/html/_sources/usage.txt | 148 +
docs/_build/html/_static/ajax-loader.gif | Bin 0 -> 673 bytes
docs/_build/html/_static/basic.css | 599 ++
docs/_build/html/_static/captcha3.png | Bin 0 -> 9633 bytes
docs/_build/html/_static/classic.css | 261 +
docs/_build/html/_static/comment-bright.png | Bin 0 -> 3500 bytes
docs/_build/html/_static/comment-close.png | Bin 0 -> 3578 bytes
docs/_build/html/_static/comment.png | Bin 0 -> 3445 bytes
docs/_build/html/_static/default.css | 256 +
docs/_build/html/_static/dict.png | Bin 0 -> 7859 bytes
docs/_build/html/_static/doctools.js | 263 +
docs/_build/html/_static/down-pressed.png | Bin 0 -> 347 bytes
docs/_build/html/_static/down.png | Bin 0 -> 347 bytes
docs/_build/html/_static/file.png | Bin 0 -> 358 bytes
docs/_build/html/_static/jquery-1.11.1.js | 10308 +++++++++++++++++++
docs/_build/html/_static/jquery.js | 4 +
docs/_build/html/_static/math.png | Bin 0 -> 7491 bytes
docs/_build/html/_static/minus.png | Bin 0 -> 173 bytes
docs/_build/html/_static/plus.png | Bin 0 -> 173 bytes
docs/_build/html/_static/pygments.css | 63 +
docs/_build/html/_static/random_chars.png | Bin 0 -> 8136 bytes
docs/_build/html/_static/searchtools.js | 622 ++
docs/_build/html/_static/sidebar.js | 159 +
docs/_build/html/_static/underscore-1.3.1.js | 999 ++
docs/_build/html/_static/underscore.js | 31 +
docs/_build/html/_static/up-pressed.png | Bin 0 -> 345 bytes
docs/_build/html/_static/up.png | Bin 0 -> 345 bytes
docs/_build/html/_static/websupport.js | 808 ++
docs/_build/html/advanced.html | 317 +
docs/_build/html/genindex.html | 92 +
docs/_build/html/index.html | 156 +
docs/_build/html/objects.inv | Bin 0 -> 277 bytes
docs/_build/html/search.html | 99 +
docs/_build/html/searchindex.js | 1 +
docs/_build/html/usage.html | 269 +
docs/_static/captcha3.png | Bin 0 -> 9633 bytes
docs/_static/dict.png | Bin 0 -> 7859 bytes
docs/_static/math.png | Bin 0 -> 7491 bytes
docs/_static/random_chars.png | Bin 0 -> 8136 bytes
docs/advanced.rst | 244 +
docs/conf.py | 203 +
docs/index.rst | 40 +
docs/usage.rst | 148 +
testproject/.DS_Store | Bin 0 -> 6148 bytes
testproject/.coverage | Bin 0 -> 5116 bytes
testproject/.coveragerc | 10 +
testproject/__init__.pyc | Bin 0 -> 150 bytes
testproject/__pycache__/__init__.cpython-32.pyc | Bin 0 -> 154 bytes
testproject/__pycache__/__init__.cpython-33.pyc | Bin 0 -> 158 bytes
testproject/__pycache__/__init__.cpython-34.pyc | Bin 0 -> 146 bytes
testproject/__pycache__/forms.cpython-33.pyc | Bin 0 -> 634 bytes
testproject/__pycache__/forms.cpython-34.pyc | Bin 0 -> 436 bytes
testproject/__pycache__/settings.cpython-32.pyc | Bin 0 -> 1562 bytes
testproject/__pycache__/settings.cpython-33.pyc | Bin 0 -> 1650 bytes
testproject/__pycache__/settings.cpython-34.pyc | Bin 0 -> 1360 bytes
testproject/__pycache__/settings_17.cpython-34.pyc | Bin 0 -> 1363 bytes
testproject/__pycache__/urls.cpython-33.pyc | Bin 0 -> 524 bytes
testproject/__pycache__/urls.cpython-34.pyc | Bin 0 -> 436 bytes
testproject/__pycache__/views.cpython-33.pyc | Bin 0 -> 1081 bytes
testproject/__pycache__/views.cpython-34.pyc | Bin 0 -> 673 bytes
testproject/coverage.sh | 5 +
testproject/coverage.xml | 385 +
testproject/django-simple-captcha.db | Bin 0 -> 100352 bytes
testproject/forms.pyc | Bin 0 -> 510 bytes
...ode_django-simple-captcha_captcha___init__.html | 96 +
...jango-simple-captcha_captcha_conf___init__.html | 84 +
...jango-simple-captcha_captcha_conf_settings.html | 188 +
..._Code_django-simple-captcha_captcha_fields.html | 346 +
...Code_django-simple-captcha_captcha_helpers.html | 250 +
..._Code_django-simple-captcha_captcha_models.html | 222 +
...co_Code_django-simple-captcha_captcha_urls.html | 104 +
...o_Code_django-simple-captcha_captcha_views.html | 326 +
testproject/htmlcov/coverage_html.js | 376 +
testproject/htmlcov/index.html | 186 +
testproject/htmlcov/jquery-1.4.3.min.js | 166 +
testproject/htmlcov/jquery.hotkeys.js | 99 +
testproject/htmlcov/jquery.isonscreen.js | 53 +
testproject/htmlcov/jquery.tablesorter.min.js | 2 +
testproject/htmlcov/keybd_closed.png | Bin 0 -> 264 bytes
testproject/htmlcov/keybd_open.png | Bin 0 -> 267 bytes
testproject/htmlcov/status.dat | 309 +
testproject/htmlcov/style.css | 300 +
testproject/settings.pyc | Bin 0 -> 1458 bytes
testproject/settings_17.pyc | Bin 0 -> 1572 bytes
testproject/templates/captcha_test/image.html | 4 +
testproject/templates/home.html | 12 +
testproject/urls.pyc | Bin 0 -> 481 bytes
testproject/views.pyc | Bin 0 -> 803 bytes
tox.ini | 63 +
113 files changed, 20174 insertions(+), 6 deletions(-)
diff --git a/.pep8 b/.pep8
new file mode 100644
index 0000000..4ad0546
--- /dev/null
+++ b/.pep8
@@ -0,0 +1,3 @@
+[flake8]
+ignore = E501
+exclude = south_migrations,migrations,.venv_*,docs
diff --git a/CHANGES b/CHANGES
index 3b90439..ff66fe6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,6 @@
-Version 0.4.8
+Version 0.5.0
-------------
-* Adds templates folder missing in 0.4.7
+* Adds missing includes in MANIFEST.in
Version 0.4.7
-------------
diff --git a/MANIFEST.in b/MANIFEST.in
index 491c9cc..f448896 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -2,6 +2,11 @@ include MANIFEST.in
include LICENSE
include README.rst
include CHANGES
+include tox.ini
+include .pep8
recursive-include captcha/fonts *
recursive-include captcha/locale *
recursive-include captcha/templates *
+recursive-include testproject *
+recursive-include docs *
+
diff --git a/PKG-INFO b/PKG-INFO
index e8664d4..50680d4 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-simple-captcha
-Version: 0.4.8
+Version: 0.5.0
Summary: A very simple, yet powerful, Django captcha application
Home-page: https://github.com/mbi/django-simple-captcha
Author: Marco Bonetti
diff --git a/captcha/__init__.py b/captcha/__init__.py
index d4e80f4..8e0ed66 100644
--- a/captcha/__init__.py
+++ b/captcha/__init__.py
@@ -1,6 +1,6 @@
import re
-VERSION = (0, 4, 8)
+VERSION = (0, 5, 0)
def get_version(svn=False):
diff --git a/django_simple_captcha.egg-info/PKG-INFO b/django_simple_captcha.egg-info/PKG-INFO
index e8664d4..50680d4 100644
--- a/django_simple_captcha.egg-info/PKG-INFO
+++ b/django_simple_captcha.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-simple-captcha
-Version: 0.4.8
+Version: 0.5.0
Summary: A very simple, yet powerful, Django captcha application
Home-page: https://github.com/mbi/django-simple-captcha
Author: Marco Bonetti
diff --git a/django_simple_captcha.egg-info/SOURCES.txt b/django_simple_captcha.egg-info/SOURCES.txt
index 2abc12f..1e02400 100644
--- a/django_simple_captcha.egg-info/SOURCES.txt
+++ b/django_simple_captcha.egg-info/SOURCES.txt
@@ -1,9 +1,11 @@
+.pep8
CHANGES
LICENSE
MANIFEST.in
README.rst
setup.cfg
setup.py
+tox.ini
captcha/__init__.py
captcha/fields.py
captcha/helpers.py
@@ -67,9 +69,114 @@ django_simple_captcha.egg-info/dependency_links.txt
django_simple_captcha.egg-info/not-zip-safe
django_simple_captcha.egg-info/requires.txt
django_simple_captcha.egg-info/top_level.txt
+docs/.DS_Store
+docs/Makefile
+docs/advanced.rst
+docs/conf.py
+docs/index.rst
+docs/usage.rst
+docs/_build/doctrees/advanced.doctree
+docs/_build/doctrees/environment.pickle
+docs/_build/doctrees/index.doctree
+docs/_build/doctrees/usage.doctree
+docs/_build/html/.buildinfo
+docs/_build/html/advanced.html
+docs/_build/html/genindex.html
+docs/_build/html/index.html
+docs/_build/html/objects.inv
+docs/_build/html/search.html
+docs/_build/html/searchindex.js
+docs/_build/html/usage.html
+docs/_build/html/.doctrees/advanced.doctree
+docs/_build/html/.doctrees/environment.pickle
+docs/_build/html/.doctrees/index.doctree
+docs/_build/html/.doctrees/usage.doctree
+docs/_build/html/_images/captcha3.png
+docs/_build/html/_images/dict.png
+docs/_build/html/_images/math.png
+docs/_build/html/_images/random_chars.png
+docs/_build/html/_sources/advanced.txt
+docs/_build/html/_sources/index.txt
+docs/_build/html/_sources/usage.txt
+docs/_build/html/_static/ajax-loader.gif
+docs/_build/html/_static/basic.css
+docs/_build/html/_static/captcha3.png
+docs/_build/html/_static/classic.css
+docs/_build/html/_static/comment-bright.png
+docs/_build/html/_static/comment-close.png
+docs/_build/html/_static/comment.png
+docs/_build/html/_static/default.css
+docs/_build/html/_static/dict.png
+docs/_build/html/_static/doctools.js
+docs/_build/html/_static/down-pressed.png
+docs/_build/html/_static/down.png
+docs/_build/html/_static/file.png
+docs/_build/html/_static/jquery-1.11.1.js
+docs/_build/html/_static/jquery.js
+docs/_build/html/_static/math.png
+docs/_build/html/_static/minus.png
+docs/_build/html/_static/plus.png
+docs/_build/html/_static/pygments.css
+docs/_build/html/_static/random_chars.png
+docs/_build/html/_static/searchtools.js
+docs/_build/html/_static/sidebar.js
+docs/_build/html/_static/underscore-1.3.1.js
+docs/_build/html/_static/underscore.js
+docs/_build/html/_static/up-pressed.png
+docs/_build/html/_static/up.png
+docs/_build/html/_static/websupport.js
+docs/_static/captcha3.png
+docs/_static/dict.png
+docs/_static/math.png
+docs/_static/random_chars.png
+testproject/.DS_Store
+testproject/.coverage
+testproject/.coveragerc
testproject/__init__.py
+testproject/__init__.pyc
+testproject/coverage.sh
+testproject/coverage.xml
+testproject/django-simple-captcha.db
testproject/forms.py
+testproject/forms.pyc
testproject/manage.py
testproject/settings.py
+testproject/settings.pyc
+testproject/settings_17.pyc
testproject/urls.py
-testproject/views.py
\ No newline at end of file
+testproject/urls.pyc
+testproject/views.py
+testproject/views.pyc
+testproject/__pycache__/__init__.cpython-32.pyc
+testproject/__pycache__/__init__.cpython-33.pyc
+testproject/__pycache__/__init__.cpython-34.pyc
+testproject/__pycache__/forms.cpython-33.pyc
+testproject/__pycache__/forms.cpython-34.pyc
+testproject/__pycache__/settings.cpython-32.pyc
+testproject/__pycache__/settings.cpython-33.pyc
+testproject/__pycache__/settings.cpython-34.pyc
+testproject/__pycache__/settings_17.cpython-34.pyc
+testproject/__pycache__/urls.cpython-33.pyc
+testproject/__pycache__/urls.cpython-34.pyc
+testproject/__pycache__/views.cpython-33.pyc
+testproject/__pycache__/views.cpython-34.pyc
+testproject/htmlcov/_Users_marco_Code_django-simple-captcha_captcha___init__.html
+testproject/htmlcov/_Users_marco_Code_django-simple-captcha_captcha_conf___init__.html
+testproject/htmlcov/_Users_marco_Code_django-simple-captcha_captcha_conf_settings.html
+testproject/htmlcov/_Users_marco_Code_django-simple-captcha_captcha_fields.html
+testproject/htmlcov/_Users_marco_Code_django-simple-captcha_captcha_helpers.html
+testproject/htmlcov/_Users_marco_Code_django-simple-captcha_captcha_models.html
+testproject/htmlcov/_Users_marco_Code_django-simple-captcha_captcha_urls.html
+testproject/htmlcov/_Users_marco_Code_django-simple-captcha_captcha_views.html
+testproject/htmlcov/coverage_html.js
+testproject/htmlcov/index.html
+testproject/htmlcov/jquery-1.4.3.min.js
+testproject/htmlcov/jquery.hotkeys.js
+testproject/htmlcov/jquery.isonscreen.js
+testproject/htmlcov/jquery.tablesorter.min.js
+testproject/htmlcov/keybd_closed.png
+testproject/htmlcov/keybd_open.png
+testproject/htmlcov/status.dat
+testproject/htmlcov/style.css
+testproject/templates/home.html
+testproject/templates/captcha_test/image.html
\ No newline at end of file
diff --git a/docs/.DS_Store b/docs/.DS_Store
new file mode 100644
index 0000000..82bdb07
Binary files /dev/null and b/docs/.DS_Store differ
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..338297f
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,89 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/DjangoSimpleCaptcha.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/DjangoSimpleCaptcha.qhc"
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+ "run these through (pdf)latex."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/_build/doctrees/advanced.doctree b/docs/_build/doctrees/advanced.doctree
new file mode 100644
index 0000000..00345b7
Binary files /dev/null and b/docs/_build/doctrees/advanced.doctree differ
diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle
new file mode 100644
index 0000000..74f7584
Binary files /dev/null and b/docs/_build/doctrees/environment.pickle differ
diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree
new file mode 100644
index 0000000..a7c3343
Binary files /dev/null and b/docs/_build/doctrees/index.doctree differ
diff --git a/docs/_build/doctrees/usage.doctree b/docs/_build/doctrees/usage.doctree
new file mode 100644
index 0000000..043d4ea
Binary files /dev/null and b/docs/_build/doctrees/usage.doctree differ
diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo
new file mode 100644
index 0000000..7cf4aac
--- /dev/null
+++ b/docs/_build/html/.buildinfo
@@ -0,0 +1,4 @@
+# Sphinx build info version 1
+# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
+config: 599915ae7df202fad1805e4364b4d4b0
+tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/_build/html/.doctrees/advanced.doctree b/docs/_build/html/.doctrees/advanced.doctree
new file mode 100644
index 0000000..85ddc1e
Binary files /dev/null and b/docs/_build/html/.doctrees/advanced.doctree differ
diff --git a/docs/_build/html/.doctrees/environment.pickle b/docs/_build/html/.doctrees/environment.pickle
new file mode 100644
index 0000000..8acecb2
Binary files /dev/null and b/docs/_build/html/.doctrees/environment.pickle differ
diff --git a/docs/_build/html/.doctrees/index.doctree b/docs/_build/html/.doctrees/index.doctree
new file mode 100644
index 0000000..919321d
Binary files /dev/null and b/docs/_build/html/.doctrees/index.doctree differ
diff --git a/docs/_build/html/.doctrees/usage.doctree b/docs/_build/html/.doctrees/usage.doctree
new file mode 100644
index 0000000..3d29df7
Binary files /dev/null and b/docs/_build/html/.doctrees/usage.doctree differ
diff --git a/docs/_build/html/_images/captcha3.png b/docs/_build/html/_images/captcha3.png
new file mode 100644
index 0000000..7d2b9f9
Binary files /dev/null and b/docs/_build/html/_images/captcha3.png differ
diff --git a/docs/_build/html/_images/dict.png b/docs/_build/html/_images/dict.png
new file mode 100644
index 0000000..9458460
Binary files /dev/null and b/docs/_build/html/_images/dict.png differ
diff --git a/docs/_build/html/_images/math.png b/docs/_build/html/_images/math.png
new file mode 100644
index 0000000..ed123d9
Binary files /dev/null and b/docs/_build/html/_images/math.png differ
diff --git a/docs/_build/html/_images/random_chars.png b/docs/_build/html/_images/random_chars.png
new file mode 100644
index 0000000..b431427
Binary files /dev/null and b/docs/_build/html/_images/random_chars.png differ
diff --git a/docs/_build/html/_sources/advanced.txt b/docs/_build/html/_sources/advanced.txt
new file mode 100644
index 0000000..54b69d0
--- /dev/null
+++ b/docs/_build/html/_sources/advanced.txt
@@ -0,0 +1,244 @@
+Advanced topics
+===============
+
+Configuration toggles
++++++++++++++++++++++
+
+The following configuration elements can be defined (in your ``settings.py``)
+
+CAPTCHA_FONT_PATH
+-----------------
+
+Full path and filename of a TrueType (TTF), OpenType, or pilfont font file used to render text.
+
+Defaults to: ``fonts/Vera.ttf`` (included in the application, GPL font).
+
+Note that your PIL installation must support TTF and/or OpenFont if you want to use these kind of glyphs (most modern distributions of PIL do.)
+
+Note: as of version 0.4.6, ``CAPTCHA_FONT_PATH`` may be an iterable of font paths, in which case a font will be picked randomly from the list for each CAPTCHA.
+
+CAPTCHA_FONT_SIZE
+-----------------
+
+Font-size in pixels of the rendered text.
+
+Defaults to '22'.
+
+CAPTCHA_IMAGE_SIZE
+------------------
+
+Image size in pixels of generated captcha, specified by 2-tuple (width, height)
+
+Defaults to `None` (automatically calculated)
+
+CAPTCHA_LETTER_ROTATION
+-----------------------
+
+A random rotation in this interval is applied to each letter in the challenge text.
+
+Defaults to ``(-35,35)``.
+
+New in version 0.1.6: set this to None to disable letter roation.
+
+CAPTCHA_BACKGROUND_COLOR
+------------------------
+
+Background-color of the captcha. Can be expressed as html-style #rrggbb, rgb(red, green, blue), or common html names (e.g. "red").
+
+Defaults to: ``'#ffffff'``
+
+CAPTCHA_FOREGROUND_COLOR
+------------------------
+
+Foreground-color of the captcha.
+
+Defaults to ``'#001100'``
+
+CAPTCHA_CHALLENGE_FUNCT
+------------------------
+
+String representing a python callable (i.e. a function) to use as challenge generator.
+
+See Generators below for a list of available generators and a guide on how to write your own.
+
+Defaults to: ``'captcha.helpers.random_char_challenge'``
+
+CAPTCHA_NOISE_FUNCTIONS
+------------------------
+
+List of strings of python callables that take a PIL ``DrawImage`` object and an ``Image`` image as input, modify the ``DrawImage``, then return it.
+
+Defaults to: ``('captcha.helpers.noise_arcs','captcha.helpers.noise_dots',)``
+
+A null noise helper function useful when debugging issues is available at ``'captcha.helpers.noise_null'``.
+
+
+CAPTCHA_FILTER_FUNCTIONS
+------------------------
+
+List of strings of python callables that take a PIL ``Image`` object as input, modify it and return it.
+
+These are called right before the rendering, i.e. after the noise functions.
+
+Defaults to: ``('captcha.helpers.post_smooth',)``
+
+
+CAPTCHA_WORDS_DICTIONARY
+------------------------
+
+Required for the ``word_challenge`` challenge function only. Points a file containing a list of words, one per line.
+
+Defaults to: ``'/usr/share/dict/words'``
+
+CAPTCHA_FLITE_PATH
+------------------------
+
+Full path to the ``flite`` executable. When defined, will automatically add audio output to the captcha.
+
+Defaults to: ``None`` (no audio output)
+
+CAPTCHA_TIMEOUT
+---------------
+
+Integer. Lifespan, in minutes, of the generated captcha.
+
+Defaults to: 5
+
+CAPTCHA_LENGTH
+------------------------
+
+Sets the length, in chars, of the generated captcha. (for the ``'captcha.helpers.random_char_challenge'`` challenge)
+
+Defaults to: 4
+
+CAPTCHA_DICTIONARY_MIN_LENGTH
+-----------------------------
+
+When using the word_challenge challenge function, controls the minimum length of the words to be randomly picked from the dictionary file.
+
+Defaults to: 0
+
+CAPTCHA_DICTIONARY_MAX_LENGTH
+-----------------------------
+
+When using the word_challenge challenge function, controls the maximal length of the words to be randomly picked from the dictionary file.
+
+Defaults to: 99
+
+Note: it's perfectly safe to specify e.g. ``CAPTCHA_DICTIONARY_MIN_LENGTH = CAPTCHA_DICTIONARY_MAX_LENGTH = 6`` but it's considered an error to define ``CAPTCHA_DICTIONARY_MAX_LENGTH`` to be smaller than ``CAPTCHA_DICTIONARY_MIN_LENGTH``.
+
+.. _output_format_ref:
+
+CAPTCHA_OUTPUT_FORMAT
+------------------------
+
+New in version 0.1.6
+
+Specify your own output format for the generated markup, when e.g. you want to position the captcha image relative to the text field in your form.
+
+Defaults to: ``None``
+
+(Used to default to: ``u'%(image)s %(hidden_field)s %(text_field)s'``)
+
+Note: this settings is deprecated in favor of template-based field rendering, use ``CAPTCHA_FIELD_TEMPLATE`` instead (see the Rendering section below).
+
+
+CAPTCHA_TEST_MODE
+------------------------
+
+New in version 0.3.6
+
+When set to True, the string "PASSED" (any case) will be accepted as a valid response to any CAPTCHA.
+Use this for testing purposes. Warning: do NOT set this to True in production.
+
+Defaults to: False
+
+
+Rendering
++++++++++
+
+A CAPTCHA field is made up of three components:
+
+* The actual image that the end user has to copy from
+* A text field, that the user has to fill with the content of the image
+* A hidden field, containing the database reference of the CAPTCHA (for verification).
+
+These three elements are rendered individually, then assembled into a single bit of HTML.
+
+As of version 0.4.7 you can control how the individual components are rendered, as well as how all components are assembled, by overriding four templates:
+
+* ``captcha/image.html`` controls the rendering of the image (and optionnally audio) element
+* ``captcha/text_field.html`` controls the rendering of the text field
+* ``captcha/hidden_field.html`` controls the rendering of the hidden input
+* ``captcha/field.html`` controls the assembling of the previous three elements
+
+These templates can be overriden in your own ``templates`` folder, or you can change the actual template names by settings ``CAPTCHA_IMAGE_TEMPLATE``, ``CAPTCHA_TEXT_FIELD_TEMPLATE``, ``CAPTCHA_HIDDEN_FIELD_TEMPLATE`` and ``CAPTCHA_FIELD_TEMPLATE``, respectively.
+
+Context
+-------
+
+The following context variables are passed to the three "individual" templates:
+
+* ``image``: The URL of the rendered CAPTCHA image
+* ``name``: name of the field (i.e. the name of your form field)
+* ``key``: the hashed value (identifier) of this CAPTCHA: this is stored and passed in the hidden input
+* ``id``: the HTML ``id`` attribute to be used
+
+The ``captcha/field.html`` template receives the following context:
+
+* ``image``: the rendered (HTML) image and optionnaly audio elements
+* ``hidden_field``: the rendered hidden input
+* ``text_field``: the rendered text input
+
+Note: these elements have been marked as safe, you can render them straight into your template.
+
+
+Generators and modifiers
+++++++++++++++++++++++++
+
+Random chars
+------------
+
+.. image:: _static/random_chars.png
+
+Classic captcha that picks four random chars. This is case insensitive. ::
+
+ CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.random_char_challenge'
+
+
+Simple Math
+------------
+
+.. image:: _static/math.png
+
+Another classic, that challenges the user to resolve a simple math challenge by randomly picking two numbers between one and nine, and a random operator among plus, minus, times. ::
+
+ CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.math_challenge'
+
+
+Dictionary Word
+----------------
+
+.. image:: _static/dict.png
+
+Picks a random word from a dictionary file. Note, you must define ``CAPTCHA_WORDS_DICTIONARY`` in your cofiguration to use this generator. ::
+
+ CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.word_challenge'
+
+
+Roll your own
+-------------
+
+To have your own challenge generator, simply point ``CAPTCHA_CHALLENGE_FUNCT`` to a function that returns a tuple of strings: the first one (the challenge) will be rendered in the captcha, the second is the valid response to the challenge, e.g. ``('5+10=', '15')``, ``('AAAA', 'aaaa')``
+
+This sample generator that returns six random digits::
+
+ import random
+
+ def random_digit_challenge():
+ ret = u''
+ for i in range(6):
+ ret += str(random.randint(0,9))
+ return ret, ret
+
+
diff --git a/docs/_build/html/_sources/index.txt b/docs/_build/html/_sources/index.txt
new file mode 100644
index 0000000..962f9bb
--- /dev/null
+++ b/docs/_build/html/_sources/index.txt
@@ -0,0 +1,40 @@
+*********************
+Django Simple Captcha
+*********************
+
+.. image:: https://travis-ci.org/mbi/django-simple-captcha.png?branch=master
+
+Django Simple Captcha is an extremely simple, yet highly customizable Django application to add captcha images to any Django form.
+
+.. image:: _static/captcha3.png
+
+Features
+++++++++
+
+* Very simple to setup and deploy, yet very configurable
+* Can use custom challenges (e.g. random chars, simple maths, dictionary word, ...)
+* Custom generators, noise and filter functions alter the look of the generated image
+* Supports text-to-speech audio output of the challenge text, for improved accessibility
+* Ajax refresh
+
+Requirements
+++++++++++++
+
+* Django 1.7+
+* A recent version of Pillow compiled with FreeType support
+* Flite is required for text-to-speech (audio) output, but not mandatory
+
+Python 3 compatibility
+++++++++++++++++++++++
+
+The current development version supports Python3 via the `six <https://pypi.python.org/pypi/six>`_ compatibility layer.
+
+******************
+Contents:
+******************
+
+.. toctree::
+ :maxdepth: 2
+
+ usage.rst
+ advanced.rst
diff --git a/docs/_build/html/_sources/usage.txt b/docs/_build/html/_sources/usage.txt
new file mode 100644
index 0000000..91b9039
--- /dev/null
+++ b/docs/_build/html/_sources/usage.txt
@@ -0,0 +1,148 @@
+Using django-simple-captcha
+===========================
+
+Installation
++++++++++++++
+
+1. Download ``django-simple-captcha`` using pip_ by running: ``pip install django-simple-captcha``
+2. Add ``captcha`` to the ``INSTALLED_APPS`` in your ``settings.py``
+3. Run ``python manage.py syncdb`` (or ``python manage.py migrate`` if you are managing database migrations via South) to create the required database tables
+4. Add an entry to your ``urls.py``::
+
+ urlpatterns += patterns('',
+ url(r'^captcha/', include('captcha.urls')),
+ )
+
+
+Django-simple-captcha 0.4.3 and later supports both Django 1.7's new migrations and South migrations: if you are using South and Django < 1.7, you must define the following in your settings::
+
+ SOUTH_MIGRATION_MODULES = {
+ 'captcha': 'captcha.south_migrations',
+ }
+
+
+.. _pip: http://pypi.python.org/pypi/pip
+
+
+Note: PIL and Pillow require that image libraries are installed on your system. On e.g. Debian or Ubuntu, you'd need these packages to compile and install Pillow::
+
+ apt-get -y install libz-dev libjpeg-dev libfreetype6-dev python-dev
+
+Adding to a Form
++++++++++++++++++
+
+Using a ``CaptchaField`` is quite straight-forward:
+
+Define the Form
+----------------
+
+
+To embed a CAPTCHA in your forms, simply add a ``CaptchaField`` to the form definition::
+
+ from django import forms
+ from captcha.fields import CaptchaField
+
+ class CaptchaTestForm(forms.Form):
+ myfield = AnyOtherField()
+ captcha = CaptchaField()
+
+…or, as a ``ModelForm``::
+
+
+ from django import forms
+ from captcha.fields import CaptchaField
+
+ class CaptchaTestModelForm(forms.ModelForm):
+ captcha = CaptchaField()
+ class Meta:
+ model = MyModel
+
+Validate the Form
+-----------------
+
+In your view, validate the form as usually: if the user didn't provide a valid response to the CAPTCHA challenge, the form will raise a ``ValidationError``::
+
+ def some_view(request):
+ if request.POST:
+ form = CaptchaTestForm(request.POST)
+
+ # Validate the form: the captcha field will automatically
+ # check the input
+ if form.is_valid():
+ human = True
+ else:
+ form = CaptchaTestForm()
+
+ return render_to_response('template.html',locals())
+
+Passing arguments to the field
+------------------------------
+
+``CaptchaField`` takes a few optional arguements:
+
+* ``output_format`` will let you format the layout of the rendered field. Defaults to the value defined in : :ref:`output_format_ref`.
+* ``id_prefix`` Optional prefix that will be added to the ID attribute in the generated fields and labels, to be used when e.g. several Captcha fields are being displayed on a same page. (added in version 0.4.4)
+
+Example usage for ajax form
+---------------------------
+
+An example CAPTCHA validation in AJAX::
+
+ from django.views.generic.edit import CreateView
+ from captcha.models import CaptchaStore
+ from captcha.helpers import captcha_image_url
+ from django.http import HttpResponse
+ import json
+
+ class AjaxExampleForm(CreateView):
+ template_name = ''
+ form_class = AjaxForm
+
+ def form_invalid(self, form):
+ if self.request.is_ajax():
+ to_json_response = dict()
+ to_json_response['status'] = 0
+ to_json_response['form_errors'] = form.errors
+
+ to_json_response['new_cptch_key'] = CaptchaStore.generate_key()
+ to_json_response['new_cptch_image'] = captcha_image_url(to_json_response['new_cptch_key'])
+
+ return HttpResponse(json.dumps(to_json_response), content_type='application/json')
+
+ def form_valid(self, form):
+ form.save()
+ if self.request.is_ajax():
+ to_json_response = dict()
+ to_json_response['status'] = 1
+
+ to_json_response['new_cptch_key'] = CaptchaStore.generate_key()
+ to_json_response['new_cptch_image'] = captcha_image_url(to_json_response['new_cptch_key'])
+
+ return HttpResponse(json.dumps(to_json_response), content_type='application/json')
+
+
+And in javascript your must update the image and hidden input in form
+
+
+Example usage ajax refresh button
+---------------------------------
+
+# html::
+
+ <form action='.' method='POST'>
+ {{ form }}
+ <input type="submit" />
+ <button class='js-captcha-refresh'></button>
+ </form>
+
+# javascript::
+
+ $('.js-captcha-refresh').click(function(){
+ $form = $(this).parents('form');
+
+ $.getJSON($(this).data('url'), {}, function(json) {
+ // This should update your captcha image src and captcha hidden input
+ });
+
+ return false;
+ });
diff --git a/docs/_build/html/_static/ajax-loader.gif b/docs/_build/html/_static/ajax-loader.gif
new file mode 100644
index 0000000..61faf8c
Binary files /dev/null and b/docs/_build/html/_static/ajax-loader.gif differ
diff --git a/docs/_build/html/_static/basic.css b/docs/_build/html/_static/basic.css
new file mode 100644
index 0000000..9fa77d8
--- /dev/null
+++ b/docs/_build/html/_static/basic.css
@@ -0,0 +1,599 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+ clear: both;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+ width: 100%;
+ font-size: 90%;
+}
+
+div.related h3 {
+ display: none;
+}
+
+div.related ul {
+ margin: 0;
+ padding: 0 0 0 10px;
+ list-style: none;
+}
+
+div.related li {
+ display: inline;
+}
+
+div.related li.right {
+ float: right;
+ margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+ padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+ float: left;
+ width: 230px;
+ margin-left: -100%;
+ font-size: 90%;
... 19920 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-simple-captcha.git
More information about the Python-modules-commits
mailing list