Cara menggunakan pythonanywhere documentation
I have a free account at pythonanywhere.com. My thanks to them for providing this very nice free service and learning experience. To the PythonAnywhere folks who encourage me to use StackOverflow for questions about their site, I'll first say that I really like what you all have done with that site, and I'm excited to start building something there myself. I've already done the first tutorial within pythonanywhere.com with Flask and a second simple webapp (that I adapted from your first tutorial) exactly the same but using your built-in django 2.2 in place of Flask. Now I'm trying a tutorial from another site using python 3.8 and django 3.1. I'm following along in Chapter 2 of the djangoforbeginners.com site (helloworld app) and trying to implement instructions there in my pythonanywhere.com account. I know I need to adapt some of the djangoforbeginners.com instructions to fit the pythonanywhere.com environment (e.g. (This is not my main question, but an example of the problems I expect to encounter adapting a tutorial from another site to the pythonanywhere.com environment) I encountered a problem with the When I run the code above, I see the following error at the bash console:
And that makes sense to me because when I try to visit my webapp at username.pythonanywhere.com, I see a "Coming soon" page (after disabling my webapp in the dashboard; with my webapp enabled in the dashboard Web tab, I see a default "Hello World" page) which I know in both cases means that port is indeed already in use (by the server provided by pythonanywhere.com). So thinking about it a bit after seeing that error, I now think I should not even have attempted this So moving on to my real question: I've already followed instructions I found at https://help.pythonanywhere.com/pages/Virtualenvs including the part at the end where it reads: "Now that you have a virtualenv, and you know its path, you can go and enter it back in the Web tab. Go to the Virtualenv section, and enter the path: /home/myusername/.virtualenvs/myvirtualenv" I created my virtual environment using I also added to the Web tab in pythonanywhere.com's dashboard my source code directory for this web app: When I used the dashboard Web tab to reload the web app, I saw this error message: "Your webapp took a long time to reload. It probably reloaded, but we were unable to check it." But instead of the familiar Django welcome page, when I visit my webapp's URL, I see an apparently static html page: "Hello, World! This is the default welcome page for a PythonAnywhere hosted web application..." So my question in general is how to implement the helloworld app from djangoforbeginners.com within the pythonanywhere.com environment? And more specifically for now, my question is why I'm not seeing the familiar Django welcome page shown at djangoforbeginners.com in the first image, and how to continue to move forward past the Deploy di PYAW paling mudah karena tidak membutuhkan kita untuk menginstall aplikasi tertentu di komputer, tidak seperti Heroku yang membutuhkan aplikasi Heroku dan Git. Catatan:
Herokudiadaptasi dari tutorial resmi: Asumsi:
Langkah-langkah:
|