Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
alisharify7 committed Oct 27, 2023
1 parent eec61e3 commit 08699b2
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 51 deletions.
18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# flask_captcha2
a light and simple Flask extension for integrating google recaptcha with Flask Apps
<p>


<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/alisharify7/flask_captcha2">


<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/alisharify7/flask_captcha2">


<img alt="GitHub repo Licence" src="https://img.shields.io/pypi/l/flask_captcha2">


[![PyPI version](https://badge.fury.io/py/flask-captcha2.svg)](https://badge.fury.io/py/flask-captcha2)

total downloads:
Expand All @@ -29,19 +22,13 @@ a light and simple Flask extension for integrating google recaptcha with Flask A


</p>






### 0.0 how to install:

pip install -U flask_captcha2


### 0.1 how to use:

```python
from flask import Flask
from flask_captcha2.GoogleCaptcha import FlaskCaptcha2, FlaskCaptcha3
Expand Down Expand Up @@ -196,3 +183,8 @@ def index():
Add Captcha version 3 and fix some bugs in captcha version 2


- version 3.0.2 Released: October 27, 2023
- Changes:

fix install error for version 3.0.0 and 3.0.1

107 changes: 71 additions & 36 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@

flask_captcha2
==============

a light and simple Flask extension for integrating google recaptcha with
Flask Apps
a light and simple Flask extension for integrating google recaptcha with Flask Apps

.. raw:: html

<p>
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/alisharify7/flask_captcha2">
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/alisharify7/flask_captcha2">
<img alt="GitHub repo Licence" src="https://img.shields.io/pypi/l/flask_captcha2">

[![PyPI version](https://badge.fury.io/py/flask-captcha2.svg)](https://badge.fury.io/py/flask-captcha2)

total downloads:

[![Downloads](https://static.pepy.tech/badge/flask-captcha2)](https://pepy.tech/project/flask-captcha2)

month downloads:

[![Downloads](https://static.pepy.tech/badge/flask-captcha2/month)](https://pepy.tech/project/flask-captcha2)


week downloads:

[![Downloads](https://static.pepy.tech/badge/flask-captcha2/week)](https://pepy.tech/project/flask-captcha2)

.. raw:: html

</p>


0.0 how to install:
-------------------
^^^^^^^^^^^^^^^^^^^

.. code-block::
pip install -U flask_captcha2
::
pip install -U flask_captcha2
0.1 how to use:
---------------
^^^^^^^^^^^^^^^

.. code:: python
.. code-block:: python
from flask import Flask
from flask_captcha2.GoogleCaptcha import FlaskCaptcha2, FlaskCaptcha3
Expand Down Expand Up @@ -56,23 +76,23 @@ Flask Apps
captcha2 = FlaskCaptcha2(app=app)
captcha3 = FlaskCaptcha3(app=app)
# or
# or
captcha2 = FlaskCaptcha2()
captcha3 = FlaskCaptcha3()
captcha2.init_app(app=app)
captcha3.init_app(app=app)
0.2 how use in templates for rendering Captcha Widget:
------------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Use < captchaField > Filter to render captcha in html
-----------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Version 2 Captcha rendering:
----------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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


<!DOCTYPE html>
Expand All @@ -95,9 +115,9 @@ Version 2 Captcha rendering:
</html>

Version 3 Captcha rendering:
----------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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


<!DOCTYPE html>
Expand All @@ -114,15 +134,15 @@ Version 3 Captcha rendering:
<input type="text" name="username">
<input type="submit" value="submit">
{# With captchaField filter you can render captcha widget in your html code #}
{{
{{
captchaField
( {
'btnText': "Submit", # required
'ParentFormID': 'ParentForm', # required
} )
} )
}}

<!--
<!--
full arguments in captcha version 3
captchaField(
{
Expand All @@ -140,19 +160,19 @@ Version 3 Captcha rendering:
</html>

0.3 How verify Captcha:
-----------------------
^^^^^^^^^^^^^^^^^^^^^^^

Use is_verify method
--------------------
^^^^^^^^^^^^^^^^^^^^

.. code:: python
.. code-block:: python
captcha = FlaskCaptcha2(app)
captcha = FlaskCaptcha3(app)
@app.route("/", methods=["POST"])
def index():
# with is_verify method verify the captcha
# with is_verify method verify the captcha
if captcha.is_verify():
return "Captcha is ok."
else:
Expand All @@ -161,28 +181,43 @@ Use is_verify method
Version History:
----------------

- version 2.0.0 Released: May 18, 2023

- Changes:
* version 2.0.0 Released: May 18, 2023
*
Changes:

.. code-block:
.. code-block::
None
*
version 2.0.1 Released: June 9, 2023

*
Changes:

::
.. code-block:
None
Change FlaskCaptcha Class to FlaskCaptcha2
Fix bug in rendering captcha widget when captcha-enable was False
- version 2.0.1 Released: June 9, 2023
- Changes:
* version 3.0.0 Released: September 9, 2023
*
Changes:

::
.. code-block:
Change FlaskCaptcha Class to FlaskCaptcha2
Fix bug in rendering captcha widget when captcha-enable was False
change Package structure
Add Captcha version 3 and fix some bugs in captcha version 2
- version 3.0.0 Released: September 9, 2023
- Changes:
* version 3.0.2 Released: October 27, 2023
*
Changes:

::
.. code-block:
change Package structure
Add Captcha version 3 and fix some bugs in captcha version 2
fix install error for version 3.0.0 and 3.0.1
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

__NAME__ = "Flask-captcha2"
__version__ = "3.0.2"
__version__ = "3.0.3"
__author__ = "ali sharify"
__author_mail__ = "[email protected]"
__copyright__ = "ali sharify - 2023"
Expand All @@ -22,7 +22,7 @@
url="https://github.com/alisharify7/flask_captcha2",
long_description=long_description,
long_description_content_type="text/x-rst",
#long_description_content_type="text/markdown",
# long_description_content_type="text/markdown",
classifiers=[
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
Expand Down

0 comments on commit 08699b2

Please sign in to comment.