If you know M-BoF, you don't need to know anything else.
- Install Vagrant - https://www.vagrantup.com/
- Start Vagrant
cd hacks_mbof
vagrant up
vagrant ssh
- Install Bower packages
cd /vagrant/mbofui
bower install
- Initialize and start app server
cd /vagrant
python manage.py migrate
python manage.py loaddata mbof/fixtures/dev_data.json
- Run the development app server
- Without remote user specified
python manage.py runserver
- With remote user specified
sh runAsUser.sh bjensen
bjensen
is a user included in the test data. Others are available. For the purposes of the HWF event, use only known users.
- Without remote user specified
- Browse to...
- M-BoF homepage: http://localhost:18000/
- REST API
- Root: http://localhost:18000/api/ (Note trailing slash.)
- Messages: http://localhost:18000/api/messages/
- Users: http://localhost:18000/api/users/
- Current authen. user: http://localhost:18000/api/me/
- Testing UI:
- BoF list: http://localhost:18000/mbof/ (Note trailing slash.)
- BoF detail: http://localhost:18000/mbof/1/
- DB admin: http://localhost:18000/admin/ (Note trailing slash.)
This is the procedure for updating the fixture files after adding dummy data to the DB.
- Connect to the SQLite DB by opening the
db.sqlite3
file with a compatible client. (If a MySQL DB is used for the project later, running in the Vagrant VM, the connection can be made from your host system via the forwarded port defined in the Vagrant file.) - Delete all tables.
- Apply the migrations to recreate the tables:
python manage.py migrate
- Load the existing fixtures:
python manage.py loaddata mbof/fixtures/dev_data.json
- Make changes to the DB needed to exercise application features.
- Save the updated DB to a fixture file:
python manage.py dumpdata --indent 4 mbof > mbof/fixtures/dev_data.json
- Commit the updated fixture file to the project.
- Display BoFs within viewing area
- For now, return all BoFs.
- For implementation later: Find BoFs within radius of a point
- convert radius into +/- degrees lat/lon
- calculate within web service
- see: http://stackoverflow.com/a/1253545/543738
- see: http://www.movable-type.co.uk/scripts/latlong.html
- Link BoFs to user
- get user from api by loginname
- Create BoF
- Use REMOTE_USER
- Set PostingTime and StartTime to current time
- Set EndTime to five days from current time