-
Notifications
You must be signed in to change notification settings - Fork 30
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
CSS assets do not seem to load when running in PyCharm #5
Comments
Could you try running it from the command line without PyCharm? I've seen issues previously about Dash infrastructure breaking when run through IDEs. |
Sure. FWIW, I am able to run 'regular' Dash project(s) via PyCharm. |
Ah ok. I'll try and run Slapdash in PyCharm and see if I can work out what's going on. |
The CSS loads fine when I follow these steps:
|
I will also test using the WSGI approach described in the README. |
Woohoo! The 'package-less' approach works with the following, somewhat convoluted, steps:
I somewhat prefer this approach, were the |
Great :)
I'm curious, any reason(s) in particular why you prefer to not install it
as a package?
Yeah, that's the catch; I don't want to maintain two separate lists of
dependencies that then both have to be synchronised for package and
non-installation of dependencies. One thing I've seen projects do is to
have `setup.py` programatically extract the list of dependencies from a
separate `requirements.txt` file.
…On Wed, 31 Oct 2018 at 01:22, Brylie Christopher Oxley < ***@***.***> wrote:
Woohoo! The 'package-less' approach works with the following, somewhat
convoluted, steps:
1. clone repo
2. cd to src
3. run virtualenv venv
4. run source venv/bin/activate
5. pip install -r ../requirements.txt
6. pip install dash-core-components
7. pip install dash-html-components
8. gunicorn slapdash.wsgi
9. open URL
I somewhat prefer this approach, were the requirements.txt to be in the
src directory and include the dash-core-components and
dash-html-components.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACs1GHxmHr6tq4Uo7fsbRXfzNb82V6wXks5uqGCPgaJpZM4X-1NL>
.
--
nedned.net
|
Well, I am just thinking it could be easier for a new developer to simply run
rather than
Otherwise, this is so new to me I haven't formed a richer opinion. |
Not sure if it makes any difference, but you don't actually need the
`pip install
-r requirements.txt` in the current set up. That's just for development
purposes, but not really used. I should probably remove it.
…On Wed, 31 Oct 2018 at 01:29, Brylie Christopher Oxley < ***@***.***> wrote:
Well, I am just thinking it could be easier for a new developer to simply
run pip install -r requirements.txt && python app.py or something
similar, rather than pip install -r requirements.txt && pip install -e .
&& python run_server.py, which is somewhat ambiguous. Otherwise, this is
so new to me I haven't formed a richer opinion.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACs1GCq5AjDY8XzJC33lGKgKkYZknTdfks5uqGJfgaJpZM4X-1NL>
.
--
nedned.net
|
Ah, thanks for clarification. |
I can't replicate the issue, running Note that Maybe also check that you have the latest Dash installed. |
Closing this for now |
Sorry for coming late to the party. Have the same issue on MacOS with PyCharm 2018.3. Would prefer to install it as a package. Tried the following from the command line after cloning repo:
Server starts. Assets don't seem to load. Any suggestions? |
Managed to solve it by passing @ned2 Any advice on best practice? I assume related to your post plotly/dash#198. |
Oops, good catch! It used to be that Dash would take the This is now fixed in 75f443c Thanks! |
Thanks for your library! Has helped us tremendously. |
Wonderful to hear :) |
I notice the
bootstrap.min.css
andcustom.css
files in theslapdash/assets
folder, along with FontAwesome. However, these assets do not seem to load when running the app:When I navigate to the
/assets
route in the browser, it says "no page '/assets'".I ran the project in PyCharm by running the
run_flask.py
file after installingslapdash
in the virtual environment.The text was updated successfully, but these errors were encountered: