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

Compatibility of flash-admin url = / " #218

Open
jackadam1981 opened this issue Mar 14, 2021 · 2 comments
Open

Compatibility of flash-admin url = / " #218

jackadam1981 opened this issue Mar 14, 2021 · 2 comments

Comments

@jackadam1981
Copy link

The relevant codes are as follows
https://github.com/jackadam1981/test_flask_admin.git

If flash-adimn is used, the user-defined URL address is url = '/',
It works well under windows and Linux.
The static file of flash-admin cannot be accessed normally in the container.

#admin = Admin(app,url='/')    
admin = Admin(app)    

Correct record
10.0.0.210 - - [14/Mar/2021:01:47:28 +0000] "GET /admin/static/bootstrap/bootstrap2/swatch/default/bootstrap.min.css?v=2.3.2 HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36" "-"
[pid: 16|app: 0|req: 3/5] 10.0.0.210 () {48 vars in 1001 bytes} [Sun Mar 14 01:47:28 2021] GET /admin/static/bootstrap/bootstrap2/swatch/default/bootstrap.min.css?v=2.3.2 => generated 0 bytes in 1 msecs (HTTP/1.1 304) 4 headers in 183 bytes (0 switches on core 0)

admin = Admin(app,url='/')    
#admin = Admin(app)    

Record of errors
2021/03/14 01:32:12 [error] 14#14: *3 open() "/app/static/admin/bootstrap/bootstrap2/js/bootstrap.min.js" failed (2: No such file or directory), client: 10.0.0.210, server: , request: "GET /static/admin/bootstrap/bootstrap2/js/bootstrap.min.js?v=2.3.2 HTTP/1.1", host: "10.0.0.10", referrer: "http://10.0.0.10/"
2021/03/14 01:32:12 [error] 14#14: *1 open() "/app/static/admin/vendor/moment.min.js" failed (2: No such file or directory), client: 10.0.0.210, server: , request: "GET /static/admin/vendor/moment.min.js?v=2.22.2 HTTP/1.1", host: "10.0.0.10", referrer: "http://10.0.0.10/"

@tiangolo
Copy link
Owner

tiangolo commented Sep 8, 2021

Hey, please create a small Dockerfile, the minimal dependencies, and a minimal app file, that way I can try to replicate your error.

Otherwise I wouldn't be able to help as I don't have enough information.

@jackadam1981
Copy link
Author

it's along time ago.
the file is delete.
i'll try do aging tomorr.

@github-actions github-actions bot removed the answered label Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants