Right, I forgot to mention this. 
The port here needs to be hardcoded because the github client application demands a constant callback url. And when you run the app, it needs to be started on the same port with this `./manage.py runserver 8000`
In kalite, to enforce such a constraint, we put the `PRODUCTION_PORT` variable in `local_settings.py` or `settings.py`.