Django site for displaying current laundry machine usage in GMU dorms

Tyler Hallada dbfe25f8e2 Set DEBUG to False by default 9 years ago
laundry Set DEBUG to False by default 9 years ago
laundry_app Don't save svg, return rendering at api endpoint. 9 years ago
templates/laundry Remove my google analytics stuff 9 years ago
.gitignore Was gitignoring static files, oops 9 years ago
Procfile Update to allow running on Heroku 9 years ago Update to allow running on Heroku 9 years ago
laundry.json Initial commit, converting laundry app to site 9 years ago Initial commit, converting laundry app to site 9 years ago
requirements.txt Update to allow running on Heroku 9 years ago

GMU Laundry

A site that scrapes and creates a pretty graph of the current machine usage data for each hall.

This used to be part of my personalsite project (which is a django site), but I decided to make this it's own website.

Getting Started

  • Git clone the repo: git clone
  • Set-up a database. Create a file in the laundry/ folder with the following variables set:
  • Modify the ADMINS variable in so you get emails when the site errors (happens when eSuds changes something on their site).
  • Create and activate a virtualenv: virtualenv venv and source venv/bin/activate
  • Install the requirements: pip install -r requirements.txt
  • Run syncdb: python syncdb
  • Import the GMU Laundry Hall data: python loaddata laundry.json
  • Run the server: python runserver
  • Don't forget to set DEBUG to False when you are production ready.


Whoever is in the ADMINS variable in will get an e-mail whenever an error on the site occurs. This most likely happens when eSuds changes something on their site that breaks the webscraper (which is in

The most often change is that machines are added or removed from halls on the eSuds website. To fix this issue you will need to manually modify the database entry for the hall in the django shell. For example, adding a washer to Whitetop Hall:

python shell

>>> from laundry_app.models import Hall, LaundryMachine
>>> whitetop = Hall.objects.get(name="Whitetop")
>>> LaundryMachine.objects.create(number=10, type=LaundryMachine.WASHER, hall=whitetop)

The number is from the eSuds site in the chart for the hall (under the "Washer #" column).

Sometimes errors happen when eSuds goes down too. Nothing we can really do about that, but perhaps we can improve our downtime by caching previous results and showing those in the intrim.


It would be a good idea to periodically dump the database because, right now, there isn't an automated way of creating the Halls and LaundryMachines. To save the database run:

python dumpdata laundry_app > laundry_backup.json

You can load a backup with:

python loaddata laundry_backup.json

It would be nice of you to keep the laundry.json file in this repo up-to-date as halls' laundry machine configurations change so that anyone setting up this application will not have errors upon starting up.


Move away from Django to Javascript. There's no real reason to have a backend for this site. It can just query esuds and make a chart in D3 or something. Django is a lot of overhead for such a small site.

Add weekly usage stats. I was in the process of writing this but never finished. It's a lot more complicated than the current usage stats because a record of historical queries needs to be kept somehow.

Host this on a SRCT server. Right now it's somewhere that I probably only have control over and with a database at MIT that I might loose access to eventually.

Make the site more reliable to eSuds changing, like machines getting added or removed from halls.