benlk / harvey-senior-homes

A dashboard for assisted living, retirement, and senior communities in the path of Hurricane Harvey (2017)
http://f.benlk.com/harvey-senior-homes/
MIT License
1 stars 1 forks source link

None of the `/location/foo` paths are uploading once rendered #22

Closed benlk closed 7 years ago

benlk commented 7 years ago

Running fab production render gives this:

[localhost] local: node_modules/less/bin/lessc less/app.less www/css/app.less.css
[localhost] local: node_modules/less/bin/lessc less/location.less www/css/location.less.css
[localhost] local: node_modules/less/bin/lessc less/oauth.less www/css/oauth.less.css
[localhost] local: node_modules/less/bin/lessc less/table.less www/css/table.less.css
[localhost] local: node_modules/less/bin/lessc less/variables.less www/css/variables.less.css
[localhost] local: node_modules/universal-jst/bin/jst.js --template underscore jst www/js/templates.js
INFO:fabfile.render:2017-08-27 22:41:49,762: Skipping solana-preserve-vintage-park
INFO:fabfile.render:2017-08-27 22:41:49,762: Skipping brookdale-willowbrook-place
INFO:fabfile.render:2017-08-27 22:41:49,762: Skipping brookdale-willowbrook-park
INFO:fabfile.render:2017-08-27 22:41:49,762: Skipping brookdale-ellington-field
INFO:fabfile.render:2017-08-27 22:41:49,762: Skipping brookdale-west-university
INFO:fabfile.render:2017-08-27 22:41:49,762: Skipping brookdale-cypress-station
INFO:fabfile.render:2017-08-27 22:41:49,762: Skipping brookdale-trinity-towers
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-corpus-christi
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-spring-shadows
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping village-gleannloch-farms
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-memorial-city
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-memorial-oaks
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-champion-oaks
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-first-colony
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-copperfield
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-friendswood
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-dowlen-oaks
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-the-heights
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-northshore
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-clear-lake
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping sycamores-sugar-land
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-sugar-land
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-shadowlake
INFO:fabfile.render:2017-08-27 22:41:49,763: Skipping brookdale-tanglewood
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping solana-vintage-park
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping brookdale-victoria
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping brookdale-pearland
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping brookdale-kingwood
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping brookdale-cy-fair
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping la-vita-bella
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-455999
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-455728
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-455557
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-455575
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-455687
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-455697
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-675487
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-675637
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-675670
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-675672
INFO:fabfile.render:2017-08-27 22:41:49,764: Skipping fpn-675717
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-675773
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-676087
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-676107
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-676303
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-676321
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-455643
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-675899
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-455582
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-675850
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-675495
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-676264
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-675556
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-675696
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-455477
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-676307
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-675557
INFO:fabfile.render:2017-08-27 22:41:49,765: Skipping fpn-675684
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-675159
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455838
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-675086
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455726
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455333
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455613
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455682
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455714
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455756
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455756
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455794
INFO:fabfile.render:2017-08-27 22:41:49,766: Skipping fpn-455800
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-455805
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-455815
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-455854
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-455981
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-675000
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-675078
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-675080
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-675085
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-675231
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-675233
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-675297
INFO:fabfile.render:2017-08-27 22:41:49,767: Skipping fpn-675370
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675423
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675454
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675493
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675543
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675555
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675612
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675667
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675671
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675764
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675777
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675789
INFO:fabfile.render:2017-08-27 22:41:49,768: Skipping fpn-675789
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-675791
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-675793
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-675793
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-675818
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-675819
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-675834
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-675986
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-676009
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-676021
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-676059
INFO:fabfile.render:2017-08-27 22:41:49,769: Skipping fpn-676066
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676081
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676111
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676116
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676137
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676152
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676170
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676208
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676230
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676236
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676239
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676251
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676252
INFO:fabfile.render:2017-08-27 22:41:49,770: Skipping fpn-676258
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676282
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676306
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676310
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676314
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676333
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676336
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676337
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676354
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676356
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676362
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676222
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-675799
INFO:fabfile.render:2017-08-27 22:41:49,771: Skipping fpn-676083
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-676107
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-675635
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-675785
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-676180
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-675606
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-455599
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-676218
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-675815
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-676133
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-455797
INFO:fabfile.render:2017-08-27 22:41:49,772: Skipping fpn-676245
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-676119
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-676299
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675395
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675942
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-657395
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-676037
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675361
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675206
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-676125
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-676391
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675409
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675956
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675380
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-676371
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675736
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675744
INFO:fabfile.render:2017-08-27 22:41:49,773: Skipping fpn-675699
INFO:fabfile.render:2017-08-27 22:41:49,774: Skipping fpn-676260
INFO:fabfile.render:2017-08-27 22:41:49,774: Skipping fpn-675254
INFO:fabfile.render:2017-08-27 22:41:49,774: Skipping fpn-455490
INFO:fabfile.render:2017-08-27 22:41:49,774: Skipping fpn-675214
INFO:fabfile.render:2017-08-27 22:41:49,774: Skipping static._app_config_js
INFO:fabfile.render:2017-08-27 22:41:49,774: Skipping static._templates_js
INFO:fabfile.render:2017-08-27 22:41:49,774: Skipping static._copy_js
INFO:fabfile.render:2017-08-27 22:41:49,774: Rendering www/embedding.html
INFO:render_utils:2017-08-27 22:41:50,020: Rendering www/css/rendered/app.min.css
INFO:render_utils:2017-08-27 22:41:50,964: Rendering www/js/app-header.min.js
INFO:render_utils:2017-08-27 22:41:50,964: - compressing js/lib/modernizr.js
INFO:render_utils:2017-08-27 22:41:51,057: - compressing js/lib/cookie.js
INFO:render_utils:2017-08-27 22:41:51,079: - compressing js/lib/es6-promise.js
INFO:render_utils:2017-08-27 22:41:51,174: - compressing js/lib/cross-storage-client.js
INFO:render_utils:2017-08-27 22:41:51,228: - compressing js/app_config.js
INFO:render_utils:2017-08-27 22:41:51,512: Rendering www/js/app-footer.min.js
INFO:render_utils:2017-08-27 22:41:51,513: - compressing js/lib/jquery.js
INFO:render_utils:2017-08-27 22:41:52,976: - compressing js/lib/underscore.js
INFO:render_utils:2017-08-27 22:41:53,247: - compressing js/lib/moment.js
INFO:render_utils:2017-08-27 22:41:53,427: - compressing js/copy.js
INFO:render_utils:2017-08-27 22:41:53,662: - compressing js/templates.js
INFO:render_utils:2017-08-27 22:41:53,667: - compressing js/app.js
INFO:fabfile.render:2017-08-27 22:41:53,896: Rendering www/embedding.html
INFO:fabfile.render:2017-08-27 22:41:54,129: Skipping _oauth.authenticate
INFO:fabfile.render:2017-08-27 22:41:54,130: Rendering www/table.html
INFO:render_utils:2017-08-27 22:41:54,363: Rendering www/css/rendered/table.min.css
INFO:render_utils:2017-08-27 22:41:55,182: Rendering www/js/table.min.js
INFO:render_utils:2017-08-27 22:41:55,182: - compressing js/lib/tablesaw.js
INFO:render_utils:2017-08-27 22:41:55,694: - compressing js/lib/tablesaw-init.js
INFO:fabfile.render:2017-08-27 22:41:55,926: Rendering www/locations/index.html
INFO:fabfile.render:2017-08-27 22:41:55,927: Skipping table_redirect
INFO:fabfile.render:2017-08-27 22:41:55,927: Rendering www/location/index.html
INFO:fabfile.render:2017-08-27 22:41:55,927: Skipping table_redirect
INFO:fabfile.render:2017-08-27 22:41:55,927: Skipping _oauth.oauth_alert
INFO:fabfile.render:2017-08-27 22:41:55,928: Rendering www/index.html
INFO:fabfile.render:2017-08-27 22:41:56,158: Skipping static
INFO:fabfile.render:2017-08-27 22:41:56,158: Skipping static._less
INFO:fabfile.render:2017-08-27 22:41:56,158: Skipping static._static

