-
Notifications
You must be signed in to change notification settings - Fork 251
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
Python 3 Flask connector #164
Comments
File editing is enabled by default. I can see you use python connector. It's outdated. The only actual comectors are PHP and Java. I'm not Python developer and can't help you, but you can update the connector by your own. I would appreciate if you become a maintainer of Python connector. |
I'm so sorry, it was a typo on my part. In the getfile and getfolder modes I had set type incorrectly. It works now. I'm adapting this to python 3 and flask. I may be able to share the python-flask connector blueprint when I'm done. |
That would be great! Keep in mind that I'm going to remove "replace" action at the next release. It's rarely used and actual not very helful. So you don't have to adapt "replace" action at the server-side. It would be better if you just remove it. If you use PHP connector as an example for implementation (I recommend you to do, because it supports all client-side features), I would strongly recomend you to examine "refactored" branch, which implements new security model and will be released in the next version. The refactoring is in progress, be aware. Pay particular attention to the backend configuration file. It will give you an idea of the most of server-side features of PHP connector which I would like to be implemented for Python connector. The location of the file may be changes due to refactoring process. |
Thanks, I'll do that! |
Hi @jsooter ! Since the latest release v2.4.0 PHP connector is moved to the separate repository and should be installed via composer. You can do the same for the Python connector that you are working on. Are not you? Check out new location of configuration files. Please let me know if you have any impediments while implementing Python connector. Also inform me if you stoped working on it and not going to proceed. I will close the issue in this case. Thanks anyhow. |
I ran short of time last week and couldn't finish the python connector. If it works for you, I plan on creating a class for the connector as well as a Flask blueprint. Once I finish my own implementation I'll refactor that code, test it and submit a pull request (unless you want me to manage a connector repo). The blueprint will allow users to drop the connector into a Flask site fairly easily with very little configuration. BTW I like the new config location. It will allow me to recommend and set a default path so it works out of the box. |
Glad to hear you are keep going. I definetely want that you implement, manage and maintain Python connector in the future. I'm not good at Python and just would like it to be flexible and easy to install. The decision is yours, you know it better either way. Keep me informed on the implementation progress occasionally, please. Thus I will be aware that things are moving on. Thanks a lot for your efforts! |
Hey @jsooter |
Its done. Should to have it up on github tomorrow.
|
Excellent news! Could your also create If you are going to push Python connector in a separate repository, you can keep detailed index |
Sure, I can do that.
|
I have setup a repo for a working example of Python3 and Flask with Rich Filemanager. |
Great! What about the entry point for your connector? You can see file At the moment there is outdated |
What I created was a Python Flask application which works without Apache. In Flask static files should be located in the static directory. I have used Mod WSGI to run a flask application in parallel with Apache, which would allow the folder structure you're requesting but the setup is complex. The current python connector (included with RichFilemanager) uses Mod Python, which I have never used. It may be possible to fix that connector, which is the next thing I planned on doing. As far as I know it is not possible to run Flask with Mod Python. Since I used Flask for my project It made sense to share it and was fairly easy to make a stand-alone implementation. |
I see. Concerning to your reply I think the extensive description article is required to describe all the things. It will help a lot for users who are going to use your Python Flask connector.
Excellent news. I hope it will be much easier for you to implement it, since you already have experience and code base, which may be reused probably. |
Hi @jsooter I'm going to mention your connector as a part of the next release but it may be tricy fo rcustomers without docs. |
It's been a busy week, I'll get it done this weekend for sure. I looked into mod python and it looks like development has fallen off. I think most people are using wsgi so I was thinking of building an apache/flask app so the folder structure could stay the same. However, configuration would be more complicated. I think it would be good to have both the stand-alone flask app and the wsgi version. |
Great, nice to hear!
Yeap, it's completely outdated and should be rewritten or replaced,
Absolutely agree and hope that you will find time for this. |
Hi @jsooter |
I've added more details and description to the readme but I just haven't had time to setup and test the WSGI version. I'll set a goal to get that wrapped up by the end of this week. |
Good. Looking forward. |
I have just released v2.5.0 and noted your Python Flask connector in release notes. Now it more actual than before to create a simple Wiki article for the Richfilemanager repository, which will contain a few sentences describing your connector and link to your repository, so others could follow it. See my original request here. You can send a |
I'm going to add this article to the Connectors section of the Wiki |
Ok, I have created the wiki article: Let me know if you want to add something to this article. |
I close this issue due to inactivity. |
On the demo (fm.devale.pro) when I click on a file I see the file contents and can edit text files. However, on my server when I click on a file nothing happens. I see no output in the console either so I'm assuming file edit must be enabled but I'm not sure how. Here is my filemanager.config.json:
The text was updated successfully, but these errors were encountered: