Commit 0393e277 authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

ajout fonction effacer (main0)

parent 50579a4c
......@@ -34,6 +34,13 @@ def main(request):
return render(request, 'coloriseur.html', {'data': data})
def main0(request):
data = Data()
data.text = ''
data.pphh = []
return render(request, 'coloriseur.html', {'data': data})
def dicoView(request):
data = Entree()
if request.POST.get('inMot') or request.POST.get('inTrans'):
......@@ -17,7 +17,7 @@ from django.contrib import admin
from django.urls import path
from hello.views import loginView, signinView, addUser
from todo.views import todoView, addTodo, deleteTodo
from colorapp.views import main, dicoView, editEntry, redirApp
from colorapp.views import main, dicoView, editEntry, redirApp, main0
urlpatterns = [
......@@ -28,6 +28,7 @@ urlpatterns = [
path('addTodo/', addTodo),
path('deleteTodo/<int:todo_id>/', deleteTodo),
path('app/', main),
path('app/0', main0),
path('app/dico/', dicoView),
path('app/dico/edit/', editEntry)
......@@ -294,5 +294,3 @@ DISALLOW PORT 8000:
sudo ufw delete allow 8000
sudo ufw allow http/tcp
sudo service apache2 restart
\ No newline at end of file
......@@ -14,7 +14,7 @@
<h2>Entrer du texte à coloriser :</h2>
<textarea name="inText">{{ data.text }}</textarea><br/>
<input type="submit" value="Coloriser"/>
<button formaction="/app/">Effacer</button>
<button formaction="/">Effacer</button>
Supports Markdown
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