django-botmanager 0.2.20__py3-none-any.whl → 0.2.21__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.
Potentially problematic release.
This version of django-botmanager might be problematic. Click here for more details.
- botmanager/admin.py +7 -2
- {django_botmanager-0.2.20.dist-info → django_botmanager-0.2.21.dist-info}/METADATA +1 -1
- {django_botmanager-0.2.20.dist-info → django_botmanager-0.2.21.dist-info}/RECORD +6 -6
- {django_botmanager-0.2.20.dist-info → django_botmanager-0.2.21.dist-info}/LICENSE +0 -0
- {django_botmanager-0.2.20.dist-info → django_botmanager-0.2.21.dist-info}/WHEEL +0 -0
- {django_botmanager-0.2.20.dist-info → django_botmanager-0.2.21.dist-info}/top_level.txt +0 -0
botmanager/admin.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import os
|
|
3
3
|
|
|
4
4
|
from django.contrib import admin
|
|
5
|
-
from django.http import HttpResponseNotFound,
|
|
5
|
+
from django.http import HttpResponseNotFound, StreamingHttpResponse
|
|
6
6
|
from django.shortcuts import get_object_or_404
|
|
7
7
|
from django.urls import path
|
|
8
8
|
from django.utils.html import escape
|
|
@@ -54,6 +54,11 @@ class TaskAdmin(admin.ModelAdmin):
|
|
|
54
54
|
]
|
|
55
55
|
return custom_urls + urls
|
|
56
56
|
|
|
57
|
+
@staticmethod
|
|
58
|
+
def file_generator(file_name):
|
|
59
|
+
with open(file_name, "rb") as file:
|
|
60
|
+
yield from file
|
|
61
|
+
|
|
57
62
|
def open_logfile(self, request, task_id):
|
|
58
63
|
task = get_object_or_404(Task, pk=task_id)
|
|
59
64
|
imported_class = [
|
|
@@ -70,7 +75,7 @@ class TaskAdmin(admin.ModelAdmin):
|
|
|
70
75
|
file_path = os.path.join(dir, folder, filename) + ".log"
|
|
71
76
|
|
|
72
77
|
if os.path.exists(file_path):
|
|
73
|
-
return
|
|
78
|
+
return StreamingHttpResponse(self.file_generator(file_path), content_type="text/event-stream")
|
|
74
79
|
else:
|
|
75
80
|
return HttpResponseNotFound()
|
|
76
81
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
botmanager/__init__.py,sha256=p093xeQ7-p1sMH-FycACIIoomZNXCB7KgpjKBQuDL84,73
|
|
2
|
-
botmanager/admin.py,sha256=
|
|
2
|
+
botmanager/admin.py,sha256=oeLgxc2briLeXZjT1jE3DKWpYh65QY3qBctEpV4ggDU,3159
|
|
3
3
|
botmanager/apps.py,sha256=LeNG6Fr77QcsOSjyBAKEldYqqI2zUOmCFt3P3Sq9pSI,135
|
|
4
4
|
botmanager/basetask.py,sha256=8VqUVMbEyq0Um5nlNSvdoj6NUjBn43TLPH97xGduqcs,7829
|
|
5
5
|
botmanager/models.py,sha256=sQUzgZoIAWYXcxmv4MsjJ7iuaSQVSTx_f_D4xZvmx0k,3674
|
|
@@ -21,8 +21,8 @@ botmanager/migrations/0010_auto_20170531_1321.py,sha256=VnfOWMBI_fuBGmH1NOuXzA5k
|
|
|
21
21
|
botmanager/migrations/0011_alter_task_create_dt_alter_task_id.py,sha256=-bR0dQFj_ncNKJLQSVF_aDLIYNkNzkbFcsyWF6vMB2w,706
|
|
22
22
|
botmanager/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
botmanager/templates/botmanager/task/change_form.html,sha256=kwcZ72z_YgNJgWOKNE_jS1WXk7YDvo50r0kdLBXLhmU,277
|
|
24
|
-
django_botmanager-0.2.
|
|
25
|
-
django_botmanager-0.2.
|
|
26
|
-
django_botmanager-0.2.
|
|
27
|
-
django_botmanager-0.2.
|
|
28
|
-
django_botmanager-0.2.
|
|
24
|
+
django_botmanager-0.2.21.dist-info/LICENSE,sha256=drrREcwMWVwKpmlpyKh6ytsBFonOm2GbADAJD3WzjKY,1479
|
|
25
|
+
django_botmanager-0.2.21.dist-info/METADATA,sha256=CYy-wfoYNIouvF84sK6K_1qgsliJdMVmZ_9VstggFGk,324
|
|
26
|
+
django_botmanager-0.2.21.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
27
|
+
django_botmanager-0.2.21.dist-info/top_level.txt,sha256=gq7opmRFT7PQifLHi-_hCCtsMjAAiH87radGZ13utgM,11
|
|
28
|
+
django_botmanager-0.2.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|