Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IoTSmartMeter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
kristian.tan
IoTSmartMeter
Commits
78811e2f
Commit
78811e2f
authored
Nov 13, 2019
by
Kristian Tan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add entry to db
parent
129b084d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app.py
app.py
+2
-1
main.html
templates/main.html
+1
-1
No files found.
app.py
View file @
78811e2f
...
@@ -74,7 +74,8 @@ def create_entry(change_pin):
...
@@ -74,7 +74,8 @@ def create_entry(change_pin):
db
.
create_all
()
db
.
create_all
()
db
.
session
.
add
(
DailyUsage
(
date
=
date
(
2019
,
11
,
12
),
kwhUsed
=
8
))
db
.
session
.
commit
()
daily_total
=
get_todays_usage
()
daily_total
=
get_todays_usage
()
todays_cost
=
get_todays_cost
()
todays_cost
=
get_todays_cost
()
...
...
templates/main.html
View file @
78811e2f
...
@@ -109,4 +109,4 @@
...
@@ -109,4 +109,4 @@
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
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