@@ -189,15 +189,15 @@ The main web tab at Python Anywhere looks like this:
189189
190190.. image:: http://tutorial.pythonanywhere.com/static/django/pa_web_dashboard.jpg
191191
192- To edit your wsgi.py file you click the link titled "this WSGI file". Every
192+ To edit your `` wsgi.py`` file you click the link titled "this WSGI file". Every
193193time you make a change to the files on the Python Anywhere servers you need to
194194click the "Reload web app" button at the bottom of the page. This reloads the
195195web server so that it notices the changes you have made.
196196
197197You can also follow the links through to your error and access logs. These are
198198very handy for figuring out why the code you have written might not be working
199199or seeing who has been visiting your respectively. If your web app is giving
200- a message like " 500 internal server error" then you should visit your error log
200+ a message like `` 500 internal server error`` then you should visit your error log
201201and see the actual error message that your code is generating.
202202
203203The WSGI file here is how you tell Python Anywhere what application you actually
@@ -214,7 +214,7 @@ Django is already installed on Python Anywhere so you it is easy to get started.
214214.. image:: http://tutorial.pythonanywhere.com/static/django/pa_console_dashboard.jpg
215215
216216The first commands need to be run inside a bash console. You will need to go to
217- the " Consoles" tab of Python Anywhere and click on the link highlighted in red
217+ the ** Consoles** tab of Python Anywhere and click on the link highlighted in red
218218here to create a new bash console.
219219
220220You will then need to type the following at
@@ -244,14 +244,14 @@ this.
244244
245245.. image:: http://tutorial.pythonanywhere.com/static/django/pa_console_django_start.jpg
246246
247- Your next step is to edit the wsgi.py file which is located at /var/www/wsgi.py.
247+ Your next step is to edit the `` wsgi.py`` file which is located at `` /var/www/wsgi.py`` .
248248
249249
250250Editing your wsgi.py file
251251---------------------------------------------------------------------------------
252252
253- The wsgi.py file is a Python Anywhere specific Python script and cannot be moved
254- or renamed. You can find a direct link to it on the Web tab of the dashboard.
253+ The `` wsgi.py`` file is a Python Anywhere specific Python script and cannot be moved
254+ or renamed. You can find a direct link to it on the ** Web** tab of the dashboard.
255255Go there now and edit the file so that it matches the one below. Making sure to
256256replace the <my name> amd <my project name> with the your username and the
257257project name that you chose in the previous step.
@@ -292,7 +292,7 @@ provides support for MySQL databases but for now we will just use sqlite3. A fil
292292based database that does not require setting up a database account and password.
293293
294294The file that contains all the settings information for Django is called,
295- naturally enough, settings.py. By default it lives in your Django project
295+ naturally enough, `` settings.py`` . By default it lives in your Django project
296296directory. You will need to open this file up and change the DATABASE and
297297INSTALLED_APPS sections of it so that it looks like the code below. Do not change
298298any other bits of it at this time.
@@ -335,8 +335,8 @@ Defining your urls
335335
336336The next step is defining the urls for your application. This means you are
337337starting to tell Django what to do when a user visits a certain location in your
338- web site. The file to edit is called urls.py and it should be in the same
339- directory as your settings.py file. Open it up and make it look like the file
338+ web site. The file to edit is called `` urls.py`` and it should be in the same
339+ directory as your `` settings.py`` file. Open it up and make it look like the file
340340below. Remember, as always, that each time you see a phrase inside angle
341341brackets you need to replace it with the project and app name that you have
342342chosen.
@@ -369,7 +369,7 @@ string which is what happens when a user visits the <your username>.pythonanywhe
369369The second one matches "admin/" which is Djangos default admin interface. This
370370should now be working. If you like you can take a look at it now, logging in with
371371the username and password that you provided earlier. When you are done come back
372- here to continue. You may need to press the " Reload web app" button on your on
372+ here to continue. You may need to press the ** Reload web app** button on your on
373373the web tab before theses changes will be recognised. Do that if it doesn't work
374374the first time you visit it.
375375
@@ -391,7 +391,7 @@ empty template file using the commands below.
391391 mkdir <my project name>/templates
392392 touch <my project name>/templates/home.html
393393
394- Now go back to your files and edit the home.html template file so that it looks
394+ Now go back to your files and edit the `` home.html`` template file so that it looks
395395like this.
396396
397397.. sourcecode:: html+django
@@ -408,17 +408,17 @@ like this.
408408 </body>
409409 </html>
410410
411- The values inside the " {{ }}" are going to be replaced by dynamic content when
411+ The values inside the `` {{ }}`` are going to be replaced by dynamic content when
412412we complete our final task. Which is writing a view.
413413
414414
415415Writing the first view
416416---------------------------------------------------------------------------------
417417
418418Views are Django functions which take a request and return a response. We are
419- going to write a very simple view called home which uses the " home.html" template
419+ going to write a very simple view called home which uses the `` home.html`` template
420420and uses the datetime module to tell us what the time is whenever the page is
421- refreshed. The file we need to edit is called views.py and it will be inside
421+ refreshed. The file we need to edit is called `` views.py`` and it will be inside
422422the <my app name> folder inside the directory containing settings.py.
423423
424424Copy the code below into it and save the file.
0 commit comments