The 'skipping' lines are from the render.render_all task, which skips paths that don't end in certain ways:

https://github.com/benlk/harvey-senior-homes/blob/74cb7f65555592c88a44e356040372d05169611b/fabfile/render.py#L117-L124

So the solution would appear to be to make sure that all the locations end in a /.

benlk commented 7 years ago

With that change, we get this:

[cron.nprapps.org] Executing task 'render'
[localhost] local: node_modules/less/bin/lessc less/app.less www/css/app.less.css
[localhost] local: node_modules/less/bin/lessc less/location.less www/css/location.less.css
[localhost] local: node_modules/less/bin/lessc less/oauth.less www/css/oauth.less.css
[localhost] local: node_modules/less/bin/lessc less/table.less www/css/table.less.css
[localhost] local: node_modules/less/bin/lessc less/variables.less www/css/variables.less.css
[localhost] local: node_modules/universal-jst/bin/jst.js --template underscore jst www/js/templates.js
INFO:fabfile.render:2017-08-27 22:53:22,146: Rendering www/location/solana-preserve-vintage-park/index.html
Traceback (most recent call last):
  File "/Users/blk/.virtualenvs/harvey/lib/python2.7/site-packages/fabric/main.py", line 756, in main
    *args, **kwargs
  File "/Users/blk/.virtualenvs/harvey/lib/python2.7/site-packages/fabric/tasks.py", line 387, in execute
    multiprocessing
  File "/Users/blk/.virtualenvs/harvey/lib/python2.7/site-packages/fabric/tasks.py", line 277, in _execute
    return task.run(*args, **kwargs)
  File "/Users/blk/.virtualenvs/harvey/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
    return self.wrapped(*args, **kwargs)
  File "/Users/blk/sites/localhost/etc/harvey-senior-homes/fabfile/render.py", line 139, in render_all
    view = _view_from_name(name)
  File "/Users/blk/sites/localhost/etc/harvey-senior-homes/fabfile/render.py", line 39, in _view_from_name
    return globals()[module].__dict__[name]
