STAY INFORMED
following content serves as a personal note and may lack complete accuracy or certainty.

Minimal-Mistakes instruction
Useful vscode Shortcut Keys
Unix Commands
npm Commands
Vim Commands
Git Note
Useful Figma Shortcut Keys

1 minute read

E-Commerce Website Project_1 E-Commerce Website Project_2 E-Commerce Website Project_3 E-Commerce Website Project_4

Email Verification

Go to your account google page and create a passcode for your app.

After, go to setttings.py

# Email settings
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = "smtp.gmail.com"
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "tongsik98@gmail.com"
EMAIL_HOST_PASSWORD = "your passcode"

Deploy

Zip your project file, and go to pythonanywhere -> log in -> click ‘files’ -> upload file -> click ‘Open bash console here’

unzip "your file name"

Back to previous page -> click your project file -> open settings.py

DEBUG = False

ALLOWED_HOSTS = ['.pythonanywhere.com']

Click ‘consoles’ in the menu nav and open in a new tab -> create virtual env

virtualenv --python=python3.7 django_ecommerce_env
source django_ecommerce_env/bin/activate
pip install django==2.2 django-allauth django-widget0tweaks pillow ...(what you have installed)

Click ‘web’ in the menu nav and open in a new tab -> click “Add a new web app” -> click next -> click “Manual configuration” -> select version -> click next -> set source code to “/home/[yourId]/ecommerce_project” -> modify “WSGI configuration file”

Command

HELLO_WORLD = """<html>
<head>
    <title>PythonAnywhere hosted web application</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>
    This is the default welcome page for a
    <a href="https://www.pythonanywhere.com/">PythonAnywhere</a>
    hosted web application.
</p>
<p>
    Find out more about how to configure your own web application
    by visiting the <a href="https://www.pythonanywhere.com/web_app_setup/">web app setup</a> page
</p>
</body>
</html>"""


def application(environ, start_response):
    if environ.get('PATH_INFO') == '/':
        status = '200 OK'
        content = HELLO_WORLD
    else:
        status = '404 NOT FOUND'
        content = 'Page not found.'
    response_headers = [('Content-Type', 'text/html'), ('Content-Length', str(len(content)))]
    start_response(status, response_headers)
    yield content.encode('utf8')

Uncommand

import os
import sys

# assuming your django settings file is at '/home/tongsik98/mysite/mysite/settings.py'
# and your manage.py is is at '/home/tongsik98/mysite/manage.py'
path = '/home/tongsik98/mysite'
if path not in sys.path:
    sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

# then:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

change mysite to your project name.

path = '/home/tongsik98/mysite'
if path not in sys.path:
    sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

go back and set virtualenv ‘/home/tongsik98/django_ecommerce_env’