prune_captcha 1.18.1__py3-none-any.whl → 1.18.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- prune_captcha/static/prune_captcha/css/captcha.css +6 -2
- prune_captcha/templates/prune_captcha/captcha.html +7 -4
- prune_captcha/utils.py +2 -2
- {prune_captcha-1.18.1.dist-info → prune_captcha-1.18.4.dist-info}/METADATA +4 -1
- prune_captcha-1.18.4.dist-info/RECORD +10 -0
- prune_captcha-1.18.1.dist-info/RECORD +0 -10
- {prune_captcha-1.18.1.dist-info → prune_captcha-1.18.4.dist-info}/WHEEL +0 -0
- {prune_captcha-1.18.1.dist-info → prune_captcha-1.18.4.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,7 @@
|
|
1
|
+
.prune-captcha {
|
2
|
+
margin: 16px 0;
|
3
|
+
}
|
4
|
+
|
1
5
|
.puzzle-container {
|
2
6
|
position: relative;
|
3
7
|
}
|
@@ -10,13 +14,13 @@
|
|
10
14
|
}
|
11
15
|
|
12
16
|
.puzzle-mask {
|
13
|
-
background-color:
|
17
|
+
background-color: whitesmoke;
|
14
18
|
position: absolute;
|
15
19
|
z-index: 1;
|
16
20
|
}
|
17
21
|
|
18
22
|
.puzzle-piece {
|
19
|
-
border: 1px solid
|
23
|
+
border: 1px solid whitesmoke;
|
20
24
|
position: absolute;
|
21
25
|
background-repeat: no-repeat;
|
22
26
|
z-index: 1;
|
@@ -1,7 +1,10 @@
|
|
1
1
|
{% load static %}
|
2
2
|
|
3
|
-
<div class="
|
4
|
-
<
|
5
|
-
<div
|
6
|
-
|
3
|
+
<div class="prune-captcha">
|
4
|
+
<p class="puzzle-info">Veuillez glisser la pièce au bon emplacement</p>
|
5
|
+
<div class="puzzle-container" style="width: {{ puzzle.width }}px; height: {{ puzzle.height }}px; background-image: url('{% static puzzle.image %}'); background-size: {{ puzzle.width }}px {{ puzzle.height }}px;">
|
6
|
+
<div class="puzzle-background" style="background-image: url('{% static puzzle.image %}'); background-size: {{ puzzle.width }}px {{ puzzle.height }}px;"></div>
|
7
|
+
<div class="puzzle-mask" style="top: {{ puzzle.pos_y_solution }}px; left: {{ puzzle.pos_x_solution }}px; width: {{ puzzle.piece_width }}px; height: {{ puzzle.piece_height }}px;"></div>
|
8
|
+
<div class="puzzle-piece" style="background-image: url('{% static puzzle.image %}'); background-size: {{ puzzle.width }}px {{ puzzle.height }}px; background-position: -{{ puzzle.pos_x_solution }}px -{{ puzzle.pos_y_solution }}px; width: calc({{ puzzle.piece_width }}px - 1px); height: calc({{ puzzle.piece_height }}px - 1px); top: {{ puzzle.piece_pos_y }}px; left: {{ puzzle.piece_pos_x }}px;"></div>
|
9
|
+
</div>
|
7
10
|
</div>
|
prune_captcha/utils.py
CHANGED
@@ -44,8 +44,8 @@ def verify_captcha(request: HttpRequest) -> bool:
|
|
44
44
|
return False
|
45
45
|
puzzle = request.session.get("puzzle")
|
46
46
|
if (
|
47
|
-
abs(puzzle
|
48
|
-
and abs(puzzle
|
47
|
+
abs(puzzle["pos_x_solution"] - pos_x_answer) <= puzzle["precision"]
|
48
|
+
and abs(puzzle["pos_y_solution"] - pos_y_answer) <= puzzle["precision"]
|
49
49
|
):
|
50
50
|
return True
|
51
51
|
else:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: prune_captcha
|
3
|
-
Version: 1.18.
|
3
|
+
Version: 1.18.4
|
4
4
|
Summary: A tool to protect formulaire from spam.
|
5
5
|
Author-email: Arnout <bastien@prune.sh>
|
6
6
|
Project-URL: Made_by, https://prune.sh/
|
@@ -126,6 +126,9 @@ Important: You must import the static files (css, js) present in "prune_captcha/
|
|
126
126
|
|
127
127
|
| Version | Date | Notes |
|
128
128
|
| ------- | ---------- | ---------------------------------- |
|
129
|
+
| 1.18.4 | 2025-05-23 | deleted var |
|
130
|
+
| 1.18.3 | 2025-05-22 | add puzzle info |
|
131
|
+
| 1.18.2 | 2025-05-22 | fix |
|
129
132
|
| 1.18.1 | 2025-05-22 | some improvements |
|
130
133
|
| 1.18.0 | 2025-05-22 | create "addHiddenInputs" func |
|
131
134
|
| 1.17.0 | 2025-05-21 | fix pos_answer |
|
@@ -0,0 +1,10 @@
|
|
1
|
+
prune_captcha/__init__.py,sha256=289nX-nsT20GUbXE9Lm4Iv6H7b7XmJyLisg9Z2MRR0k,61
|
2
|
+
prune_captcha/apps.py,sha256=imbFju15itWdZA7vPg7IRD0QnDp8FFnrEQVpjha8G7M,422
|
3
|
+
prune_captcha/utils.py,sha256=2BNV2PIWVAfZH7gcuS-53u74D3vl1x7kG5O18Qjsu0I,1788
|
4
|
+
prune_captcha/static/prune_captcha/css/captcha.css,sha256=ntZF_NsNLx_GUeG80oJ8GTDHZ3Le4MjKF9Ur88SSFTA,422
|
5
|
+
prune_captcha/static/prune_captcha/js/captcha.js,sha256=qcFESOTV_hCQSNkT6lcl7pkAqMyOyqMoJLldL8f02Kg,2202
|
6
|
+
prune_captcha/templates/prune_captcha/captcha.html,sha256=lmi2RolhEHyd3IAvA_ZGsGpo7RLhn-wi3-6tOgwpg4c,1128
|
7
|
+
prune_captcha-1.18.4.dist-info/METADATA,sha256=I8JD3okNxXf5Fg7iHxzQYfwr_HDe8wg0QBbm_qPndzI,4662
|
8
|
+
prune_captcha-1.18.4.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
9
|
+
prune_captcha-1.18.4.dist-info/top_level.txt,sha256=v0fVjlwv7OWp7NHgpeR5Oj0xhlf81K24sP2r9DYw5Qg,14
|
10
|
+
prune_captcha-1.18.4.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
prune_captcha/__init__.py,sha256=289nX-nsT20GUbXE9Lm4Iv6H7b7XmJyLisg9Z2MRR0k,61
|
2
|
-
prune_captcha/apps.py,sha256=imbFju15itWdZA7vPg7IRD0QnDp8FFnrEQVpjha8G7M,422
|
3
|
-
prune_captcha/utils.py,sha256=-Xzs7DEwc1MBQxURH6socn2pf2dDwOZy7EhBnhkpzO0,1776
|
4
|
-
prune_captcha/static/prune_captcha/css/captcha.css,sha256=nMBmOXSDNKcEWqq_n-tHuN3KcK8_a1o2DQS_msZ72MA,398
|
5
|
-
prune_captcha/static/prune_captcha/js/captcha.js,sha256=qcFESOTV_hCQSNkT6lcl7pkAqMyOyqMoJLldL8f02Kg,2202
|
6
|
-
prune_captcha/templates/prune_captcha/captcha.html,sha256=-gmfIfvAw_1TIGdJmOaaZA7v3VaUGM814KuistjjFzU,996
|
7
|
-
prune_captcha-1.18.1.dist-info/METADATA,sha256=Es72xBgJX93hoSjoYgMLMrS70IqvDXKrUZFUc7Zq6d4,4476
|
8
|
-
prune_captcha-1.18.1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
9
|
-
prune_captcha-1.18.1.dist-info/top_level.txt,sha256=v0fVjlwv7OWp7NHgpeR5Oj0xhlf81K24sP2r9DYw5Qg,14
|
10
|
-
prune_captcha-1.18.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|