Adjusted location_generator.py to work with Django Models