plain.dev 0.28.0__py3-none-any.whl → 0.29.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.
- plain/dev/requests.py +4 -4
- plain/dev/views.py +6 -4
- {plain_dev-0.28.0.dist-info → plain_dev-0.29.0.dist-info}/METADATA +1 -1
- {plain_dev-0.28.0.dist-info → plain_dev-0.29.0.dist-info}/RECORD +7 -7
- {plain_dev-0.28.0.dist-info → plain_dev-0.29.0.dist-info}/WHEEL +0 -0
- {plain_dev-0.28.0.dist-info → plain_dev-0.29.0.dist-info}/entry_points.txt +0 -0
- {plain_dev-0.28.0.dist-info → plain_dev-0.29.0.dist-info}/licenses/LICENSE +0 -0
plain/dev/requests.py
CHANGED
@@ -137,10 +137,10 @@ class RequestLog:
|
|
137
137
|
"method": request.method,
|
138
138
|
"path": request.path,
|
139
139
|
"full_path": request.get_full_path(),
|
140
|
-
"querydict": request.
|
140
|
+
"querydict": request.data.dict()
|
141
141
|
if request.method == "POST"
|
142
|
-
else request.
|
143
|
-
"cookies": request.
|
142
|
+
else request.query_params.dict(),
|
143
|
+
"cookies": request.cookies,
|
144
144
|
# files?
|
145
145
|
"absolute_uri": request.build_absolute_uri(),
|
146
146
|
"body": request.body.decode("utf-8"),
|
@@ -192,7 +192,7 @@ def should_capture_request(request):
|
|
192
192
|
|
193
193
|
# This could be an attribute set on request or response
|
194
194
|
# or something more dynamic
|
195
|
-
if "querystats" in request.
|
195
|
+
if "querystats" in request.query_params:
|
196
196
|
return False
|
197
197
|
|
198
198
|
return True
|
plain/dev/views.py
CHANGED
@@ -11,10 +11,12 @@ class RequestsView(TemplateView):
|
|
11
11
|
ctx = super().get_template_context()
|
12
12
|
requestlogs = RequestLog.load_json_logs()
|
13
13
|
|
14
|
-
if self.request.
|
14
|
+
if self.request.query_params.get("log"):
|
15
15
|
try:
|
16
16
|
requestlog = [
|
17
|
-
x
|
17
|
+
x
|
18
|
+
for x in requestlogs
|
19
|
+
if x.get("name") == self.request.query_params["log"]
|
18
20
|
][0]
|
19
21
|
except IndexError:
|
20
22
|
requestlog = None
|
@@ -29,9 +31,9 @@ class RequestsView(TemplateView):
|
|
29
31
|
return ctx
|
30
32
|
|
31
33
|
def post(self):
|
32
|
-
if self.request.
|
34
|
+
if self.request.data.get("action") == "clear":
|
33
35
|
RequestLog.clear()
|
34
36
|
return ResponseRedirect(self.request.path)
|
35
37
|
else:
|
36
|
-
RequestLog.replay_request(self.request.
|
38
|
+
RequestLog.replay_request(self.request.data["log"])
|
37
39
|
return ResponseRedirect(".")
|
@@ -7,11 +7,11 @@ plain/dev/entrypoints.py,sha256=diqNwA6eydUMtoO7p_rH-DtSYsw5-GBmjFe1Z5bHagc,579
|
|
7
7
|
plain/dev/gunicorn_logging.json,sha256=yU23jzs5G4YGdDWBNiyAc3KypR4HirR6afIkD7w6DhU,1113
|
8
8
|
plain/dev/mkcert.py,sha256=fm1U_UTGPREso6ZaP79WqEvd9uvA4lYWFo6fKhNglMM,3911
|
9
9
|
plain/dev/pdb.py,sha256=4ru3rlIIyuYVXteyI7v42i4MmdBIjpJP0IJemBpf83A,3742
|
10
|
-
plain/dev/requests.py,sha256=
|
10
|
+
plain/dev/requests.py,sha256=NH-_FYolAUbh2-m0x9hTdK6AS7HLo6cGETTpp6R-Wto,6857
|
11
11
|
plain/dev/services.py,sha256=bfIXEVsot20cDbyIeRJ9xAiTTVxowHrLAiZM2aOMXDU,2845
|
12
12
|
plain/dev/urls.py,sha256=6fyl-DvxDgKjUjpyhuLN8m6GisB8L-eH4rhYH_eRmGA,188
|
13
13
|
plain/dev/utils.py,sha256=4wMzpvj1Is_c0QxhsTu34_P9wAYlzw4glNPfVtZr_0A,123
|
14
|
-
plain/dev/views.py,sha256=
|
14
|
+
plain/dev/views.py,sha256=yCZ_YmkJGCb3YYgElhzAPrA9V0X3lkiLD1-Ht1HjV7A,1131
|
15
15
|
plain/dev/contribute/README.md,sha256=v9Ympugu2wvDEe_045WJnF1dmC4ZH7v_Bnxkpfaf_rM,329
|
16
16
|
plain/dev/contribute/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
|
17
17
|
plain/dev/contribute/cli.py,sha256=YirzF4YCQoFhWS-JgQHNxqJIX9BY_m9lb3_ZdrI7sn4,3097
|
@@ -24,8 +24,8 @@ plain/dev/poncho/process.py,sha256=JJOKy-C6vMCg7-6JMCtu6C649h7HmOBSJqDP_hnX49I,2
|
|
24
24
|
plain/dev/precommit/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
|
25
25
|
plain/dev/precommit/cli.py,sha256=KVHcG3Y_JZJNu3_MLIrO5s6yMYQfAArIU5L0hNWZUjg,3441
|
26
26
|
plain/dev/templates/dev/requests.html,sha256=kQKJZq5L77juuL_t8UjcAehEU61U4RXNnKaAET-wAm8,7627
|
27
|
-
plain_dev-0.
|
28
|
-
plain_dev-0.
|
29
|
-
plain_dev-0.
|
30
|
-
plain_dev-0.
|
31
|
-
plain_dev-0.
|
27
|
+
plain_dev-0.29.0.dist-info/METADATA,sha256=I1CaEkxMtbFGR_dFf0JTMwbNNmw-2cafYs5-11CINC4,4163
|
28
|
+
plain_dev-0.29.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
29
|
+
plain_dev-0.29.0.dist-info/entry_points.txt,sha256=zrcTOiFk_MLKsnYVlwVP7aMm1XLEqq7w4EBkJ-3ge-g,114
|
30
|
+
plain_dev-0.29.0.dist-info/licenses/LICENSE,sha256=Cx4Dq9yR2fLHthf8Ke36B8QJvE1bZFXVzDIGE8wGzsY,4132
|
31
|
+
plain_dev-0.29.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|