prune_captcha 1.6.0__py3-none-any.whl → 1.8.0__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.
- captcha_prune/apps.py +1 -1
- captcha_prune/migrations/0003_captcha_created_at_captcha_updated_at.py +25 -0
- captcha_prune/utils.py +1 -1
- {prune_captcha-1.6.0.dist-info → prune_captcha-1.8.0.dist-info}/METADATA +4 -2
- {prune_captcha-1.6.0.dist-info → prune_captcha-1.8.0.dist-info}/RECORD +7 -6
- {prune_captcha-1.6.0.dist-info → prune_captcha-1.8.0.dist-info}/WHEEL +0 -0
- {prune_captcha-1.6.0.dist-info → prune_captcha-1.8.0.dist-info}/top_level.txt +0 -0
captcha_prune/apps.py
CHANGED
@@ -9,5 +9,5 @@ class DjangoPuzzleConfig(AppConfig):
|
|
9
9
|
def ready(self):
|
10
10
|
if not hasattr(settings, "PUZZLE_IMAGE_STATIC_PATH"):
|
11
11
|
raise ImproperlyConfigured(
|
12
|
-
"
|
12
|
+
"captcha_prune: vous devez définir PUZZLE_IMAGE_STATIC_PATH dans settings.py"
|
13
13
|
)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Generated by Django 5.2 on 2025-05-20 09:12
|
2
|
+
|
3
|
+
import django.utils.timezone
|
4
|
+
from django.db import migrations, models
|
5
|
+
|
6
|
+
|
7
|
+
class Migration(migrations.Migration):
|
8
|
+
|
9
|
+
dependencies = [
|
10
|
+
('captcha_prune', '0002_remove_captcha_created_at_remove_captcha_pos_x_and_more'),
|
11
|
+
]
|
12
|
+
|
13
|
+
operations = [
|
14
|
+
migrations.AddField(
|
15
|
+
model_name='captcha',
|
16
|
+
name='created_at',
|
17
|
+
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
|
18
|
+
preserve_default=False,
|
19
|
+
),
|
20
|
+
migrations.AddField(
|
21
|
+
model_name='captcha',
|
22
|
+
name='updated_at',
|
23
|
+
field=models.DateTimeField(auto_now=True),
|
24
|
+
),
|
25
|
+
]
|
captcha_prune/utils.py
CHANGED
@@ -34,7 +34,7 @@ def create_and_get_puzzle(request: HttpRequest) -> HttpResponse | dict:
|
|
34
34
|
"pos_y_solution": response["pos_y_solution"],
|
35
35
|
"piece_pos_x": response["piece_pos_x"],
|
36
36
|
"piece_pos_y": response["piece_pos_y"],
|
37
|
-
"image": selected_image,
|
37
|
+
"image": f"{settings.PUZZLE_IMAGE_STATIC_PATH}{selected_image}",
|
38
38
|
}
|
39
39
|
|
40
40
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: prune_captcha
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.8.0
|
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/
|
@@ -79,7 +79,7 @@ PUZZLE_IMAGE_STATIC_PATH = "website/images/"
|
|
79
79
|
```
|
80
80
|
|
81
81
|
```
|
82
|
-
{% include "captcha_prune/
|
82
|
+
{% include "captcha_prune/captcha.html" %}
|
83
83
|
```
|
84
84
|
|
85
85
|
- POST request (form submission)
|
@@ -136,6 +136,8 @@ PUZZLE_IMAGE_STATIC_PATH = "website/images/"
|
|
136
136
|
|
137
137
|
| Version | Date | Notes |
|
138
138
|
| ------- | ---------- | ---------------------------------- |
|
139
|
+
| 1.8.0 | 2025-05-20 | added migrations |
|
140
|
+
| 1.7.0 | 2025-05-20 | PUZZLE_IMAGE_STATIC_PATH ... |
|
139
141
|
| 1.6.0 | 2025-05-20 | added templates |
|
140
142
|
| 1.5.0 | 2025-05-20 | app config fixed, components ... |
|
141
143
|
| 1.4.0 | 2025-05-20 | added BaseModel in Captcha, ... |
|
@@ -1,23 +1,24 @@
|
|
1
1
|
captcha_prune/__init__.py,sha256=JerrqDuZCUa8pj_9pEv68rnlPsiXovRP4biKpCqyThs,61
|
2
|
-
captcha_prune/apps.py,sha256=
|
2
|
+
captcha_prune/apps.py,sha256=WVAz3WWaPAgM7-Ojd_Cl2KVdcub1n-03qpnRyu2ToTo,422
|
3
3
|
captcha_prune/asgi.py,sha256=wi2rRLFltXOZyve8mAB_E8udaFyONOf5N42WrWIQX8M,403
|
4
4
|
captcha_prune/context_processors.py,sha256=RTHgIxoje5n2wr1YvefbgUlvwNfiCe7Eyz9VKVoN4ZA,383
|
5
5
|
captcha_prune/models.py,sha256=O8nxhVfPat3oaDGZzd88kQHkGayQIWZ_dOO9uu1R6P4,1240
|
6
6
|
captcha_prune/payloads.py,sha256=PwR48xKg9YEgGgoJmGe7ywwFPCqM4gumomyFunn-Ems,115
|
7
7
|
captcha_prune/settings.py,sha256=YEZHEjYYYK-cH3gSLIR3a7g4Bypnuf_5eMTTcm719CE,3395
|
8
8
|
captcha_prune/urls.py,sha256=DeCJTjJA0krW27KoHafvh3GBRr7fJ80E2lVHEWYSsW4,271
|
9
|
-
captcha_prune/utils.py,sha256=
|
9
|
+
captcha_prune/utils.py,sha256=mSephcboPbl0zEmy9g2KVSMx7UvSeh6szCwGaJtF_pw,2391
|
10
10
|
captcha_prune/views.py,sha256=BzjQfXLwYx2YSWODrnGpokqU8XeC-9QORivzWKxYofY,1539
|
11
11
|
captcha_prune/wsgi.py,sha256=fukA_iiCT4FFzcJ0QX2Zr_HNddqdq-ln3ien2UWcCTA,403
|
12
12
|
captcha_prune/migrations/0001_initial.py,sha256=QMTaeSIxPociSrV4r89zfsbxMwMu4qpL16LT3yPgcaw,831
|
13
13
|
captcha_prune/migrations/0002_remove_captcha_created_at_remove_captcha_pos_x_and_more.py,sha256=xyyE_G3t8kJqFvKuNWFRTyTyyD1kzvfeSgbkTQ9DO8A,2099
|
14
|
+
captcha_prune/migrations/0003_captcha_created_at_captcha_updated_at.py,sha256=qT9cTDe3coiWXYbYfBlK4iEYg71E9B2FGuo74Wy_gbA,698
|
14
15
|
captcha_prune/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
16
|
commons/base_model.py,sha256=q1Q7lgtvN_t6ujhEiSsNNXb_ay0qY6FbfK0Zm2Hdgp0,213
|
16
17
|
commons/decorators.py,sha256=nU_3SyxENcWDdxo03VyNYEvoevplC6ig7BFogY8apNs,1306
|
17
18
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
19
|
tests/captcha_prune/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
20
|
tests/captcha_prune/test_views.py,sha256=h-Mrdiprh71s7kIJPYAt6xv4G_S7vp51WCpAzy4CZ6U,2364
|
20
|
-
prune_captcha-1.
|
21
|
-
prune_captcha-1.
|
22
|
-
prune_captcha-1.
|
23
|
-
prune_captcha-1.
|
21
|
+
prune_captcha-1.8.0.dist-info/METADATA,sha256=ZX7pqfZJ_BpvUCooSk7D6KG9jdFdIzfS3AwQWxZiU84,3982
|
22
|
+
prune_captcha-1.8.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
23
|
+
prune_captcha-1.8.0.dist-info/top_level.txt,sha256=EB4h0WF_YGF7kAWB0XtqmuloOhkL5pC71CzgEVYam7w,28
|
24
|
+
prune_captcha-1.8.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|