omeramsc / hakesh-trom Goto Github PK
View Code? Open in Web Editor NEWThis project aims to technologize the knock-on-the-door fund-raising practice
License: MIT License
This project aims to technologize the knock-on-the-door fund-raising practice
License: MIT License
Connect with חשבונית ירוקה and get permission to use their API in some way
We need to setup our Heroku account in order to have a server with DB in the cloud.
We're running basic Flask server via heroku
From the TLV API we have the building polygon but the address for the building.
Using the polygon we need to find out the building address.
Don't forget to route the donation page directly to the main page
We need to create an account for Google Maps API. Maybe use student account to get free credits.
We have an account with enabled biling
Add the backend functionality to the campaign control panel:
Make the route to the page individual to the specific campaign
Add the routes to the other pages (buttons)
Connect to the DB and add the Jinja tags to show the campaign information.
We need to write, train and export the modal of an artificial neural network that predictits the amount of money a building will donate.
TBD
prevYearDonation
nextYearDonation
In order to run the modal we need to normalization the data.
n/100
n*100
n/1000
n*1000
n/100
n*100
TBD
Setup local DB and update the README.
Setup local DB (with migrations) and update the README.
We need to add the addresses to the buildings
Create and send חשבונית ירוקה billing
When a neighborhood was picked we want to show the neighborhood's map with all the building on that.
TBD
In order for the server validation to actually fully work, we need to delete the url_for from all the <form action="">
tags.
We need to create route builder to mangar role, in this page we'll show the deep learning results.
The "create route flow" is done
Try to find how to modify the content of wtforms normal validation errors (Those who are now created by a validation function)
Right now the errors are in English.
manage.py
is responsible to create migrations, in order to find the changes we need to load all the modals. Currently we're not doing that
When a user sends a report, the responsible manager will receive a notification.
When a report is closed by the manager, the user will receive a notification.
This page will show all the available campaigns.
The user will be able to click a campaign in order to manage it
Bonus: Include a search box
For each building we need to callculate the earning prediction using the trained modal and show the result to the user on the map
TBD
Neighborhood Manager page is getting stuck due to missing jQuery-UI.
TBD
Use python flask and SQLAlchemy to:
So we won't run into confusing PR's full of changes that are mostly lint changes.
and because lint is nice.
We're getting an error when trying to run the migrations
The migration that was generated was a bad migration.
INFO [alembic.runtime.migration] Running upgrade aaaef87dc519 -> 6173ee2d1267, empty message
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
cursor, statement, parameters, context
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.DuplicateTable: relation "campaigns" already exists
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 19, in <module>
manager.run()
File "/app/.heroku/python/lib/python3.6/site-packages/flask_script/__init__.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "/app/.heroku/python/lib/python3.6/site-packages/flask_script/__init__.py", line 386, in handle
res = handle(*args, **config)
File "/app/.heroku/python/lib/python3.6/site-packages/flask_script/commands.py", line 216, in __call__
return self.run(*args, **kwargs)
File "/app/.heroku/python/lib/python3.6/site-packages/flask_migrate/__init__.py", line 96, in wrapped
f(*args, **kwargs)
File "/app/.heroku/python/lib/python3.6/site-packages/flask_migrate/__init__.py", line 271, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/command.py", line 298, in upgrade
script.run_env()
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/script/base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/util/compat.py", line 184, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "migrations/env.py", line 96, in <module>
run_migrations_online()
File "migrations/env.py", line 90, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/runtime/environment.py", line 846, in run_migrations
self.get_context().run_migrations(**kw)
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/runtime/migration.py", line 520, in run_migrations
step.migration_fn(**kw)
File "/app/migrations/versions/6173ee2d1267_.py", line 29, in upgrade
sa.UniqueConstraint('name')
File "<string>", line 8, in create_table
File "<string>", line 3, in create_table
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/operations/ops.py", line 1252, in create_table
return operations.invoke(op)
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/operations/base.py", line 374, in invoke
return fn(self, operation)
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/operations/toimpl.py", line 101, in create_table
operations.impl.create_table(table)
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/ddl/impl.py", line 258, in create_table
self._exec(schema.CreateTable(table))
File "/app/.heroku/python/lib/python3.6/site-packages/alembic/ddl/impl.py", line 140, in _exec
return conn.execute(construct, *multiparams, **params)
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 984, in execute
return meth(self, multiparams, params)
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/sql/ddl.py", line 72, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1046, in _execute_ddl
compiled,
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1288, in _execute_context
e, statement, parameters, cursor, context
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1482, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from_=e
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
cursor, statement, parameters, context
File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.DuplicateTable) relation "campaigns" already exists
[SQL:
CREATE TABLE campaigns (
id SERIAL NOT NULL,
name VARCHAR(50) NOT NULL,
city VARCHAR(50) NOT NULL,
start_date DATE NOT NULL,
goal FLOAT,
creation_date TIMESTAMP WITHOUT TIME ZONE NOT NULL,
PRIMARY KEY (id),
UNIQUE (name)
)
]
(Background on this error at: http://sqlalche.me/e/f405)
We need to create dataset for all the buildings in the Tel Aviv City with the donations for the last 2 years.
We can query data from DB
For starters, It'll make the tab easier to find...
Render all the .php
files using flask, will not add DB support yet.
We need to add building modal and load the data from the TLV API.
We have building
table and with the TLV API data
It can be implemented as a separate page, or as a button with a pop-up reply.
It will be available for the manager persona only.
It will change the report status to "answered"
We need to aquire data from TLV and clean it for future work
We have all the data
As a user, I want to be able to choose the address I'm currently at, from a list or a map, when I begin the donation process.
Groom this ticket
We need to update the donation screen to fit our new project's requirements.
All the To Do points are done
When available, add the "Money earned" and "Num of participants" parameters to the info box.
When merging to master we need to deploy the latest version to Heroku.
Merge to master will deploy to production
TBD
You can (and probably should) use the basic layout we have from other pages.
The page will have a form with the following fields:
Notice that header&footer should be included with Jinja tags (look at other HTML files for examples)
The admin wants to update the team route.
This page will be used as a control panel for a specific campaign:
It'll show the basic campaign details
It'll have buttons to edit the campaign and manage neighborhoods and routes
We need to setup a basic "hello world" app using Flask.
GET /
routeWe have a running a basic flask server
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.