Thank you all for being so fast aswering! I've looking through your answers and I've improved my code altough, I'm stuck with another error right now, wich is:
Environment: Request Method: GET Request URL: http://localhost:8000/saveToDbAndReturn/?sols=%5B%5B%5B%2211C%22,%2211E%22,%229E%22,%2212C%22%5D,%5B%225B%22,%2212A%22,%2210C%22,%2212D%22%5D,%5B%225E%22,%2210F%22,%2211C%22%5D,%5B%2210D%22,%228B%22,%2210A%22%5D,%5B%225C%22,%2210E%22,%2210H%22%5D,%5B%229A%22,%226D%22,%2212G%22%5D,%5B%227A%22,%2212F%22,%2212E%22%5D,%5B%228C%22,%2211B%22%5D,%5B%229C%22,%2210G%22%5D,%5B%226A%22,%2211F%22%5D,%5B%229B%22,%226B%22,%2211G%22%5D,%5B%228E%22,%2210B%22%5D,%5B%225A%22,%2212B%22,%227B%22%5D,%5B%227C%22,%2211A%22%5D,%5B%225D%22,%228D%22%5D,%5B%226E%22,%229D%22%5D,%5B%226C%22,%2211D%22%5D,%5B%227E%22%5D,%5B%227D%22%5D,%5B%228A%22%5D,2700%5D,%5B%5B%227A%22,%2212E%22,%2212F%22,%2212C%22%5D,%5B%225D%22,%229B%22,%2210E%22%5D,%5B%227A%22,%2212D%22,%2210A%22%5D,%5B%2210C%22,%225E%22,%2212A%22%5D,%5B%228C%22,%2210D%22%5D,%5B%229E%22,%2212B%22,%2211C%22,%2211G%22%5D,%5B%225A%22,%227B%22,%2212G%22%5D,%5B%2210F%22,%226E%22,%2211A%22%5D,%5B%229C%22,%226C%22%5D,%5B%2210B%22,%228E%22,%225C%22,%2210H%22%5D,%5B%226D%22,%2210G%22%5D,%5B%2211D%22,%227D%22%5D,%5B%228A%22,%2211E%22%5D,%5B%227E%22,%2211B%22%5D,%5B%229A%22,%226B%22%5D,%5B%2211F%22,%226A%22%5D,%5B%225B%22,%228D%22%5D,%5B%227C%22%5D,%5B%229D%22%5D,%5B%228B%22%5D,2700%5D%5D Django Version: 1.7.4 Python Version: 3.4.2 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'teste1', 'django_pdb') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django_pdb.middleware.PdbMiddleware') Template error: In template E:\Mega\MEOCloud\Django\psi\templates\saveToDbAndReturn.html, error at line 3 Could not parse the remainder: '(sols)' from 'range(sols)' 1 : <div class="panel panel-default"> 2 : 3 : {% for elem in range(sols) %} 4 : 5 : <div class="panel-heading" role="tab" id="heading{{ forloop.counter0 }}"> 6 : <h4 class="panel-title"> 7 : <a data-toggle="collapse" data-parent="#accordion" href="#collapse{{ forloop.counter0 }}" aria-expanded="true" aria-controls="collapse{{ forloop.counter0 }}"> 8 : {{elem}} 9 : </a> 10 : </h4> 11 : </div> 12 : <div id="collapse{{ forloop.counter0 }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading{{ forloop.counter0 }}}"> 13 : <div class="panel-body"> Traceback: File "C:\Python34\lib\site-packages\django\core\handlers\base.py" in get_response 111. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "E:\Mega\MEOCloud\Django\psi\teste1\views.py" in saveToDbAndReturn 47. return render_to_response('saveToDbAndReturn.html', {'sols': sols}) File "C:\Python34\lib\site-packages\django\shortcuts.py" in render_to_response 25. return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) File "C:\Python34\lib\site-packages\django\template\loader.py" in render_to_string 170. t = get_template(template_name, dirs) File "C:\Python34\lib\site-packages\django\template\loader.py" in get_template 144. template, origin = find_template(template_name, dirs) File "C:\Python34\lib\site-packages\django\template\loader.py" in find_template 132. source, display_name = loader(name, dirs) File "C:\Python34\lib\site-packages\django\template\loader.py" in __call__ 44. return self.load_template(template_name, template_dirs) File "C:\Python34\lib\site-packages\django\template\loader.py" in load_template 50. template = get_template_from_string(source, origin, template_name) File "C:\Python34\lib\site-packages\django\template\loader.py" in get_template_from_string 156. return Template(source, origin, name) File "C:\Python34\lib\site-packages\django\template\base.py" in __init__ 132. self.nodelist = compile_string(template_string, origin) File "C:\Python34\lib\site-packages\django\template\base.py" in compile_string 162. return parser.parse() File "C:\Python34\lib\site-packages\django\template\base.py" in parse 290. compiled_result = compile_func(self, token) File "C:\Python34\lib\site-packages\django\template\defaulttags.py" in do_for 832. sequence = parser.compile_filter(bits[in_index + 1]) File "C:\Python34\lib\site-packages\django\template\base.py" in compile_filter 372. return FilterExpression(token, self) File "C:\Python34\lib\site-packages\django\template\base.py" in __init__ 588. "from '%s'" % (token[upto:], token)) Exception Type: TemplateSyntaxError at /saveToDbAndReturn/ Exception Value: Could not parse the remainder: '(sols)' from 'range(sols)' -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/42b5f83c-8da7-47ed-b15c-71b3dffcd65a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.