Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
BuJo2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jose Luis Bautista
BuJo2
Commits
cadfeb2b
Commit
cadfeb2b
authored
Apr 09, 2021
by
Jose Luis Bautista
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Mark as Done
parent
a21dddca
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
2 deletions
+28
-2
models.cpython-39.pyc
BauJo/BauDB/__pycache__/models.cpython-39.pyc
+0
-0
urls.cpython-39.pyc
BauJo/BauDB/__pycache__/urls.cpython-39.pyc
+0
-0
views.cpython-39.pyc
BauJo/BauDB/__pycache__/views.cpython-39.pyc
+0
-0
models.py
BauJo/BauDB/models.py
+3
-0
urls.py
BauJo/BauDB/urls.py
+1
-0
views.py
BauJo/BauDB/views.py
+9
-1
today.html
BauJo/BauJo/templates/today.html
+15
-1
No files found.
BauJo/BauDB/__pycache__/models.cpython-39.pyc
View file @
cadfeb2b
No preview for this file type
BauJo/BauDB/__pycache__/urls.cpython-39.pyc
View file @
cadfeb2b
No preview for this file type
BauJo/BauDB/__pycache__/views.cpython-39.pyc
View file @
cadfeb2b
No preview for this file type
BauJo/BauDB/models.py
View file @
cadfeb2b
...
...
@@ -24,6 +24,9 @@ class today_model(models.Model):
def
today_delete
(
self
):
return
reverse
(
'today_delete'
,
args
=
[
str
(
self
.
id
)])
def
today_done
(
self
):
return
reverse
(
'today_done'
,
args
=
[
str
(
self
.
id
)])
# def deltwtask(self):
# return reverse('deletetwtask', args=[str(self.id)])
BauJo/BauDB/urls.py
View file @
cadfeb2b
...
...
@@ -36,4 +36,5 @@ urlpatterns = [
path
(
'new_image/'
,
ProfileImageView
.
as_view
(),
name
=
'new_image'
),
path
(
'new_today_update/<int:pk>/'
,
TodayUpdateView
.
as_view
(),
name
=
'new_today_update'
),
path
(
'today_delete/<int:pk>/'
,
TodayDeleteView
.
as_view
(),
name
=
'today_delete'
),
path
(
'today_done/<int:pk>/'
,
page_today_done
,
name
=
'today_done'
),
]
+
static
(
settings
.
MEDIA_URL
,
document_root
=
settings
.
MEDIA_ROOT
)
BauJo/BauDB/views.py
View file @
cadfeb2b
...
...
@@ -52,6 +52,13 @@ def new_key(request):
return
render
(
request
,
'update.html'
,
{
'form'
:
form
})
def
page_today_done
(
request
,
pk
):
done
=
today_model
.
objects
.
get
(
id
=
pk
)
done
.
keyModel
=
key_model
.
objects
.
get
(
id
=
30
)
done
.
save
()
return
redirect
(
'today'
)
def
page_today
(
request
):
myDate
=
datetime
.
now
()
...
...
@@ -121,4 +128,5 @@ class TodayDeleteView(DeleteView):
form_class
=
today
def
get_success_url
(
self
):
return
reverse
(
'today'
)
\ No newline at end of file
return
reverse
(
'today'
)
BauJo/BauJo/templates/today.html
View file @
cadfeb2b
...
...
@@ -10,10 +10,24 @@
{% for x in object_list %}
{{x.keyModel.keyName}} : {{x.todayDesc}} |
{% if x.keyModel.keyName == '• Task' %}
{{x.keyModel.keyName}} : {{x.todayDesc}} ||
<a
href =
"{{ x.today_edit }}"
><button>
Edit
</button></a>
<a
href =
"{{ x.today_delete }}"
><button>
Delete
</button></a>
<a
href =
"{{ x.today_done }}"
><button>
Mark as Done
</button></a>
<br>
{% else %}
{{x.keyModel.keyName}} : {{x.todayDesc}} ||
<a
href =
"{{ x.today_edit }}"
><button>
Edit
</button></a>
<a
href =
"{{ x.today_delete }}"
><button>
Delete
</button></a>
<br>
{% endif %}
{% endfor %}
<br>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment