Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
todo-hf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Várkonyi Kornél
todo-hf
Commits
f0f9aa83
Commit
f0f9aa83
authored
Apr 28, 2019
by
klaus
Browse files
Options
Downloads
Patches
Plain Diff
Add delete
parent
96f30bc8
Branches
varkokonyi
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#746
canceled
Apr 28, 2019
Stage: build
Stage: test
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.py
+11
-0
11 additions, 0 deletions
app.py
templates/list.html
+2
-1
2 additions, 1 deletion
templates/list.html
with
13 additions
and
1 deletion
app.py
+
11
−
0
View file @
f0f9aa83
...
@@ -75,6 +75,17 @@ def resolve_task(task_id):
...
@@ -75,6 +75,17 @@ def resolve_task(task_id):
return
redirect
(
'
/
'
)
# Visszairányítjuk magunkat, megjelennek a változások
return
redirect
(
'
/
'
)
# Visszairányítjuk magunkat, megjelennek a változások
@app.route
(
"
/del/<int:task_id>
"
)
def
delet_task
(
task_id
):
task
=
Task
.
query
.
get
(
task_id
)
if
not
task
:
return
redirect
(
"
/
"
)
else
:
db
.
session
.
delete
(
task
)
db
.
session
.
commit
()
return
redirect
(
"
/
"
)
# Feladatotok az elemtörlés megvlósítása.
# Feladatotok az elemtörlés megvlósítása.
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
templates/list.html
+
2
−
1
View file @
f0f9aa83
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
{% if task.done %}
<strike>
{% endif %}{{ task.content }} {% if task.done %}
</strike>
{% endif %}
{% if task.done %}
<strike>
{% endif %}{{ task.content }} {% if task.done %}
</strike>
{% endif %}
<!-- Hozzunk létre egy linket ami meghívja a task id-ját -->
<!-- Hozzunk létre egy linket ami meghívja a task id-ját -->
<a
href=
"/done/{{ task.id }}"
>
X
</a>
<a
href=
"/done/{{ task.id }}"
>
X
</a>
<a
href=
"/del/{{ task.id }}"
>
DELET DIS
</a>
</li>
</li>
<!-- Zárjuk le a for-t -->
<!-- Zárjuk le a for-t -->
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment