Skip to content

Commit 9834ae5

Browse files
added dash_leaflet-1.0.17.tar.gz file for download
1 parent f3ea964 commit 9834ae5

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

pages/dash_leaflet-1.0.17.tar.gz

326 KB
Binary file not shown.

pages/home.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,11 @@ These are the components that I have built and am currently maintaining:
2626
* [![Downloads](https://static.pepy.tech/badge/dash-excalidraw)](https://pepy.tech/project/dash-excalidraw) `Dash Excalidraw` - A Freeform Drawing and Notebook Component for Dash
2727
* [![Downloads](https://static.pepy.tech/badge/dash-charty)](https://pepy.tech/project/dash-charty) `Dash Charty` - A Charting Library for Dash
2828
* [![Downloads](https://static.pepy.tech/badge/dash-credit-cards)](https://pepy.tech/project/dash-credit-cards) `Dash Credit Cards` - A Credit Card Component for Dash
29+
30+
31+
### Dash Leaflet
32+
This is a download for my development of Dash Leaflet for reference on what this includes: https://community.plotly.com/t/new-dash-leaflet-plugins-improvements/89545/3
33+
34+
The repository for this development branch of Dash Leaflet is here: https://github.com/pip-install-python/dash-leaflet
35+
36+
Download the .tar.gz file from this download button and install it using `pip install dash_leaflet-0.1.0.tar.gz` in the project you are working within.

pages/home.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import frontmatter
44
import dash_mantine_components as dmc
5-
from dash import dcc, register_page
5+
from dash import dcc, register_page, callback, Output, Input
66
from dash import html
77

88
from lib.constants import PAGE_TITLE_PREFIX
@@ -15,6 +15,9 @@
1515

1616
directory = "docs"
1717

18+
file_path = Path(__file__).parent / "dash_leaflet-1.0.17.tar.gz"
19+
20+
1821
# read all markdown files
1922
md_file = Path("pages") / "home.md"
2023

@@ -31,5 +34,18 @@
3134
mt=30,
3235
children=dcc.Markdown(content)
3336
),
37+
38+
html.Center(html.Button("Download File", id="download-button")),
39+
dcc.Download(id="file-download"),
3440
]
3541
)
42+
43+
44+
@callback(
45+
Output("file-download", "data"),
46+
Input("download-button", "n_clicks"),
47+
prevent_initial_call=True,
48+
)
49+
def download_file(n_clicks):
50+
# Return the absolute path to the file
51+
return dcc.send_file(file_path.resolve())

0 commit comments

Comments
 (0)