Reports dynamic

parent 4d330260
# coding=utf-8
from __future__ import absolute_import
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from celery import app as celery_app
\ No newline at end of file
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from celery import Celery
app = Celery('GeoInt_SIDT',
broker='amqp://',
backend='amqp://',
include=['GeoInt_SIDT.tasks'])
# Optional configuration, see the application user guide.
app.conf.update(
result_expires=3600,
)
if __name__ == '__main__':
app.start()
\ No newline at end of file
# coding=utf-8
from __future__ import absolute_import, unicode_literals
from .celery import app
@app.task
def add(x, y):
if x > y:
return "x es mayor"
elif x < y:
return "y es mayor"
else:
return "son iguales"
@app.task
def mul(x, y):
return x * y
@app.task
def xsum(numbers):
return sum(numbers)
@app.task
def names(name):
return (name)
\ No newline at end of file
function openmodal(info) {
info2 = info.split(";");
$("#myModal").modal();
$("#log_info").append(info2);
}
function refresh() {
$.ajax({
dataType: "json",
url: 'Reload',
success: function (data) {
$.each(data, function (key, val) {
console.log(key + " = " + val.purchase_id + "" + val.progress)
if (val.progress != 100) {
$('#progress_bar' + val.purchase_id + '').attr("aria-valuenow", val.progress);
$('#progress_bar' + val.purchase_id + '').attr('style', 'width:' + val.progress + '%');
document.getElementById('progess_value' + val.purchase_id).innerHTML = val.progress + ' %';
$('#progress_bar' + val.purchase_id + '').attr("class", "progress-bar progress-bar-warning progress-bar-striped active");
$('#view_report' + val.purchase_id + '').attr('disabled', 'false');
$('#action_buttons' + val.purchase_id + '').attr("class", "hidden");
$('#main_progess' + val.purchase_id + '').removeClass("hidden");
$('#main_progess' + val.purchase_id + '').attr("class", "progress");
}
else {
$('#progress_bar' + val.purchase_id + '').attr("class", "progress-bar progress-bar-success progress-bar-striped");
$('#progress_bar' + val.purchase_id + '').attr("aria-valuenow", val.progress);
$('#progress_bar' + val.purchase_id + '').attr('style', 'width:' + val.progress + '%');
document.getElementById('progess_value' + val.purchase_id).innerHTML = val.progress + ' %';
$('#view_report' + val.purchase_id + '').removeAttr("disabled");
$('#view_report' + val.purchase_id + '').attr("href", "{{ BASE_URL }}/reports/T15QZD_sclData/" + val.purchase_id);
$('#main_progess' + val.purchase_id + '').attr("class", "hidden");
$('#action_buttons' + val.purchase_id + '').removeClass("hidden");
}
});
}
});
};
$(function () {
refresh();
var int = setInterval("refresh()", 1000);
});
$(function () {
$('#reportPage').show();
});
\ No newline at end of file
{% extends "base_top.html" %}
{% load staticfiles %}
{% block headMedia %}
<link rel="stylesheet" href="{% static 'catalog/css/body.css' %}" type="text/css">
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.13.4/dist/bootstrap-table.min.css">
<script src="https://unpkg.com/bootstrap-table@1.13.4/dist/bootstrap-table.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.6.2/core.min.js"></script>
{% endblock %}
{% block messages %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i>
<span class="label label-success">4</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 4 messages</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- start message -->
<a href="#">
<div class="pull-left">
<img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Support Team
<small><i class="fa fa-clock-o"></i> 5 mins</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<!-- end message -->
<li>
<a href="#">
<div class="pull-left">
<img src="dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
</div>
<h4>
AdminLTE Design Team
<small><i class="fa fa-clock-o"></i> 2 hours</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
</ul>
</li>
<li class="footer"><a href="#">See All Messages</a></li>
</ul>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i>
<span class="label label-success">4</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 4 messages</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- start message -->
<a href="#">
<div class="pull-left">
<img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Support Team
<small><i class="fa fa-clock-o"></i> 5 mins</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<!-- end message -->
<li>
<a href="#">
<div class="pull-left">
<img src="dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
</div>
<h4>
AdminLTE Design Team
<small><i class="fa fa-clock-o"></i> 2 hours</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
</ul>
</li>
<li class="footer"><a href="#">See All Messages</a></li>
</ul>
{% endblock %}
{% block notifications %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span class="label label-warning">10</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 10 notifications</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li>
<a href="#">
<i class="fa fa-productList text-aqua"></i> 5 new members joined today
</a>
</li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span class="label label-warning">10</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 10 notifications</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li>
<a href="#">
<i class="fa fa-productList text-aqua"></i> 5 new members joined today
</a>
</li>
</li>
</ul>
</li>
<li class="footer"><a href="#">View all</a></li>
</ul>
</li>
</ul>
</li>
<li class="footer"><a href="#">View all</a></li>
</ul>
{% endblock %}
{% block tasks %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-flag-o"></i>
<span class="label label-danger">9</span>
</a>
<ul c{% load static %}lass="dropdown-menu">
<li class="header">You have 9 tasks</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- Task item -->
<a href="#">
<h3>
Design some buttons
<small class="pull-right">20%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar"
aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">20% Complete</span>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-flag-o"></i>
<span class="label label-danger">9</span>
</a>
<ul c{% load static %}lass="dropdown-menu">
<li class="header">You have 9 tasks</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- Task item -->
<a href="#">
<h3>
Design some buttons
<small class="pull-right">20%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar"
aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">20% Complete</span>
</div>
</div>
</div>
</a>
</li>
<!-- end task item -->
</ul>
</li>
<li class="footer">
<a href="#">View all tasks</a>
</li>
</ul>
</a>
</li>
<!-- end task item -->
</ul>
</li>
<li class="footer">
<a href="#">View all tasks</a>
</li>
</ul>
{% endblock %}
{% block sidebar %}
<div class="form-group">
<br>
<ul class="sidebar-menu" data-widget="tree">
<li>
<a class="treeview " href="{{ BASE_URL }}/catalog">
<i class="fa fa-map"></i>
<span>Home</span>
<span class="pull-right-container">
<div class="form-group">
<br>
<ul class="sidebar-menu" data-widget="tree">
<li>
<a class="treeview " href="{{ BASE_URL }}/catalog">
<i class="fa fa-map"></i>
<span>Home</span>
<span class="pull-right-container">
<span class="label label-primary pull-right"></span>
</span>
</a>
</li>
</ul>
</div>
<!-- form-group-->
</a>
</li>
</ul>
</div>
<!-- form-group-->
{% endblock %}
{% block user %}
{% include "user_button.html" %}
{% include "user_button.html" %}
{% endblock %}
{% block content %}
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<div id="reportPage" class="wrapper" style="background-color: #ecf0f5">
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<section class="content">
<div class="panel panel-default">
<div class="panel-heading">Reports</div>
<div class="panel-body">
<table data-toggle="table" class="table table-hover table-bordered">
<thead>
<th>Process</th>
<th>Purchase date</th>
<th>Start Date</th>
<th>End Date</th>
<!--th>Clouds %</th-->
<th>Progress %</th>
<th>Estimated Size</th>
<th>Actions</th>
</thead>
<tbody>
{% for product in productList%}
<tr>
<td>{{product.process}}</td>
<td>{{product.purchase_date}}</td>
<td>{{product.startDate}}</td>
<td>{{product.endDate}}</td>
<!--td>{{product.clouds}} %</td-->
<td class="text-center">
<div class="progress">
<div role="progressbar" aria-valuenow="{{product.progress}}"
{% if product.progress == 100 %}
class="progress-bar-success"
{% else %}
class="progress-bar"
{% endif %}
aria-valuemin="0"
aria-valuemax="100" style="width:{{product.progress}}%">
<p class="text-center" style="color: #0a0a0a">{{product.progress}} % </p>
</div>
</div>
</td>
<td>{{product.size}}</td>
<td class="text-center">
<a title="View Report" {% if product.progress == 100 %}
href="{{ BASE_URL }}/reports/T15QZD_sclData/{{product.purchase_id}}"
{% else %}
href="#"
disabled
{% endif %} class="btn btn-success">
<i class="fa fa-eye"></i>
</a>
<a title="Download zip" {% if product.progress == 100 %}
href="#"
{% else %}
href="#"
disabled
{% endif %} class="btn btn-warning">
<i class="fa fa-file-zip-o"></i>
</a>
<a title="View Log" href="#" class="btn btn-info" onclick="openmodal('{{product.log_info}}')">
<i class="fa fa-file-text"></i>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul class="pagination">
{% if productList.has_previous %}
<li><a href="?page={{ productList.previous_page_number }}">&laquo;</a></li>
{% else %}
<li class="disabled"><span>&laquo;</span></li>
{% endif %}
{% for i in productList.paginator.page_range %}
{% if productList.number == i %}
<li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
{% else %}
<li><a href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if productList.has_next %}
<li><a href="?page={{ productList.next_page_number }}">&raquo;</a></li>
{% else %}
<li class="disabled"><span>&raquo;</span></li>
{% endif %}
<li class="disabled"><span>Page {{ productList.number }} of {{ productList.paginator.num_pages }}.</span></li>
</ul>
<div id="reportPage" class="wrapper" style="background-color: #ecf0f5; display: none">
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<section class="content">
<div class="panel panel-default">
<div class="panel-heading">Reports</div>
<div class="panel-body" id="mytable">
<table data-toggle="table" class="table table-hover table-bordered">
<thead>
<th>Process</th>
<th>Purchase date</th>
<th>Start Date</th>
<th>End Date</th>
<!--th>Clouds %</th-->
<th>Estimated Size</th>
<th>Actions</th>
</thead>
<tbody id="table_body">
{% for product in productList %}
<tr>
<td>{{ product.process }}</td>
<td>{{ product.purchase_date }}</td>
<td>{{ product.startDate }}</td>
<td>{{ product.endDate }}</td>
<!--td>{{product.clouds}} %</td-->
<td>{{ product.size }}</td>
<td class="text-center">
<div class="progress" id="main_progess{{ product.purchase_id }}"
{% if product.progress == 100 %} class="hidden" {% endif %}>
<div id="progress_bar{{ product.purchase_id }}" role="progressbar"
aria-valuenow="{{ product.progress }}"
{% if product.progress == 100 %}
class="progress-bar progress-bar-success progress-bar-striped"
{% else %}
class="progress-bar progress-bar-warning progress-bar-striped active"
{% endif %}
aria-valuemin="0"
aria-valuemax="100" style="width:{{ product.progress }}%">
<p class="text-center" style="color: #0a0a0a"
id="progess_value{{ product.purchase_id }}">
{% if product.progress == 100 %}
100 %
{% else %}
{{ product.progress }} %
{% endif %}
</p>
</div>
</div>
<div id="action_buttons{{ product.purchase_id }}" {% if product.progress != 100 %}
class="hidden" {% endif %}>
<a id="view_report{{ product.purchase_id }}" title="View Report"
{% if product.progress == 100 %}
href="{{ BASE_URL }}/reports/T15QZD_sclData/{{ product.purchase_id }}"
{% else %}
href="#"
disabled
{% endif %} class="btn btn-success">
<i class="fa fa-eye"></i>
</a>
<a title="Download zip" {% if product.progress == 100 %}
href="#"
disabled
{% else %}
href="#"
disabled
{% endif %} class="btn btn-warning">
<i class="fa fa-file-zip-o"></i>
</a>
<!--a title="View Log" href="#" class="btn btn-info"
onclick="openmodal('{{ product.log_info }}')">
<i class="fa fa-file-text"></i>
</a-->
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul class="pagination">
{% if productList.has_previous %}
<li><a href="?page={{ productList.previous_page_number }}">&laquo;</a></li>
{% else %}
<li class="disabled"><span>&laquo;</span></li>
{% endif %}
{% for i in productList.paginator.page_range %}
{% if productList.number == i %}
<li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
{% else %}
<li><a href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if productList.has_next %}
<li><a href="?page={{ productList.next_page_number }}">&raquo;</a></li>
{% else %}
<li class="disabled"><span>&raquo;</span></li>
{% endif %}
<li class="disabled">
<span>Page {{ productList.number }} of {{ productList.paginator.num_pages }}.</span></li>
</ul>
</div>
</div>
</div>
</section>
<!-- /.content -->
</div>
</section>
<!-- /.content -->
</div>
<!-- Footer -->
<footer class=" page-footer font-small special-color-dark pt-5" style="bottom: 0; position: absolute">
<!-- Footer Elements -->
<div class="container">
<!-- Social buttons
<ul class="list-unstyled list-inline text-center">
<li class="list-inline-item">
<a class="btn-floating btn-fb mx-1">
<i class="fa fa-faceboo"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-tw mx-1">
<i class="fa fa-twitter"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-gplus mx-1">
<i class="fa fa-google-plus"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-li mx-1">
<i class="fa fa-linkedin"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-dribbble mx-1">
<i class="fa fa-dribbble"> </i>
</a>
</li>
</ul>
<!-- Social buttons -->
<!-- Footer -->
<footer class=" page-footer font-small special-color-dark pt-5" style="bottom: 0; position: absolute">
<!-- Footer Elements -->
<div class="container">
</div>
<!-- Footer Elements -->
</div>
<!-- Footer Elements -->
<!-- Copyright -->
<div class="footer-copyright text-center py-3">© 2018 Copyright:
<a href="http://geoint.mx/"> Centro de Investigación en Ciencias de Información Geoespacial.</a>
</div>
<!-- Copyright -->
<!-- Copyright -->
<div class="footer-copyright text-center py-3">© 2018 Copyright:
<a href="http://geoint.mx/"> Centro de Investigación en Ciencias de Información Geoespacial.</a>
</div>
<!-- Copyright -->
</footer>
<!-- /.Footer -->
<!-- Modals -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
</footer>
<!-- /.Footer -->
<!-- Modals -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Log file</h4>
</div>
<div class="modal-body" style="overflow-y: auto; height: 250px;">
<p id="log_info"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Log file</h4>
</div>
<div class="modal-body" style="overflow-y: auto; height: 250px;">
<p id="log_info"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<!-- /.modals -->
<!-- /.modals -->
{% endblock %}
{% block scripts %}
<script>
function openmodal(info) {
info2 = info.split(";");
$("#myModal").modal();
$("#log_info").append(info2);
}
</script>
{% endblock%}
\ No newline at end of file
{% block scripts %}
<script src="{% static 'reports/js/scripts.js' %}"></script>
{% endblock %}
\ No newline at end of file
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from django.test import TestCase
# Create your tests here.
from celery import shared_task
@shared_task
def add(x, y):
return x + y
@shared_task
def mul(x, y):
return x * y
@shared_task
def xsum(numbers):
return sum(numbers)
......@@ -7,5 +7,6 @@ urlpatterns = [
url(r'^(?P<report>[\w\-]+)/(?P<purchase_id>(\d+))$', views.report_L2ASCL, name='report'),
url(r'^$', views.Reports, name='reports'),
url(r'^Reload$', views.Reload, name='Reload'),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import io
import json
import os
# Create your views here.
from collections import OrderedDict
from django.core.paginator import Paginator
from django.http import FileResponse
from reportlab.pdfgen import canvas
from django.shortcuts import render
from django.http import HttpResponse, Http404
from django.shortcuts import render, render_to_response
# Create your views here.
from collections import OrderedDict
import json
import os
from GeoInt_SIDT.tasks import add
from catalog.models import Purchase
from GeoInt_SIDT.tasks import *
# -------------------------------------------------------------------------------
from reportlab.pdfgen import canvas
from GeoInt_SIDT import settings
from catalog.models import CartProduct, Purchase, Search
########### lee archivo de configuración ################
dirname = os.path.dirname(__file__)
......@@ -28,13 +25,14 @@ with open(configfile, 'r') as f:
USERS_PATH = config['PATHS']['PATH_USERS']
###########################################################
def report_L2ASCL(request, report,purchase_id):
#image_path =USERS_PATH + request.user.email+"/"+purchase_id+"/"+"out/T15QZD/TCI/"
image_path =request.user.email+"/"+purchase_id+"/"+"out/T15QZD/TCI/"
with open(USERS_PATH + request.user.email+"/"+purchase_id+"/" + report + ".json") as f:
def report_L2ASCL(request, report, purchase_id):
# image_path =USERS_PATH + request.user.email+"/"+purchase_id+"/"+"out/T15QZD/TCI/"
image_path = request.user.email + "/" + purchase_id + "/" + "out/T15QZD/TCI/"
with open(USERS_PATH + request.user.email + "/" + purchase_id + "/" + report + ".json") as f:
json_data = OrderedDict(json.load(f))
graphData = dict()
graphData['type'] = "line"
......@@ -46,7 +44,6 @@ def report_L2ASCL(request, report,purchase_id):
labels = set()
for d in json_data:
labels |= set(json_data[d].keys())
print(labels)
labels.remove('date')
labelNames = [
......@@ -79,7 +76,7 @@ def report_L2ASCL(request, report,purchase_id):
# print(settings.BASE_URL)
# graphData['options']['responsive']=True
# graphData['options']['maintainAspectRatio']=False
# print(json.dumps(graphData).encode("utf-8"))
# print(json.dumps(graphData).encode("utf-8"))
return render(request, 'L2ASCL_data.html', {"graphData": json.dumps(graphData), "report_name": report, "IMAGE_PATH": image_path, 'dafaultLabel': defaultLabel, 'defaultDataSet': defaultDataset})
......@@ -88,9 +85,11 @@ def report_L2ASCL(request, report,purchase_id):
def Reports(request):
progress = 0
productList=[]
productList = []
size = 0
product_list = Purchase.objects.values('id','productList','aggreg_date','search__clouds' ,'search__startDate', 'search__endDate','search__process_id__name').filter(user_id=request.user.id, purchased=1)
product_list = Purchase.objects.values('id', 'productList', 'aggreg_date', 'search__clouds', 'search__startDate',
'search__endDate', 'search__process_id__name').filter(
user_id=request.user.id, purchased=1)
for producto in product_list:
log_info = USERS_PATH + request.user.email + "/" + str(producto['id']) + "/L2ASCL_AreaProcessing.log"
......@@ -108,21 +107,19 @@ def Reports(request):
if 'Finalizing...' in open(log_info).read():
progress = 100
with open(log_info, 'r') as myfile:
log = myfile.read().replace('\n', '')
for p in json.loads(producto['productList']):
size = size + float(p['info']['size'][:-3])
if size > 1000:
size2 = size/1000
final_size = str(round(size2,2)) + " GB"
size2 = size / 1000
final_size = str(round(size2, 2)) + " GB"
else:
final_size = str(round(size,2))+ " MB"
final_size = str(round(size, 2)) + " MB"
productList.append({
"process" : producto['search__process_id__name'],
"process": producto['search__process_id__name'],
"purchase_date": producto['aggreg_date'],
"startDate": producto['search__startDate'],
"endDate": producto['search__endDate'],
......@@ -140,6 +137,45 @@ def Reports(request):
page = request.GET.get('page')
productList = paginator.get_page(page)
return render(request, 'Reports.html', {"productList": productList})
return render(request, 'Reports.html', {"productList": productList})
# ------------------------------------------------------------------------
def Reload(request):
if request.is_ajax():
progress = 0
productList2 = []
product_list = Purchase.objects.values('id', 'productList', 'aggreg_date', 'search__clouds',
'search__startDate', 'search__endDate',
'search__process_id__name').filter(user_id=request.user.id, purchased=1)
for producto in product_list:
log_info = USERS_PATH + request.user.email + "/" + str(producto['id']) + "/L2ASCL_AreaProcessing.log"
#####################################################
# progress bar #
#####################################################
if 'Linking Products...' in open(log_info).read():
progress = 20
if 'Merging Images...' in open(log_info).read():
progress = 40
if 'Deleting Images...' in open(log_info).read():
progress = 50
if 'Extracting SCL information...' in open(log_info).read():
progress = 60
if 'Finalizing...' in open(log_info).read():
progress = 100
productList2.append({
"purchase_id": producto['id'],
"progress": progress,
})
return HttpResponse(json.dumps(productList2))
else:
raise Http404
# ------------------------------------------------------------------------
# def tareas():
# result = add.apply_async((2, 1), countdown=3)
# result.get()
# return render_to_response('reports_table.html', {"result": result.get()})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment