Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple Web frontend for GnuCash, using Django
JavaScript Python CSS HTML
branch: master
Failed to load latest commit information.
apache Use virtualenv for great justice
gnucash_api_home Enable adding new transactions
gnucash_data Allow uploading and downloading PDFs
gnucash_scripts Record updates to accounts even if there are no new transactions
middleware Load Transaction and Split objects up-front for account details page
money_templates Allow uploading and downloading PDFs
money_views
utils Add backend code to import and store files attached to transactions
.ackrc Add .ackrc
.gitignore Enable adding new transactions
README.md Document new features
__init__.py Initial commit - show balances and list transactions
manage.py Initial commit - show balances and list transactions
requirements.txt Resize images if they are > 1024px wide
settings.example.py Disable adding new transactions by default
urls.py Enable adding new transactions
watch.sh Reload app when starting watch script

README.md

gnucash-django

A mobile-friendly Web frontend for GnuCash, primarily written using Django.

Features

  • View transactions in a GnuCash account, along with their "opposing account"

  • Filter by opposing account, transaction description, or transaction post date

  • Change the opposing account of any transaction and create rules for future transactions

  • Attach images to transactions

  • Add new transactions from the web interface

  • Import JSON files produced by my banker transaction downloader and automatically categorize transactions according to the saved rules

  • Similarly, import QIF files and categorize transactions

Wishlist

  • Graphs, budgeting, etc.

  • Better management of rules and categorization

Requirements

  • A GnuCash file that uses a database backend (tested with MySQL; should work with Postgres or SQLite as well)

  • pip and virtualenv installed (in Debian/Ubuntu: sudo apt-get install python-pip, then sudo pip install virtualenv)

  • (Optional) Python GnuCash API installed (currently this is only used in the code that imports QIF files)

    After you've followed the installation steps below, something like this should work to make the GnuCash API visible to this application's virtual environment:

    ln -s /usr/local/lib/python2.7/dist-packages/gnucash/ lib/python2.7/site-packages/
    

Installation

  • Download the application code into a folder:

    git clone git://github.com/nylen/gnucash-django.git
    cd gnucash-django
    
  • Initialize virtualenv and install dependencies:

    virtualenv .
    . bin/activate
    pip install -r requirements.txt
    
  • Copy settings.example.py to settings.py and fill in values for all places where the file contains three asterisks (***). At this point you'll need to set up a MySQL database and username, if you haven't done so already. Currently this must be done manually.

    You can use this command to generate a SECRET_KEY value:

    python -c 'import random; r=random.SystemRandom(); print "".join([r.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'
    
  • Create the database structure: python manage.py syncdb

  • In the previous step, you should have been prompted to create a Django superuser. If not, or you didn't create one, do that now by running python manage.py createsuperuser. This will be your login to the site.

  • There are two options for starting the application:

    1. Django development server: python manage.py runserver
    2. Configure Apache to host the application with mod_wsgi. Here is an example:

        WSGIDaemonProcess site.com processes=2 threads=15
        WSGIProcessGroup site.com
      
        WSGIScriptAlias /gnucash-django /path/to/gnucash-django/apache/money.wsgi
        <Location /gnucash-django>
          # This setup will allow everyone access to the application.
          # Even though visitors will have to log in, this is probably
          # still not a good idea and you should use Apache auth here.
          Order deny,allow
          Allow from all
        </Location>
      

      You may also want to set up a baseline environment for mod_wsgi as described here.

      More information about configuring mod_wsgi is on the mod_wsgi website.

  • Browse to the site and log in as the superuser you created earlier. Example URLs:

    • Django development server: http://localhost:8000/
    • Apache and mod_wsgi: http://localhost/gnucash-django/

NOTE: Even though all views are set up to require authentication, this application has NOT been written with security in mind. Therefore, it is advisable to secure it using HTTPS and Apache authentication, or to disallow public access to the application.

Something went wrong with that request. Please try again.