upenu/website — pull request #12 by sarahjkim (2014-04-18 10:05:30+00:00)
Title: Current Officers Page

1. Created currentofficers template. Check by visiting http://127.0.0.1:8000/currentofficers/.
2. Added position and photo fields to Officer model. (Officers can now upload their photo!)
3. Created MEDIA_ROOT and STATIC_ROOT.

IMPORTANT: Note that uploading/fetching images may not work without installing Pillow, the Python Imaging Library package. If you have pip, just run "pip install pillow" while in your virtualenv.
https://pypi.python.org/pypi/Pillow

EVEN MORE IMPORTANT: Please add the following lines of code to upe/settings.py (around line 90). These are later referenced in upe/urls.py for fetching files, images, and later CSS/JavaScript files from the MEDIA_ROOT and STATIC_ROOT.
```
# Static files (CSS, JavaScript)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'

# Media files (Images, Downloads, Files)
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
```
Your final upe/settings.py should look something like this:

![screen shot 2014-04-18 at 3 00 17 am](https://cloud.githubusercontent.com/assets/4628853/2741024/519d6b64-c6e0-11e3-83b6-5ead9ffa63e8.png)

The final product of the currentofficers page looks like this with our nice model Secretary Dickson haha. The text and image are properly nested within divs for convenient front-end beautification.

![screen shot 2014-04-18 at 2 48 41 am](https://cloud.githubusercontent.com/assets/4628853/2741032/70c62dd2-c6e0-11e3-889d-733fed0af19d.png)