Finish Week 1 from the readme and move on to my video tutorial for week 2 and 4
Python
Django Coursera Week 1
This is the code for the auto-grader assignment for week 1 of Building Web Applications in Django. This code is to be uploaded to your personal accounts on PythonAnywhere. Please follow the instructions below to do the same and get the site live.
Part 1 - Getting our project live on PythonAnywhere
Step 1: Clone the repository by running the command below in the bash console of your pythonanywhere beginner account.
Step 5: Go to Web tab on the top right and click on it. You will see Create a Web Application button, click on it. Select python version 3.10, click Next click on Manual Configuration(make sure you do not click on the “Django” option).
Step 6: Change source code and virtualenv location to that of your respective project by changing the username only. Refer to the image below.
Step 7a: Change the WSGI configuration file by clicking on the link. Clicking the link will lead you to an editor. Refer to the image to locate the required file.
Step 7b: Just remove everything from the file and paste the below given code. Make sure you change <your_username> to your respective username and save the file by clicking Save at the top right.
import os
import sys
path = '/home/<your_username>/mysite'
if path not in sys.path:
sys.path.insert(0, path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Step 8: Add path for static files. Please change your account username. Refer to the image below.
Step 9: Refresh the site by clicking on the green button at the top of the page. Refer to the image below.
Part 2 - Configuring our application for the Auto-Grader
Step 1: Visit the url of your deployment with the extension /admin/ (<your_username>.pythonanywhere.com/admin/) to view the application. Login with the credentials "admin" and "password" as username and password respectively.
Step 2: Click on users and after logging in and delete the existing user with username "dj4e".
Step 3: Create a new user with the username and password provided by the auto-grader. Refer to the image below.(Note: The password provided for every coursera student is different)
Step 4: Add priviledges to the newly created user by clicking "Choose All" and add "Staff Status" to the user. Refer to the image below.
Step 5: Paste your url in the auto-grader and evaluate.