rascunho

commit 9c1c1af9e7a3f3fb7a9adc8f094255255e6603d9

Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>

Redirect instead of rendering on the same route

 core/blueprints/basic.py | 4 ++--


diff --git a/core/blueprints/basic.py b/core/blueprints/basic.py
index 9f4375fd32911f582673960d12df63e8326e729e..37a0fa7cbe2a94e2ec52846c1fee74ef54204688 100644
--- a/core/blueprints/basic.py
+++ b/core/blueprints/basic.py
@@ -1,4 +1,4 @@
-from flask import Blueprint, render_template, request, abort, Response
+from flask import Blueprint, render_template, request, abort, Response, redirect, url_for
 from core.database import db
 from core.types.document import Document
 from hashlib import sha1
@@ -56,4 +56,4 @@     db.add(doc)
     db.commit()
     db.flush()
 
-    return render_template('preview.html', doc = doc)
+    return redirect(url_for('basic.show', sha = doc.sha))