Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero committed Oct 18, 2016
2 parents ca2d52d + e1e9848 commit 5b7fc54
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CONTRIB.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ If you e.g. add a new column or table, you'll need to migrate the database. You
`python migrate_db.py`

to do this.
`python upgrade_db.py` and `python downgrade_db.py` can also be used as necessary. Note that I followed [this tutorial](http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iv-database) to set this up.
`python upgrade_db.py` and `python downgrade_db.py` can also be used as necessary. Note that I followed [this tutorial](http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iv-database) to set this up.
1 change: 0 additions & 1 deletion OpenOversight/app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def sort_officers_by_photos(officers, officer_images):
officers = identified_officers + unidentified_officers
return officers


def allowed_file(filename):
return '.' in filename and \
filename.rsplit('.', 1)[1] in config.ALLOWED_EXTENSIONS
3 changes: 1 addition & 2 deletions OpenOversight/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
send_from_directory, flash, session)
from werkzeug import secure_filename
from app import app
import pdb

from utils import (allowed_file, grab_officers, grab_officer_faces,
sort_officers_by_photos)
Expand Down Expand Up @@ -36,7 +35,7 @@ def get_gallery():
return render_template('gallery.html',
officers=sorted_officers,
form=form_values,
officer_images=officer_images)
officer_images=officer_images)


@app.route('/complaint', methods=['GET', 'POST'])
Expand Down
8 changes: 4 additions & 4 deletions OpenOversight/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ def cleanup():
assignments = models.Assignment.query.all()
for assn in assignments:
db.session.delete(assn)

images = models.Image.query.all()
for image in images:
db.session.delete(image)
faces = models.Face.query.all()
for face in faces:
db.session.delete(face)

# TODO: Reset primary keys on all these tables
db.session.commit()
Expand Down

0 comments on commit 5b7fc54

Please sign in to comment.