sudo apt-get install apache2 sudo apt-get install libapache2-mod-wsgi sudo apt-get install mysql-server sudo apt-get install libmysqlclient-dev sudo apt-get install python sudo apt-get install python-pip sudo pip install virtualenv
Download a ZIP file...
...or use git.
git clone https://github.com/byu-osl/citizen-budget.git
Place the Citizen Budget code in
cp doc/config.py .
Edit this file and do the following actions.
Generate a secret key.
python >>> import os >>> os.urandom(24)
Place this secret key in the file.
app.config["SECRET_KEY"] = "YOUR KEY HERE"
Set your city name.
city.name = 'Your City'
and place your city logo in
Configure email access by putting a Gmail addresss and password in the file.
app.config['MAIL_USERNAME'] = 'YOUR APP GMAIL ADDRESS HERE' app.config['MAIL_PASSWORD'] = 'YOUR APP GMAIL PASSWORD HERE'
This account will be used to send login codes to administrative users via email.
You probably want to create a new Gmail account for this purpose, since the password will be stored in this file on your server. Anyone with access to the server will be able to see the password.
Create logging directory.
sudo mkdir /var/log/citizen-budget sudo chown www-data:www-data /var/log/citizen-budget
mysql -u root -p mysql> CREATE DATABASE citizenbudget; mysql> GRANT ALL PRIVILEGES ON citizenbudget.* TO "citizenbudget"@"localhost" IDENTIFIED BY "citizenbudget"; mysql> FLUSH PRIVILEGES; mysql> EXIT
Setup a virtual host for the site.
sudo cp doc/vhost /etc/apache/sites-available/citizenbudget
Edit this file and change the following line to so it matches your virtual host name.
Restart the server
sudo service apache2 restart
Setup the WSGI configuration file for the application.
sudo cp doc/app.wsgi .
virtualenv env source env/bin/activate (env) pip install flask (env) pip install flask-mail (env) pip install flask-sqlalchemy (env) pip install wtforms (env) pip install mysql-python
Visit the web site for the virtual host you setup at
http://budget.yourcity.org. You should see the following screen.
Click on the Add button and create an administrative user.
Citizen Budget uses login codes, instead of passwords, so you only need to enter your name, email address, and cell phone number. Click the Finish button and you should see a welcome screen.
Click on the person icon on the right side of the menu and select Financials.
Click the Add button and upload your financial statements. As of now, the only supported format is CSV exported from Caselle financial software. You may upload multiple files at a time. Once the files are uploaded, you should see them displayed on the same screen.
Click on the Home menu, and you should see a beautiful home page for your city budget.