Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have a python script written up and the output of this script is a list . Right now I need to get it online and make it accesible to others. I looked at Django , but then I realised that it may be kind of hard to create the UI. Is there any simple way to create a UI in Django and map it to an existing python script. Right now I am not using sql and things like that. Or is there a simpler way by which I can proceed?
I'd go with Flask or web.py.
Django pays off if you develop a large app; yours is not.
Probably all you need is two pages: one with an input form, and another with results. As long as your input is text, you should have little trouble taking input from a POST handler and passing it as is to your script.
Both microframeworks have tutorials: here's web.py's, and Flask's is right on the home page. Should get you started very quickly.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
This month, I learnt Python. I compiled the code and am able to run it on my laptop. A simple code that asks the user yes/no responses to questions that helps them traverse through a flowchart and end up with a final choice/result.
How do I turn this into a Python Web Application that can be accessed by others over a URL and not be dependent on my laptop to run it?
You need to separate the parts of your app that have its logic from the ones which react to and update window content.
Then you need to rewrite the window management part for the web. From the scratch. Also other parts if they rely on things that are not available in a browser (usually local filesystem access).
It is doable, but not that trivial as web apps have different architecture from desktop apps, there are issues with concurrency, preserving app state, and browser limitations, to name few.
Anything more detailed requires you to describe what it is that your app does and how.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I'm building my first web app (hooray!). It's a very basic app that will take form input and spit it out in a script file for copying and pasting. I'm new to this all - do I need a database for something this simple? Building it in Flask, but I know enough Javascript to use that as well.
I played around with LocalStorage for a similar project, but have read that it can be a security risk. I've done some tutorials that have used SQLAlchemy and SQLite, but even those seem unnecessary for something this small.
Really appreciate any help on this - excited to get this sorted out!
Unless you are trying to store anything in the DB you don't any database connection. You are just taking input from a form and saving the same info in a script file or a text file. Database does not come into picture at all.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
So I have made a project website with a couple html files, css and some javascript. I was thinking that I would add a login functionality and some other things like that. So I set off to find out what would be good for it. Now its is hard for me because I can't decide which one to use. I saw Django on python but I had to make a whole new project for it and I have to start from scratch. I was just thinking I would add a database to this site using something. I am just doing some lightweight things. What should I use? Thank you.
Well if you are not going to use python for this with Django, you could use PHP and MySQL. I do it all the time for small sites. Basically just go to your hosting panel and create a new DB and then use php to create a connection script and then go from there as far as adding and using the database. All web hosts support this feature that I know of. If you go with Django though, you can simply add the sqllite3 DB or use something like MongoDB or any other DB out there really. Please look up the exact documentation for whichever route you choose.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
In reference towards me question, how would one be able to input data and retrieve data from various websites (not using an API)?
Is there a module that searches or acts like a human for purposes as in searching along applicably given fields; in effort to (as said before) retrieve data?
Sorry if I'm making my question hard to follow along; though if so, here's an example of what I am trying to accomplish:
Directing an AI towards a specific website.
Inputting data into the search field.
Then finally, retrieving said data after previously ran processes.
I'm fairly new to the section or field in manipulating websites via APIs or various (unknown) code; therefore, sorry if I missed anything!
You can use
mechanize,
BeautifulSoup,
Urllib,
Urllib2,
modules in Python. What I suggest you is use mechanize module. It is like scraping website through python program. More over simply a browser through python code.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm new to web development and going to make a website which responses with data received from request to web-service(facebook for e.g.) and how to choose what is more useful here:
nodejs has an callback model which allows not to wait while gathering data for user from other services (but i've broken my fingers and my brain after trying to make a kind of class in javascript with inheritance and the whole server drops after unhandled error in script)
python is very convinient in working with diff. kinds of data, it's more convinient for me, former C++ developer
yesterday i've read about twisted python that also uses callbacks
Help me please to choose what to use, better - performance, simple code
The callback model might make your code more verbose but WAIT! there is a solution! Check out
waitfor.
Anyway, if it's a personal project then no one is forcing you to use node.js for webapp development.You should go with what makes you more comfortable. If you like developing in python then go for it! :)
why don't you try django; it uses python (which you said is more convenient) and is also very commonly used for web development.