-
Notifications
You must be signed in to change notification settings - Fork 2
Tabular Templates
Raman Prasad edited this page Jan 27, 2017
·
5 revisions
Code locations for tabular workflow views/templates. These could do with some refactoring, etc.
- view:
view_mapit_incoming_token64
- file:
gis_shapefiles/views_mapit.py
- redirect function:
process_tabular_file_info
- file:
gis_shapefiles/views_mapit.py
- view:
view_tabular_file(tab_md5)
- file:
gis_tabular/views.py - Note: Will check if geoconnect or WorldMap already has this map
- main template:
gis_tabular/view_tabular_overview.html
- expected values:
- tabular_info
- geocode_types
- form_lat_lng (always)
- form_single_column (optional)
- sub template:
gis_tabular/preview_rows.html
- expected values:
- tabular_info
- NUM_PREVIEW_ROWS
- tab_file_stats
- ajax view:
view_map_tabular_file_form
- file:
gis_tabular/views_create_layer.py
- view:
build_tabular_map_html(WorldMapTabularLayerInfo) - file:
gis_tabular.views.py - main template:
gis_tabular/view_tabular_map_div.html- expected values (directly in template):
- layer_data
- worldmap_layerinfo
- download_links
- expected values (directly in template):
All expected values in template and sub-templates:
- worldmap_layerinfo (WorldMapJoinLayerInfo or WorldMapLatLngInfo ) 1. tabular_info (worldmap_layerinfo.tabular_info) 1. core_data (worldmap_layerinfo.core_data) 1. download_links (worldmap_layerinfo.download_links) 1. attribute_data (worldmap_layerinfo.attribute_data)
- is_tabular_delete (set in view)
- delete_form (set in view)
- classify_form (set in view)
- ATTRIBUTE_VALUE_DELIMITER (set in view)
- success_msg or error_msg
-
gis_tabular/map_result_message.html- expected values:- worldmap_layerinfo - For a Join Layer:
- Reads sub-template:
gis_tabular/map_message_join.html - Expected values:
- core_data (worldmap_layerinfo.core_data) - For a Lat/Lng layer:
- Reads sub-template:
gis_tabular/map_message_lat_lng.html - Expected values:
- core_data (worldmap_layerinfo.core_data)
-
gis_shapefiles/modal_delete_confirm.html- expected values:- is_tabular_delete
- delete_form
-
gis_shapefiles/modal_save_confirm.html- expected values:- tabular_info
-
classification/view_classify_form.html- expected values:- classify_form
- success_msg or error_msg
-
classification/classify_form_dynamic_js.html- expected values:- worldmap_layerinfo
- worldmap_layerinfo.get_legend_img_url
- classify_form
- classify_form.get_classify_non_string_choices
- classify_form.get_classify_choices
- classify_form.get_classify_string_choices
- ATTRIBUTE_VALUE_DELIMITER
-
gis_shapefiles/delete_and_back_to_dv_links.html-gis_shapefiles/link-back-to-dataverse.html- expected values:
- tabular_info
- tabular_info.return_to_dataverse_url
- expected values:
-
gis_tabular/map_attributes_list.html(debug) - expected values:- attribute_data (worldmap_layerinfo.attribute_data)
- core_data (worldmap_layerinfo.core_data)
-
gis_tabular/core_data_list.html(debug) - expected values:- core_data (worldmap_layerinfo.core_data)
-
ajax view:
view_classify_layer_form -
file:
classification/views.py -
The request fails form ValidationError message contents (JSON): { "success": false "msg": User message "data.div_content": Form with error messages }
- "div_content" in AJAX message is used for "#div_classify_form"
-
The request succeeds: { "success": true "msg": User message "data.div_content": See note below }
- Note: template for div_content:
classification/view_classify_form.html- expected values:
- classify_form
- success_msg or error_msg
- expected values:
- Note: template for div_content: