eddyharrington / tendie-tracker Goto Github PK
View Code? Open in Web Editor NEWA web app for tracking expenses and budgets
Home Page: https://tendie-tracker.herokuapp.com
License: MIT License
A web app for tracking expenses and budgets
Home Page: https://tendie-tracker.herokuapp.com
License: MIT License
Some users are reporting that when they try to update an expense record, they get an error message: "The expense record you're trying to update doesn't exist"
Feature requests from CS50 Facebook group:
Budget scenario: as a user who budgets month to month and has varying income/expense levels as a result, I want the ability to configure my budgets monthly instead of annually, so that budgets can be scoped smaller and tracked more closely.
Income scenario: as a user with varying monthly income (e.g. freelancer), I want the ability to set income month to month instead of annually, so that weekly/monthly expenses can be tracked more clearly.
Suggested enhancement to make it easier to change a recent expense, instead of having to go through multiple clicks/pages to the Expense History.
Hi Eddy!
I'm trying to make your app work locally without success. As I've tried to use a macbook, I have tried to modify your instructions.
The goal was to use an 'ad-free' expense tracker, and since I'm in India, I wanted to customize it to use the local currency.
I followed your instructions till step 4, but the create database part got me stuck.
I just ended up copy pasting your .txt
file after running psql postgres
and when I tried to run my app I got the following nasty error.
Use a production WSGI server instead.
* Debug mode: off
Traceback (most recent call last):
File "/usr/local/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/__main__.py", line 15, in <module>
main(as_module=True)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 967, in main
cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 848, in run_command
app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 305, in __init__
self._load_unlocked()
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 330, in _load_unlocked
self._app = rv = self.loader()
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 392, in load_app
app = locate_app(self, import_name, None, raise_if_not_found=False)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 240, in locate_app
__import__(module_name)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/app.py", line 6, in <module>
import tendie_dashboard
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/tendie_dashboard.py", line 3, in <module>
import tendie_budgets
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/tendie_budgets.py", line 3, in <module>
import tendie_categories
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/tendie_categories.py", line 10, in <module>
engine = create_engine(os.getenv("DATABASE_URL"))
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/sqlalchemy/engine/__init__.py", line 479, in create_engine
return strategy.create(*args, **kwargs)
File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 56, in create
plugins = u._instantiate_plugins(kwargs)
AttributeError: 'NoneType' object has no attribute '_instantiate_plugins'
I have created a .env
file with your given code (but have not replaced user and password with anything since I don't know what to put, my db username is hargunoberoi and no password).
Any help would be appreciated, as you may be glad someone found your work useful. :)
UPDATE:
I got it to work somehow! Still learning about databases.
Issue # | Location | Issue | Details |
---|---|---|---|
1 | Dashboard - Your Expenses | 2020 Expenses card - title of card needs to be dynamic to current year | Root cause: '2020' is static in the HTML Location: index.html , line 101 |
2 | Dashboard - Your Expenses | Monthly Expenses card - incorrect sum | Root cause: SQL query sums all expenses in the current month only, which includes any year. Location: tendie_dashboard.py , line 29 |
3 | Dashboard - Your Expenses | Weekly Expenses card - incorrect sum | Root cause: same as issue 2 Location: tendie_dashboard.py , line 41 |
4 | Dashboard - Weekly Spending | Line graph has incorrect sums | Root cause: same as issue 2 Location: tendie_dashboard.py , line 122 |
5 | Dashboard - Monthly Spending | Bar chart has incorrect sums / includes last years expenses | Root cause: this chart is 'looking back 12 months' so it's including 2020 data in 2021 which is confusing. Also, its confusing because the same chart is in reports which is explicitly 'last 12 months'. Dashboard should ONLY show current calendar year spending. Location: tendie_dashboard.py , line 154Note: has a dependency on tendie_reports.py line 54 |
6 | Dashboard - Spending Habits | Bubble chart has incorrect sums / includes last years expenses | Root cause: same as issue 5 Location: tendie_dashboard.py , line 173Note: has a dependency on tendie_reports.py , line 60 |
7 | Dashboard - Payer Spending | Pie chart has incorrect sums / includes last year expenses | Root cause: same as issue 5 Location: tendie_reports.py , line 146 and line 151 |
8 | Dashboard - Last 5 Expenses | Last 5 expenses are not ordered correctly | Root cause: ordering by a text column with dates in format of MM/DD/YYYY orders by the largest month value first instead of the last inserted rows Location: tendie_dashboard.py , line 52 |
'year' column is missing in SQL statement for creating 'budgets' table.
Corrected SQL statement:
CREATE TABLE IF NOT EXISTS budgets (
id serial PRIMARY KEY,
name TEXT NOT NULL,
amount REAL,
year INTEGER NOT NULL,
user_id INTEGER NOT NULL,
CONSTRAINT budgets_user_id_fkey FOREIGN KEY (user_id)
REFERENCES users (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
);
Bug Source:
https://github.com/eddyharrington/Tendie-Tracker/blob/master/dbCreateStatements-Postgres.txt
Suggested enhancement to improve the chart readability / quality by /u/cldmello:
When I got to Reports -> Spending Categories Report, I see that all the categories are having the same bubble color. Maybe you can try to display each category in a different color. It will look better.
Currently, the chart uses the same color set for all of the bubbles that represent a category (code).
An issue was submitted anonymously via the footer feedback form:
Nice app! One very minor thing I encountered while poking around the site. I made a budget where groceries were 55% of my budget. When I review my budget, it says Groceries are 55.00000000000% of my budget. Looks really nicely polished, and has awesome functionality too!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.