KeyError: Markup(u'solana-preserve-vintage-park')

Here's _view_from_name:

https://github.com/benlk/harvey-senior-homes/blob/74cb7f65555592c88a44e356040372d05169611b/fabfile/render.py#L26-L39

_view_from_name is called in render.render_all , in something like this:

    for rule in app.app.url_map.iter_rules():
        rule_string = rule.rule
        name = rule.endpoint

        # Render views, reusing compiled assets
        with _fake_context(rule_string):
            g.compile_includes = True
            g.compiled_includes = compiled_includes

            view = _view_from_name(name)

Assuming that the rule and endpoint are from app.py's routing, the problem would appear to be:

for slug in location_ids: 
    @app.route('/location/%s/' % slug, endpoint=slug)

Printing the name passed to _view_from_name returns Markup(u'solana-preserve-vintage-park'), and that's one of the location IDs, wrapped in Markup because, I guess, it's a string from a copytext sheet?

Printing globals()[module].__dict__ during fab production render returns this monstrosity, which I have split onto separate lines for convenience:

{
 'table_redirect': <function table_redirect at 0x10c1527d0>,
 'Flask': <class 'flask.app.Flask'>,
 'get_location_history_by_slug': <function get_location_history_by_slug at 0x10c1422a8>,
 'app': <flask.app.Flask object at 0x10be12a10>,
 'CACHE': {'copy': <copytext.Copy object at 0x10c158150>},
 'get_location_status_updated_by_slug': <function get_location_status_updated_by_slug at 0x10c142410>,
 'static': <module 'static' from '/Users/blk/sites/localhost/etc/harvey-senior-homes/static.pyc'>,
 'numbers': <module 'numbers' from '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/numbers.py'>,
 'table': <function table at 0x10c152668>,
 'get_location_by_slug': <function get_location_by_slug at 0x10c1421b8>,
 'render_template': <function render_template at 0x10b8cb050>,
 'redirect': <function redirect at 0x10b6a9b90>,
 'index': <function index at 0x10c1525f0>,
 '__package__': None,
 're': <module 're' from '/Users/blk/.virtualenvs/harvey/lib/python2.7/re.pyc'>,
 'json': <module 'json' from '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.pyc'>,
 'collections': <module 'collections' from '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/collections.pyc'>,
 'location': <function location at 0x10c689de8>,
 'urlencode_filter': <function urlencode_filter at 0x10be1d668>,
 '__doc__': '\nExample application views.\n\nNote that `render_template` is wrapped with `make_response` in all application\nroutes. While not necessary for most Flask apps,
 it is required in the\nApp Template for static publishing.\n',
 'normalize': <built-in function normalize>,
 '__builtins__': {'bytearray': <type 'bytearray'>,
 'IndexError': <type 'exceptions.IndexError'>,
 'all': <built-in function all>,
 'help': Type help() for interactive help,
 or help(object) for help about object.,
 'vars': <built-in function vars>,
 'SyntaxError': <type 'exceptions.SyntaxError'>,
 'unicode': <type 'unicode'>,
 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>,
 'memoryview': <type 'memoryview'>,
 'isinstance': <built-in function isinstance>,
 'copyright': Copyright (c) 2001-2015 Python Software Foundation.
All Rights Reserved.

Copyright (c) 2000 BeOpen.com.
All Rights Reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.,
 'NameError': <type 'exceptions.NameError'>,
 'BytesWarning': <type 'exceptions.BytesWarning'>,
 'dict': <type 'dict'>,
 'input': <built-in function input>,
 'oct': <built-in function oct>,
 'bin': <built-in function bin>,
 'SystemExit': <type 'exceptions.SystemExit'>,
 'StandardError': <type 'exceptions.StandardError'>,
 'format': <built-in function format>,
 'repr': <built-in function repr>,
 'sorted': <built-in function sorted>,
 'False': False,
 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>,
 'list': <type 'list'>,
 'iter': <built-in function iter>,
 'reload': <built-in function reload>,
 'Warning': <type 'exceptions.Warning'>,
 '__package__': None,
 'round': <built-in function round>,
 'dir': <built-in function dir>,
 'cmp': <built-in function cmp>,
 'set': <type 'set'>,
 'bytes': <type 'str'>,
 'reduce': <built-in function reduce>,
 'intern': <built-in function intern>,
 'issubclass': <built-in function issubclass>,
 'Ellipsis': Ellipsis,
 'EOFError': <type 'exceptions.EOFError'>,
 'locals': <built-in function locals>,
 'BufferError': <type 'exceptions.BufferError'>,
 'slice': <type 'slice'>,
 'FloatingPointError': <type 'exceptions.FloatingPointError'>,
 'sum': <built-in function sum>,
 'getattr': <built-in function getattr>,
 'abs': <built-in function abs>,
 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit,
 'print': <built-in function print>,
 'True': True,
 'FutureWarning': <type 'exceptions.FutureWarning'>,
 'ImportWarning': <type 'exceptions.ImportWarning'>,
 'None': None,
 'hash': <built-in function hash>,
 'ReferenceError': <type 'exceptions.ReferenceError'>,
 'len': <built-in function len>,
 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
    for supporting Python development.  See www.python.org for more information.,
 'frozenset': <type 'frozenset'>,
 '__name__': '__builtin__',
 'ord': <built-in function ord>,
 'super': <type 'super'>,
 'TypeError': <type 'exceptions.TypeError'>,
 'license': The MIT License (MIT)

Copyright (c) 2014 NPR 

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
,
 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>,
 'UserWarning': <type 'exceptions.UserWarning'>,
 'filter': <built-in function filter>,
 'range': <built-in function range>,
 'staticmethod': <type 'staticmethod'>,
 'SystemError': <type 'exceptions.SystemError'>,
 'BaseException': <type 'exceptions.BaseException'>,
 'pow': <built-in function pow>,
 'RuntimeError': <type 'exceptions.RuntimeError'>,
 'float': <type 'float'>,
 'MemoryError': <type 'exceptions.MemoryError'>,
 'StopIteration': <type 'exceptions.StopIteration'>,
 'globals': <built-in function globals>,
 'divmod': <built-in function divmod>,
 'enumerate': <type 'enumerate'>,
 'apply': <built-in function apply>,
 'LookupError': <type 'exceptions.LookupError'>,
 'open': <built-in function open>,
 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit,
 'basestring': <type 'basestring'>,
 'UnicodeError': <type 'exceptions.UnicodeError'>,
 'zip': <built-in function zip>,
 'hex': <built-in function hex>,
 'long': <type 'long'>,
 'next': <built-in function next>,
 'ImportError': <type 'exceptions.ImportError'>,
 'chr': <built-in function chr>,
 'xrange': <type 'xrange'>,
 'type': <type 'type'>,
 '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.",
 'Exception': <type 'exceptions.Exception'>,
 'tuple': <type 'tuple'>,
 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>,
 'reversed': <type 'reversed'>,
 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>,
 'IOError': <type 'exceptions.IOError'>,
 'hasattr': <built-in function hasattr>,
 'delattr': <built-in function delattr>,
 'setattr': <built-in function setattr>,
 'raw_input': <built-in function raw_input>,
 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>,
 'compile': <built-in function compile>,
 'ArithmeticError': <type 'exceptions.ArithmeticError'>,
 'str': <type 'str'>,
 'property': <type 'property'>,
 'GeneratorExit': <type 'exceptions.GeneratorExit'>,
 'int': <type 'int'>,
 '__import__': <built-in function __import__>,
 'KeyError': <type 'exceptions.KeyError'>,
 'coerce': <built-in function coerce>,
 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>,
 'file': <type 'file'>,
 'EnvironmentError': <type 'exceptions.EnvironmentError'>,
 'unichr': <built-in function unichr>,
 'id': <built-in function id>,
 'OSError': <type 'exceptions.OSError'>,
 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>,
 'min': <built-in function min>,
 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>,
 'execfile': <built-in function execfile>,
 'any': <built-in function any>,
 'complex': <type 'complex'>,
 'bool': <type 'bool'>,
 'ValueError': <type 'exceptions.ValueError'>,
 'NotImplemented': NotImplemented,
 'map': <built-in function map>,
 'buffer': <type 'buffer'>,
 'max': <built-in function max>,
 'object': <type 'object'>,
 'TabError': <type 'exceptions.TabError'>,
 'callable': <built-in function callable>,
 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>,
 'eval': <built-in function eval>,
 '__debug__': True,
 'IndentationError': <type 'exceptions.IndentationError'>,
 'AssertionError': <type 'exceptions.AssertionError'>,
 'classmethod': <type 'classmethod'>,
 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>,
 'NotImplementedError': <type 'exceptions.NotImplementedError'>,
 'AttributeError': <type 'exceptions.AttributeError'>,
 'OverflowError': <type 'exceptions.OverflowError'>},
 'get_location_ids': <function get_location_ids at 0x10c142140>,
 '__file__': '/Users/blk/sites/localhost/etc/harvey-senior-homes/app.pyc',
 'get_copy': <function get_copy at 0x10c142050>,
 'smarty_filter': <function smarty_filter at 0x10be1d6e0>,
 'format_zip': <function format_zip at 0x10c140f50>,
 'app_config': <module 'app_config' from '/Users/blk/sites/localhost/etc/harvey-senior-homes/app_config.pyc'>,
 'get_location_status_by_slug': <function get_location_status_by_slug at 0x10c142320>,
 'oauth': <module 'oauth' from '/Users/blk/sites/localhost/etc/harvey-senior-homes/oauth.pyc'>,
 '__name__': 'app',
 'copytext': <module 'copytext' from '/Users/blk/.virtualenvs/harvey/lib/python2.7/site-packages/copytext.pyc'>,
 'logger': <logging.Logger object at 0x10c148090>,
 'make_context': <function make_context at 0x10be1d5f0>,
 'get_locations_statuses': <function get_locations_statuses at 0x10c142230>,
 'slug': Markup(u'brookdale-kingwood'),
 'logging': <module 'logging' from '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.pyc'>,
 'make_response': <function make_response at 0x10b8a37d0>,
 'get_locations': <function get_locations at 0x10c1420c8>,
 'DebuggedApplication': <class 'werkzeug.DebuggedApplication'>,
 'wsgi_app': <werkzeug.DebuggedApplication object at 0x10c232790>,
 'embedding': <function embedding at 0x10c152758>,
 'get_location_status_color_by_slug': <function get_location_status_color_by_slug at 0x10c142398>,
 'location_ids': [Markup(u'fpn-455999'),
 Markup(u'fpn-455728'),
 Markup(u'fpn-455557'),
 Markup(u'fpn-455575'),
 Markup(u'fpn-455687'),
 Markup(u'fpn-455697'),
 Markup(u'fpn-675487'),
 Markup(u'fpn-675637'),
 Markup(u'fpn-675670'),
 Markup(u'fpn-675672'),
 Markup(u'fpn-675717'),
 Markup(u'fpn-675773'),
 Markup(u'fpn-676087'),
 Markup(u'fpn-676107'),
 Markup(u'fpn-676303'),
 Markup(u'fpn-676321'),
 Markup(u'fpn-455643'),
 Markup(u'fpn-675899'),
 Markup(u'fpn-455582'),
 Markup(u'fpn-675850'),
 Markup(u'fpn-675495'),
 Markup(u'fpn-676264'),
 Markup(u'fpn-675556'),
 Markup(u'fpn-675696'),
 Markup(u'fpn-455477'),
 Markup(u'fpn-676307'),
 Markup(u'fpn-675557'),
 Markup(u'fpn-675684'),
 Markup(u'fpn-675159'),
 Markup(u'fpn-455838'),
 Markup(u'fpn-675086'),
 Markup(u'fpn-455726'),
 Markup(u'fpn-455333'),
 Markup(u'fpn-455613'),
 Markup(u'fpn-455682'),
 Markup(u'fpn-455714'),
 Markup(u'fpn-455756'),
 Markup(u'fpn-455756'),
 Markup(u'fpn-455794'),
 Markup(u'fpn-455800'),
 Markup(u'fpn-455805'),
 Markup(u'fpn-455815'),
 Markup(u'fpn-455854'),
 Markup(u'fpn-455981'),
 Markup(u'fpn-675000'),
 Markup(u'fpn-675078'),
 Markup(u'fpn-675080'),
 Markup(u'fpn-675085'),
 Markup(u'fpn-675231'),
 Markup(u'fpn-675233'),
 Markup(u'fpn-675297'),
 Markup(u'fpn-675370'),
 Markup(u'fpn-675423'),
 Markup(u'fpn-675454'),
 Markup(u'fpn-675493'),
 Markup(u'fpn-675543'),
 Markup(u'fpn-675555'),
 Markup(u'fpn-675612'),
 Markup(u'fpn-675667'),
 Markup(u'fpn-675671'),
 Markup(u'fpn-675764'),
 Markup(u'fpn-675777'),
 Markup(u'fpn-675789'),
 Markup(u'fpn-675789'),
 Markup(u'fpn-675791'),
 Markup(u'fpn-675793'),
 Markup(u'fpn-675793'),
 Markup(u'fpn-675818'),
 Markup(u'fpn-675819'),
 Markup(u'fpn-675834'),
 Markup(u'fpn-675986'),
 Markup(u'fpn-676009'),
 Markup(u'fpn-676021'),
 Markup(u'fpn-676059'),
 Markup(u'fpn-676066'),
 Markup(u'fpn-676081'),
 Markup(u'fpn-676111'),
 Markup(u'fpn-676116'),
 Markup(u'fpn-676137'),
 Markup(u'fpn-676152'),
 Markup(u'fpn-676170'),
 Markup(u'fpn-676208'),
 Markup(u'fpn-676230'),
 Markup(u'fpn-676236'),
 Markup(u'fpn-676239'),
 Markup(u'fpn-676251'),
 Markup(u'fpn-676252'),
 Markup(u'fpn-676258'),
 Markup(u'fpn-676282'),
 Markup(u'fpn-676306'),
 Markup(u'fpn-676310'),
 Markup(u'fpn-676314'),
 Markup(u'fpn-676333'),
 Markup(u'fpn-676336'),
 Markup(u'fpn-676337'),
 Markup(u'fpn-676354'),
 Markup(u'fpn-676356'),
 Markup(u'fpn-676362'),
 Markup(u'la-vita-bella'),
 Markup(u'fpn-676222'),
 Markup(u'fpn-675799'),
 Markup(u'fpn-676083'),
 Markup(u'fpn-676107'),
 Markup(u'fpn-675635'),
 Markup(u'fpn-675785'),
 Markup(u'fpn-676180'),
 Markup(u'fpn-675606'),
 Markup(u'fpn-455599'),
 Markup(u'fpn-676218'),
 Markup(u'fpn-675815'),
 Markup(u'fpn-676133'),
 Markup(u'fpn-455797'),
 Markup(u'fpn-676245'),
 Markup(u'fpn-676119'),
 Markup(u'fpn-676299'),
 Markup(u'fpn-675395'),
 Markup(u'fpn-675942'),
 Markup(u'fpn-657395'),
 Markup(u'fpn-676037'),
 Markup(u'fpn-675361'),
 Markup(u'fpn-675206'),
 Markup(u'fpn-676125'),
 Markup(u'fpn-676391'),
 Markup(u'fpn-675409'),
 Markup(u'fpn-675956'),
 Markup(u'fpn-675380'),
 Markup(u'fpn-676371'),
 Markup(u'fpn-675736'),
 Markup(u'fpn-675744'),
 Markup(u'fpn-675699'),
 Markup(u'fpn-676260'),
 Markup(u'fpn-675254'),
 Markup(u'fpn-455490'),
 Markup(u'fpn-675214'),
 Markup(u'brookdale-trinity-towers'),
 Markup(u'brookdale-corpus-christi'),
 Markup(u'brookdale-northshore'),
 Markup(u'brookdale-victoria'),
 Markup(u'brookdale-copperfield'),
 Markup(u'brookdale-clear-lake'),
 Markup(u'brookdale-friendswood'),
 Markup(u'brookdale-ellington-field'),
 Markup(u'brookdale-pearland'),
 Markup(u'brookdale-dowlen-oaks'),
 Markup(u'brookdale-first-colony'),
 Markup(u'sycamores-sugar-land'),
 Markup(u'brookdale-sugar-land'),
 Markup(u'brookdale-memorial-city'),
 Markup(u'brookdale-memorial-oaks'),
 Markup(u'brookdale-shadowlake'),
 Markup(u'brookdale-spring-shadows'),
 Markup(u'brookdale-tanglewood'),
 Markup(u'brookdale-the-heights'),
 Markup(u'brookdale-west-university'),
 Markup(u'brookdale-cy-fair'),
 Markup(u'solana-preserve-vintage-park'),
 Markup(u'solana-vintage-park'),
 Markup(u'brookdale-willowbrook-place'),
 Markup(u'brookdale-willowbrook-park'),
 Markup(u'village-gleannloch-farms'),
 Markup(u'brookdale-champion-oaks'),
 Markup(u'brookdale-cypress-station'),
 Markup(u'brookdale-kingwood')],
 'itemgetter': <type 'operator.itemgetter'>
}

Markup(u'solana-preserve-vintage-park') is in there.

guh.

benlk commented 7 years ago

It's in there, but it's not a key.

Reading http://flask.pocoo.org/docs/0.12/api/#flask.Flask.route , I believe that the reason here is because I specified the endpoint parameter, when it should've been left to its default.

endpoint – the endpoint for the registered URL rule. Flask itself assumes the name of the view function as endpoint

benlk commented 7 years ago

Yeah, that was it. Rendered successfully locally.

Build, you monster.

benlk commented 7 years ago

Resolved.