Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove routes, prep for subdomain #72

Merged
merged 10 commits into from Mar 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -24,7 +24,7 @@ source activate dash_docs

2. `pip install -r requirements.txt`
3. `gunicorn tutorial.run:server`
4. open http://127.0.0.1:8000/dash/ in your browser
4. open http://127.0.0.1:8000 in your browser


### Contributing
Expand Down
2 changes: 1 addition & 1 deletion generate-sitemap.py
Expand Up @@ -6,7 +6,7 @@ def generate_sitemap():
for o in run.chapters.values():
sitemap += (
'<url>\n' +
' <loc>https://plot.ly{}</loc>\n'.format(o['url']) +
' <loc>https://dash.plot.ly{}</loc>\n'.format(o['url']) +
'</url>\n'
)
with open('tutorial/static/sitemap.xml', 'w') as f:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_integration.py
Expand Up @@ -63,7 +63,7 @@ def snapshot(self, name):
self.percy_runner.snapshot(name=name)

def test_docs(self):
self.startServer(app, '/dash/')
self.startServer(app, '/')

try:
self.wait_for_element_by_id('wait-for-layout')
Expand Down Expand Up @@ -91,7 +91,7 @@ def visit_and_snapshot(href):
visit_and_snapshot(link)

# test search page
self.driver.get('http://localhost:8050/dash/search')
self.driver.get('http://localhost:8050/search')
self.wait_for_element_by_id('search-input')
self.snapshot('search-blank')
search_element = self.driver.find_element_by_id('search-input')
Expand Down
64 changes: 32 additions & 32 deletions tutorial/chapter_index.py
Expand Up @@ -27,7 +27,7 @@
chapters = {
### home.py ###
'introduction': {
'url': '/dash/introduction',
'url': '/introduction',
'content': introduction.layout,
'name':'Introduction',
'description': 'Dash is a productive Python framework for ' \
Expand All @@ -36,7 +36,7 @@
},

'gallery': {
'url': '/dash/gallery',
'url': '/gallery',
'content': gallery.layout,
'name': 'Dash App Gallery',
'description': 'Examples of Dash apps including ' \
Expand All @@ -45,14 +45,14 @@
},

'installation': {
'url': '/dash/installation',
'url': '/installation',
'content': installation.layout,
'name': 'Part 1. Installation',
'description': 'How to install and upgrade dash libraries with pip.'
},

'getting-started': {
'url': '/dash/getting-started',
'url': '/getting-started',
'content': getting_started_part_1.layout,
'name': 'Part 2. The Dash Layout',
'description': 'The Dash `layout` describes what your app will ' \
Expand All @@ -61,7 +61,7 @@
},

'getting-started-part-2': {
'url': '/dash/getting-started-part-2',
'url': '/getting-started-part-2',
'content': getting_started_part_2.layout,
'name': 'Part 3. Basic Callbacks',
'description': "Dash apps are made interactive through Dash " \
Expand All @@ -73,7 +73,7 @@
},

'state': {
'url': '/dash/state',
'url': '/state',
'content': state.layout,
'name': 'Part 4. Callbacks With State',
'description': 'Basic callbacks are fired whenever the values ' \
Expand All @@ -84,7 +84,7 @@
},

'graphing': {
'url': '/dash/interactive-graphing',
'url': '/interactive-graphing',
'content': graphing.layout,
'name': 'Part 5. Interactive Graphing and Crossfiltering',
'description': 'Bind interactivity to the Dash `Graph` ' \
Expand All @@ -93,7 +93,7 @@
},

'shared-state': {
'url': '/dash/sharing-data-between-callbacks',
'url': '/sharing-data-between-callbacks',
'content': sharing_state.layout,
'name': 'Part 6. Sharing Data Between Callbacks',
'description': '`global` variables will break your Dash apps. ' \
Expand All @@ -104,7 +104,7 @@
},

'dash-core-components': {
'url': '/dash/dash-core-components',
'url': '/dash-core-components',
'content': core_components.layout,
'name': 'Dash Core Components',
'description': 'The Dash Core Component library contains a set ' \
Expand All @@ -113,7 +113,7 @@
},

'dash-html-components': {
'url': '/dash/dash-html-components',
'url': '/dash-html-components',
'content': [
html_components.layout,
# html_component_appendix.layout,
Expand All @@ -127,7 +127,7 @@
},

'plugins': {
'url': '/dash/plugins',
'url': '/plugins',
'content': plugins.layout,
'name': 'Build Your Own Components',
'description': 'Dash components are built with ' \
Expand All @@ -137,23 +137,23 @@
},

'performance': {
'url': '/dash/performance',
'url': '/performance',
'content': performance.layout,
'name': 'Performance',
'description': 'There are two main ways to speed up dash apps: '\
'caching and using WebGL chart types.'
},

'live-updates': {
'url': '/dash/live-updates',
'url': '/live-updates',
'content': live_updates.layout,
'name': 'Live Updates',
'description': 'Update your apps on page load or on a predefined ' \
'interval (e.g. every 30 seconds).'
},

'external': {
'url': '/dash/external-resources',
'url': '/external-resources',
'content': external_css_and_js.layout,
'name': 'External CSS and JS',
'description': 'By default, Dash loads CSS and JS assets from a ' \
Expand All @@ -165,7 +165,7 @@
},

'urls': {
'url': '/dash/urls',
'url': '/urls',
'content': urls.layout,
'name': 'URL Routing and Multiple Apps',
'description': 'Dash provides two components (`dcc.Link` and ' \
Expand All @@ -175,7 +175,7 @@
},

'auth': {
'url': '/dash/authentication',
'url': '/authentication',
'content': auth.layout,
'name': 'Authentication',
'description': 'Authentication for dash apps is provided through a ' \
Expand All @@ -185,23 +185,23 @@
},

'deployment': {
'url': '/dash/deployment',
'url': '/deployment',
'content': deployment.layout,
'name': 'Deployment',
'description': 'To share a Dash app, you need to "deploy" your Dash ' \
'app to a server'
},

'deployment-onpremise': {
'url': '/dash/deployment/on-premise',
'url': '/deployment/on-premise',
'content': on_premise_deployment.layout,
'name': 'Deploying Dash Apps on Plotly On-Premises',
'description': "Plotly On-Premises is Plotly's commercial " \
"offering for hosting and sharing Dash apps."
},

'support': {
'url': '/dash/support',
'url': '/support',
'content': support.layout,
'name': 'Support and Contact',
'description': 'More information for Dash demos, On-Premise trials, ' \
Expand All @@ -211,91 +211,91 @@
### End of home.py ###

'dropdown-examples': {
'url': '/dash/dash-core-components/dropdown',
'url': '/dash-core-components/dropdown',
'content': examples.Dropdown,
'name': 'Dropdowns',
'description': 'Dropdown examples, properties, and reference.'
},

'slider-examples': {
'url': '/dash/dash-core-components/slider',
'url': '/dash-core-components/slider',
'content': examples.Slider,
'name': 'Sliders Component',
'description': 'Slider examples, properties, and reference.'
},

'range-slider-examples': {
'url': '/dash/dash-core-components/rangeslider',
'url': '/dash-core-components/rangeslider',
'content': examples.RangeSlider,
'name': 'Range Slider Component',
'description': 'Range slider examples, properties, and reference.'
},

'checklist-examples': {
'url': '/dash/dash-core-components/checklist',
'url': '/dash-core-components/checklist',
'content': examples.Checklist,
'name': 'Checklist Component',
'description': 'Checklist examples, properties, and reference.'
},

'input-examples': {
'url': '/dash/dash-core-components/input',
'url': '/dash-core-components/input',
'content': examples.Input,
'name': 'Input Component',
'description': 'Input properties and reference.'
},

'radio-item-examples': {
'url': '/dash/dash-core-components/radioitems',
'url': '/dash-core-components/radioitems',
'content': examples.RadioItems,
'name': 'Radio Item Component',
'description': 'Radio item examples, properties, and reference.'
},

'datepickersingle-examples': {
'url': '/dash/dash-core-components/datepickersingle',
'url': '/dash-core-components/datepickersingle',
'content': examples.DatePickerSingle,
'name': 'Date Picker: Single Component',
'description': 'Single date picker examples, properties, and reference.'
},

'datepickerrange-examples': {
'url': '/dash/dash-core-components/datepickerrange',
'url': '/dash-core-components/datepickerrange',
'content': examples.DatePickerRange,
'name': 'Date Picker: Range Component',
'description': 'Date range picker examples, properties, and reference.'
},

'markdown-examples': {
'url': '/dash/dash-core-components/markdown',
'url': '/dash-core-components/markdown',
'content': examples.Markdown,
'name': 'Markdown Component',
'description': 'Markdown examples, properties, and reference.'
},

'link-examples': {
'url': '/dash/dash-core-components/link',
'url': '/dash-core-components/link',
'content': examples.Link,
'name': 'Link Component',
'description': 'Link examples, properties, and reference.'
},

'textarea-examples': {
'url': '/dash/dash-core-components/textarea',
'url': '/dash-core-components/textarea',
'content': examples.Textarea,
'name': 'Text Area Component',
'description': 'Text area properties and reference.'
},

'upload-examples': {
'url': '/dash/dash-core-components/upload',
'url': '/dash-core-components/upload',
'content': examples.Upload,
'name': 'Upload Component',
'description': 'Upload examples, properties, and reference.'
},

'search': {
'url': '/dash/search',
'url': '/search',
'content': search.layout,
'name': '',
'description': 'Search the Dash Docs'
Expand Down
4 changes: 2 additions & 2 deletions tutorial/core_component_examples.py
Expand Up @@ -471,7 +471,7 @@
ComponentBlock("""import dash_core_components as dcc

dcc.Markdown('''
[Dash User Guide](https://plot.ly/dash/)
[Dash User Guide](https://dash.plot.ly/)
''')"""),
html.Hr(),
html.H3("Inline Code"),
Expand Down Expand Up @@ -976,7 +976,7 @@
# Link
Link = html.Div(children=[
html.H3('Link Example'),
dcc.Markdown('To learn more about links, see the chapter on [Dash URLs](/dash/urls)'),
dcc.Markdown('To learn more about links, see the chapter on [Dash URLs](/urls)'),
html.H3('Link Properties'),
generate_prop_table('Link')
])
Expand Down