Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
m3_webInterface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
m3
m3_webInterface
Commits
d5ad079b
Commit
d5ad079b
authored
Mar 31, 2025
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manejo del get
parent
10def49f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
views.py
catalog/views.py
+10
-1
No files found.
catalog/views.py
View file @
d5ad079b
...
@@ -579,6 +579,13 @@ def write_execution_date(log_file='log.txt'):
...
@@ -579,6 +579,13 @@ def write_execution_date(log_file='log.txt'):
with
open
(
log_file
,
'w'
)
as
file
:
with
open
(
log_file
,
'w'
)
as
file
:
file
.
write
(
today
.
strftime
(
'
%
Y-
%
m-
%
d'
))
file
.
write
(
today
.
strftime
(
'
%
Y-
%
m-
%
d'
))
from
django.http
import
JsonResponse
,
HttpResponseNotAllowed
import
json
import
datetime
import
requests
from
django.core.management
import
call_command
from
django.views.decorators.csrf
import
csrf_exempt
@
csrf_exempt
@
csrf_exempt
def
run_update_and_report
(
request
):
def
run_update_and_report
(
request
):
if
request
.
method
==
'POST'
:
if
request
.
method
==
'POST'
:
...
@@ -612,4 +619,6 @@ def run_update_and_report(request):
...
@@ -612,4 +619,6 @@ def run_update_and_report(request):
return
JsonResponse
({
'status'
:
'success'
,
'message'
:
f
'Report generated at {json_output_path}'
,
'api_response'
:
response
.
json
()})
return
JsonResponse
({
'status'
:
'success'
,
'message'
:
f
'Report generated at {json_output_path}'
,
'api_response'
:
response
.
json
()})
except
Exception
as
e
:
except
Exception
as
e
:
return
JsonResponse
({
'status'
:
'error'
,
'message'
:
str
(
e
)},
status
=
500
)
return
JsonResponse
({
'status'
:
'error'
,
'message'
:
str
(
e
)},
status
=
500
)
\ No newline at end of file
return
HttpResponseNotAllowed
([
'POST'
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment