├── LICENSE
├── README.md
├── Section 3
├── Django Cheat Sheet.txt
└── django3-password-generator-master
│ ├── bd.sqlite3
│ ├── db.sqlite3
│ ├── generator
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── __init__.cpython-38.pyc
│ │ ├── admin.cpython-38.pyc
│ │ ├── models.cpython-38.pyc
│ │ └── views.cpython-38.pyc
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ │ ├── __init__.py
│ │ └── __pycache__
│ │ │ └── __init__.cpython-38.pyc
│ ├── models.py
│ ├── templates
│ │ └── generator
│ │ │ ├── about.html
│ │ │ ├── home.html
│ │ │ └── password.html
│ ├── tests.py
│ └── views.py
│ ├── manage.py
│ └── password_generator
│ ├── __init__.py
│ ├── __pycache__
│ ├── __init__.cpython-38.pyc
│ ├── settings.cpython-38.pyc
│ ├── urls.cpython-38.pyc
│ └── wsgi.cpython-38.pyc
│ ├── asgi.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── Section 5
└── django3-personal-portfolio-master
│ ├── .gitignore
│ ├── blog
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ └── __init__.py
│ ├── models.py
│ ├── templates
│ │ └── blog
│ │ │ ├── all_blogs.html
│ │ │ └── detail.html
│ ├── tests.py
│ ├── urls.py
│ └── views.py
│ ├── db.sqlite3
│ ├── manage.py
│ ├── media
│ └── portfolio
│ │ └── images
│ │ ├── SwiftUI_Icon.jpg
│ │ ├── Zappy.jpg
│ │ └── iOS_13_Course_Image.png
│ ├── personal_portfolio
│ ├── __init__.py
│ ├── asgi.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
│ ├── portfolio
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ └── __init__.py
│ ├── models.py
│ ├── static
│ │ └── portfolio
│ │ │ ├── Logo.png
│ │ │ ├── SquareBlonde.jpg
│ │ │ ├── custom.css
│ │ │ └── resume.pdf
│ ├── templates
│ │ └── portfolio
│ │ │ ├── base.html
│ │ │ └── home.html
│ ├── tests.py
│ └── views.py
│ └── requirements.txt
└── Section 7
└── django3-todowoo-project-master
├── db.sqlite3
├── manage.py
├── todo
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-38.pyc
│ ├── admin.cpython-38.pyc
│ ├── forms.cpython-38.pyc
│ ├── models.cpython-38.pyc
│ └── views.cpython-38.pyc
├── admin.py
├── apps.py
├── forms.py
├── migrations
│ ├── 0001_initial.py
│ ├── 0002_auto_20200131_0131.py
│ ├── __init__.py
│ └── __pycache__
│ │ ├── 0001_initial.cpython-38.pyc
│ │ ├── 0002_auto_20200131_0131.cpython-38.pyc
│ │ └── __init__.cpython-38.pyc
├── models.py
├── static
│ └── todo
│ │ └── logo.png
├── templates
│ └── todo
│ │ ├── base.html
│ │ ├── completedtodos.html
│ │ ├── createtodo.html
│ │ ├── currenttodos.html
│ │ ├── home.html
│ │ ├── loginuser.html
│ │ ├── signupuser.html
│ │ └── viewtodo.html
├── tests.py
└── views.py
└── todowoo
├── __init__.py
├── __pycache__
├── __init__.cpython-38.pyc
├── settings.cpython-38.pyc
├── urls.cpython-38.pyc
└── wsgi.cpython-38.pyc
├── asgi.py
├── settings.py
├── urls.py
└── wsgi.py
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Packt
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # Django-3-Full-Stack-Websites-with-Python-Web-Development
5 |
--------------------------------------------------------------------------------
/Section 3/Django Cheat Sheet.txt:
--------------------------------------------------------------------------------
1 | Django Cheat Sheet
2 | There's a couple of Django commands that I'm going to cover in this section that can be hard to remember so I made a Django Cheat Sheet so that you can quickly get to these commands when you're working on your own project. Enjoy!
3 |
4 | https://zappycode.com/posts/1/django-cheat-sheet
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/bd.sqlite3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/bd.sqlite3
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/db.sqlite3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/db.sqlite3
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/generator/__init__.py
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/generator/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/__pycache__/admin.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/generator/__pycache__/admin.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/__pycache__/models.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/generator/__pycache__/models.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/__pycache__/views.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/generator/__pycache__/views.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class GeneratorConfig(AppConfig):
5 | name = 'generator'
6 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/generator/migrations/__init__.py
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/migrations/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/generator/migrations/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 |
3 | # Create your models here.
4 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/templates/generator/about.html:
--------------------------------------------------------------------------------
1 |
About
2 |
3 | This is a pasword generator created by Nick Walter. Enjoy fam!
4 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/templates/generator/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Password Generator
5 |
6 |
28 |
29 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/templates/generator/password.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Your password is:
5 |
{{ password }}
6 |
Home
7 |
8 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/generator/views.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render
2 | from django.http import HttpResponse
3 | import random
4 |
5 | # Create your views here.
6 |
7 | def home(request):
8 | return render(request, 'generator/home.html')
9 |
10 | def about(request):
11 | return render(request, 'generator/about.html')
12 |
13 | def password(request):
14 | characters = list('abcdefghijklmnopqrstuvwxyz')
15 |
16 | if request.GET.get('uppercase'):
17 | characters.extend(list('ABCDEFGHIJKLMNOPQRSTUVWXYZ'))
18 | if request.GET.get('special'):
19 | characters.extend(list('!@#$%^&*()'))
20 | if request.GET.get('numbers'):
21 | characters.extend(list('0123456789'))
22 |
23 | length = int(request.GET.get('length',12))
24 |
25 | thepassword = ''
26 | for x in range(length):
27 | thepassword += random.choice(characters)
28 |
29 | return render(request, 'generator/password.html', {'password':thepassword})
30 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Django's command-line utility for administrative tasks."""
3 | import os
4 | import sys
5 |
6 |
7 | def main():
8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'password_generator.settings')
9 | try:
10 | from django.core.management import execute_from_command_line
11 | except ImportError as exc:
12 | raise ImportError(
13 | "Couldn't import Django. Are you sure it's installed and "
14 | "available on your PYTHONPATH environment variable? Did you "
15 | "forget to activate a virtual environment?"
16 | ) from exc
17 | execute_from_command_line(sys.argv)
18 |
19 |
20 | if __name__ == '__main__':
21 | main()
22 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/password_generator/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/password_generator/__init__.py
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/password_generator/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/password_generator/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/password_generator/__pycache__/settings.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/password_generator/__pycache__/settings.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/password_generator/__pycache__/urls.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/password_generator/__pycache__/urls.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/password_generator/__pycache__/wsgi.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 3/django3-password-generator-master/password_generator/__pycache__/wsgi.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/password_generator/asgi.py:
--------------------------------------------------------------------------------
1 | """
2 | ASGI config for password_generator project.
3 |
4 | It exposes the ASGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.asgi import get_asgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'password_generator.settings')
15 |
16 | application = get_asgi_application()
17 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/password_generator/settings.py:
--------------------------------------------------------------------------------
1 | """
2 | Django settings for password_generator project.
3 |
4 | Generated by 'django-admin startproject' using Django 3.0.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/topics/settings/
8 |
9 | For the full list of settings and their values, see
10 | https://docs.djangoproject.com/en/3.0/ref/settings/
11 | """
12 |
13 | import os
14 |
15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 |
18 |
19 | # Quick-start development settings - unsuitable for production
20 | # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
21 |
22 | # SECURITY WARNING: keep the secret key used in production secret!
23 | SECRET_KEY = 'u!vgjs=@rdo5)g0d(7f4!afjijiqpwjfniewnfpiewjofpfpwq*4kf%bc8)a8spc3jnb8asib6f'
24 |
25 | # SECURITY WARNING: don't run with debug turned on in production!
26 | DEBUG = True
27 |
28 | ALLOWED_HOSTS = []
29 |
30 |
31 | # Application definition
32 |
33 | INSTALLED_APPS = [
34 | 'django.contrib.admin',
35 | 'django.contrib.auth',
36 | 'django.contrib.contenttypes',
37 | 'django.contrib.sessions',
38 | 'django.contrib.messages',
39 | 'django.contrib.staticfiles',
40 | 'generator',
41 | ]
42 |
43 | MIDDLEWARE = [
44 | 'django.middleware.security.SecurityMiddleware',
45 | 'django.contrib.sessions.middleware.SessionMiddleware',
46 | 'django.middleware.common.CommonMiddleware',
47 | 'django.middleware.csrf.CsrfViewMiddleware',
48 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
49 | 'django.contrib.messages.middleware.MessageMiddleware',
50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware',
51 | ]
52 |
53 | ROOT_URLCONF = 'password_generator.urls'
54 |
55 | TEMPLATES = [
56 | {
57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates',
58 | 'DIRS': [],
59 | 'APP_DIRS': True,
60 | 'OPTIONS': {
61 | 'context_processors': [
62 | 'django.template.context_processors.debug',
63 | 'django.template.context_processors.request',
64 | 'django.contrib.auth.context_processors.auth',
65 | 'django.contrib.messages.context_processors.messages',
66 | ],
67 | },
68 | },
69 | ]
70 |
71 | WSGI_APPLICATION = 'password_generator.wsgi.application'
72 |
73 |
74 | # Database
75 | # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
76 |
77 | DATABASES = {
78 | 'default': {
79 | 'ENGINE': 'django.db.backends.sqlite3',
80 | 'NAME': os.path.join(BASE_DIR, 'bd.sqlite3'),
81 | }
82 | }
83 |
84 |
85 | # Password validation
86 | # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
87 |
88 | AUTH_PASSWORD_VALIDATORS = [
89 | {
90 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
91 | },
92 | {
93 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
94 | },
95 | {
96 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
97 | },
98 | {
99 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
100 | },
101 | ]
102 |
103 |
104 | # Internationalization
105 | # https://docs.djangoproject.com/en/3.0/topics/i18n/
106 |
107 | LANGUAGE_CODE = 'en-us'
108 |
109 | TIME_ZONE = 'UTC'
110 |
111 | USE_I18N = True
112 |
113 | USE_L10N = True
114 |
115 | USE_TZ = True
116 |
117 |
118 | # Static files (CSS, JavaScript, Images)
119 | # https://docs.djangoproject.com/en/3.0/howto/static-files/
120 |
121 | STATIC_URL = '/static/'
122 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/password_generator/urls.py:
--------------------------------------------------------------------------------
1 | """password_generator URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/3.0/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: path('', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.urls import include, path
14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15 | """
16 |
17 | from django.urls import path
18 | from generator import views
19 |
20 | urlpatterns = [
21 | path('', views.home, name='home'),
22 | path('password/', views.password, name='password'),
23 | path('about/', views.about, name='about'),
24 | ]
25 |
--------------------------------------------------------------------------------
/Section 3/django3-password-generator-master/password_generator/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for password_generator project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'password_generator.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | *.pot
3 | *.pyc
4 | __pycache__/
5 | local_settings.py
6 | /static/
7 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/blog/__init__.py
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Blog
3 |
4 | admin.site.register(Blog)
5 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class BlogConfig(AppConfig):
5 | name = 'blog'
6 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.0 on 2020-01-24 04:16
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | initial = True
9 |
10 | dependencies = [
11 | ]
12 |
13 | operations = [
14 | migrations.CreateModel(
15 | name='Blog',
16 | fields=[
17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18 | ('title', models.CharField(max_length=200)),
19 | ('description', models.TextField()),
20 | ('date', models.DateField()),
21 | ],
22 | ),
23 | ]
24 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/blog/migrations/__init__.py
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 |
3 | class Blog(models.Model):
4 | title = models.CharField(max_length=200)
5 | description = models.TextField()
6 | date = models.DateField()
7 |
8 | def __str__(self):
9 | return self.title
10 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/templates/blog/all_blogs.html:
--------------------------------------------------------------------------------
1 | {% extends "portfolio/base.html" %}
2 |
3 | {% load static %}
4 |
5 | {% block content %}
6 |
7 | Blog
8 |
9 | Nick has written {{ blogs.count }} blog{{ blogs.count|pluralize }}
10 |
11 | {% for blog in blogs %}
12 |
13 |
14 |
15 | {{ blog.title }}
16 |
17 |
{{ blog.date|date:'M d Y'|upper }}
18 |
{{ blog.description|striptags|truncatechars:100 }}
19 |
20 |
21 | {% endfor %}
22 |
23 | {% endblock %}
24 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/templates/blog/detail.html:
--------------------------------------------------------------------------------
1 | {% extends "portfolio/base.html" %}
2 |
3 | {% load static %}
4 |
5 | {% block content %}
6 |
7 | {{ blog.title }}
8 |
9 | {{ blog.date|date:'F jS Y' }}
10 |
11 | {{ blog.description|safe }}
12 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 | from . import views
3 |
4 | app_name = 'blog'
5 |
6 | urlpatterns = [
7 | path('', views.all_blogs, name='all_blogs'),
8 | path('/', views.detail, name='detail'),
9 | ]
10 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/blog/views.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render, get_object_or_404
2 | from .models import Blog
3 |
4 | def all_blogs(request):
5 | blogs = Blog.objects.order_by('-date')
6 | return render(request, 'blog/all_blogs.html', {'blogs':blogs})
7 |
8 | def detail(request, blog_id):
9 | blog = get_object_or_404(Blog, pk=blog_id)
10 | return render(request, 'blog/detail.html',{'blog':blog})
11 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/db.sqlite3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/db.sqlite3
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Django's command-line utility for administrative tasks."""
3 | import os
4 | import sys
5 |
6 |
7 | def main():
8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'personal_portfolio.settings')
9 | try:
10 | from django.core.management import execute_from_command_line
11 | except ImportError as exc:
12 | raise ImportError(
13 | "Couldn't import Django. Are you sure it's installed and "
14 | "available on your PYTHONPATH environment variable? Did you "
15 | "forget to activate a virtual environment?"
16 | ) from exc
17 | execute_from_command_line(sys.argv)
18 |
19 |
20 | if __name__ == '__main__':
21 | main()
22 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/media/portfolio/images/SwiftUI_Icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/media/portfolio/images/SwiftUI_Icon.jpg
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/media/portfolio/images/Zappy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/media/portfolio/images/Zappy.jpg
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/media/portfolio/images/iOS_13_Course_Image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/media/portfolio/images/iOS_13_Course_Image.png
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/personal_portfolio/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/personal_portfolio/__init__.py
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/personal_portfolio/asgi.py:
--------------------------------------------------------------------------------
1 | """
2 | ASGI config for personal_portfolio project.
3 |
4 | It exposes the ASGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.asgi import get_asgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'personal_portfolio.settings')
15 |
16 | application = get_asgi_application()
17 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/personal_portfolio/settings.py:
--------------------------------------------------------------------------------
1 | """
2 | Django settings for personal_portfolio project.
3 |
4 | Generated by 'django-admin startproject' using Django 3.0.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/topics/settings/
8 |
9 | For the full list of settings and their values, see
10 | https://docs.djangoproject.com/en/3.0/ref/settings/
11 | """
12 |
13 | import os
14 |
15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 |
18 |
19 | # Quick-start development settings - unsuitable for production
20 | # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
21 |
22 | # SECURITY WARNING: keep the secret key used in production secret!
23 | SECRET_KEY = '7fea)agzt#$+opj(@%htikxso#%(b-6os8n56a9uw*o9&yjm75'
24 |
25 | # SECURITY WARNING: don't run with debug turned on in production!
26 | DEBUG = False
27 |
28 | ALLOWED_HOSTS = ['www.nickwalter.info']
29 |
30 |
31 | # Application definition
32 |
33 | INSTALLED_APPS = [
34 | 'django.contrib.admin',
35 | 'django.contrib.auth',
36 | 'django.contrib.contenttypes',
37 | 'django.contrib.sessions',
38 | 'django.contrib.messages',
39 | 'django.contrib.staticfiles',
40 | 'blog',
41 | 'portfolio',
42 | ]
43 |
44 | MIDDLEWARE = [
45 | 'django.middleware.security.SecurityMiddleware',
46 | 'django.contrib.sessions.middleware.SessionMiddleware',
47 | 'django.middleware.common.CommonMiddleware',
48 | 'django.middleware.csrf.CsrfViewMiddleware',
49 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
50 | 'django.contrib.messages.middleware.MessageMiddleware',
51 | 'django.middleware.clickjacking.XFrameOptionsMiddleware',
52 | ]
53 |
54 | ROOT_URLCONF = 'personal_portfolio.urls'
55 |
56 | TEMPLATES = [
57 | {
58 | 'BACKEND': 'django.template.backends.django.DjangoTemplates',
59 | 'DIRS': [],
60 | 'APP_DIRS': True,
61 | 'OPTIONS': {
62 | 'context_processors': [
63 | 'django.template.context_processors.debug',
64 | 'django.template.context_processors.request',
65 | 'django.contrib.auth.context_processors.auth',
66 | 'django.contrib.messages.context_processors.messages',
67 | ],
68 | },
69 | },
70 | ]
71 |
72 | WSGI_APPLICATION = 'personal_portfolio.wsgi.application'
73 |
74 |
75 | # Database
76 | # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
77 |
78 | DATABASES = {
79 | 'default': {
80 | 'ENGINE': 'django.db.backends.sqlite3',
81 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
82 | }
83 | }
84 |
85 |
86 | # Password validation
87 | # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
88 |
89 | AUTH_PASSWORD_VALIDATORS = [
90 | {
91 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
92 | },
93 | {
94 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
95 | },
96 | {
97 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
98 | },
99 | {
100 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
101 | },
102 | ]
103 |
104 |
105 | # Internationalization
106 | # https://docs.djangoproject.com/en/3.0/topics/i18n/
107 |
108 | LANGUAGE_CODE = 'en-us'
109 |
110 | TIME_ZONE = 'UTC'
111 |
112 | USE_I18N = True
113 |
114 | USE_L10N = True
115 |
116 | USE_TZ = True
117 |
118 |
119 | # Static files (CSS, JavaScript, Images)
120 | # https://docs.djangoproject.com/en/3.0/howto/static-files/
121 |
122 | STATIC_URL = '/static/'
123 | STATIC_ROOT = os.path.join(BASE_DIR, 'static')
124 |
125 | MEDIA_URL = '/media/'
126 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
127 |
128 | try:
129 | from .local_settings import *
130 | except ImportError:
131 | print("Looks like no local file. You must be on production")
132 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/personal_portfolio/urls.py:
--------------------------------------------------------------------------------
1 | """personal_portfolio URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/3.0/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: path('', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.urls import include, path
14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15 | """
16 | from django.contrib import admin
17 | from django.urls import path, include
18 | from django.conf.urls.static import static
19 | from django.conf import settings
20 | from portfolio import views
21 |
22 | urlpatterns = [
23 | path('admin/', admin.site.urls),
24 | path('', views.home, name='home'),
25 | path('blog/', include('blog.urls')),
26 | ]
27 |
28 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
29 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/personal_portfolio/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for personal_portfolio project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'personal_portfolio.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/portfolio/__init__.py
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Project
3 |
4 | admin.site.register(Project)
5 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class PortfolioConfig(AppConfig):
5 | name = 'portfolio'
6 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.0 on 2020-01-23 23:25
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | initial = True
9 |
10 | dependencies = [
11 | ]
12 |
13 | operations = [
14 | migrations.CreateModel(
15 | name='Project',
16 | fields=[
17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18 | ('title', models.CharField(max_length=100)),
19 | ('description', models.CharField(max_length=250)),
20 | ('image', models.ImageField(upload_to='portfolio/images/')),
21 | ('url', models.URLField(blank=True)),
22 | ],
23 | ),
24 | ]
25 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/portfolio/migrations/__init__.py
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 |
3 | class Project(models.Model):
4 | title = models.CharField(max_length=100)
5 | description = models.CharField(max_length=250)
6 | image = models.ImageField(upload_to='portfolio/images/')
7 | url = models.URLField(blank=True)
8 |
9 | def __str__(self):
10 | return self.title
11 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/static/portfolio/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/portfolio/static/portfolio/Logo.png
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/static/portfolio/SquareBlonde.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/portfolio/static/portfolio/SquareBlonde.jpg
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/static/portfolio/custom.css:
--------------------------------------------------------------------------------
1 | .navbar-nav .nav-link {
2 | color: rgba(0,0,0,1) !important;
3 | }
4 |
5 | .navbar-nav .nav-link:hover {
6 | color: rgba(0,0,0,.5) !important;
7 | }
8 |
9 | body {
10 | font-family: 'Lato', sans-serif;
11 | }
12 |
13 | #blogtitle {
14 | font-size: 6rem;
15 | }
16 |
17 | @media (min-width: 992px) {
18 | #hometext {
19 | font-size: 4rem;
20 | }
21 | #blogdetailtitle {
22 | font-size: 5rem;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/static/portfolio/resume.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 5/django3-personal-portfolio-master/portfolio/static/portfolio/resume.pdf
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/templates/portfolio/base.html:
--------------------------------------------------------------------------------
1 | {% load static %}
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Nick Walter
20 |
21 |
22 |
23 |
24 |
25 |
50 |
51 |
52 | {% block content %}{% endblock %}
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/templates/portfolio/home.html:
--------------------------------------------------------------------------------
1 | {% extends "portfolio/base.html" %}
2 |
3 | {% load static %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
Nick Walter is Commander-in-Chief at ZappyCode and lives in Downtown Tokyo 😊
16 |
17 |
18 |
19 | Portfolio
20 |
21 |
22 | {% for project in projects %}
23 |
24 |
25 | {% if project.url %}
26 |
27 |
28 |
29 | {% else %}
30 |
31 |
32 | {% endif %}
33 |
{{ project.title }}
34 |
{{ project.description }}
35 |
36 |
37 | {% endfor %}
38 |
39 |
40 | {% endblock %}
41 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/portfolio/views.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render
2 | from .models import Project
3 |
4 | def home(request):
5 | projects = Project.objects.all()
6 | return render(request, 'portfolio/home.html', {'projects':projects})
7 |
--------------------------------------------------------------------------------
/Section 5/django3-personal-portfolio-master/requirements.txt:
--------------------------------------------------------------------------------
1 | asgiref==3.2.3
2 | Django==3.0.3
3 | Pillow==7.0.0
4 | pytz==2019.3
5 | sqlparse==0.3.0
6 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/db.sqlite3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/db.sqlite3
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Django's command-line utility for administrative tasks."""
3 | import os
4 | import sys
5 |
6 |
7 | def main():
8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todowoo.settings')
9 | try:
10 | from django.core.management import execute_from_command_line
11 | except ImportError as exc:
12 | raise ImportError(
13 | "Couldn't import Django. Are you sure it's installed and "
14 | "available on your PYTHONPATH environment variable? Did you "
15 | "forget to activate a virtual environment?"
16 | ) from exc
17 | execute_from_command_line(sys.argv)
18 |
19 |
20 | if __name__ == '__main__':
21 | main()
22 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/__init__.py
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/__pycache__/admin.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/__pycache__/admin.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/__pycache__/forms.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/__pycache__/forms.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/__pycache__/models.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/__pycache__/models.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/__pycache__/views.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/__pycache__/views.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Todo
3 |
4 | class TodoAdmin(admin.ModelAdmin):
5 | readonly_fields = ('created',)
6 |
7 | admin.site.register(Todo, TodoAdmin)
8 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class TodoConfig(AppConfig):
5 | name = 'todo'
6 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/forms.py:
--------------------------------------------------------------------------------
1 | from django.forms import ModelForm
2 | from .models import Todo
3 |
4 | class TodoForm(ModelForm):
5 | class Meta:
6 | model = Todo
7 | fields = ['title', 'memo', 'important']
8 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.0 on 2020-01-31 01:28
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | initial = True
11 |
12 | dependencies = [
13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14 | ]
15 |
16 | operations = [
17 | migrations.CreateModel(
18 | name='Todo',
19 | fields=[
20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21 | ('title', models.CharField(max_length=100)),
22 | ('memo', models.TextField(blank=True)),
23 | ('created', models.DateTimeField(auto_now_add=True)),
24 | ('datecompleted', models.DateTimeField(null=True)),
25 | ('important', models.BooleanField(default=False)),
26 | ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
27 | ],
28 | ),
29 | ]
30 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/migrations/0002_auto_20200131_0131.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.0 on 2020-01-31 01:31
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('todo', '0001_initial'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='todo',
15 | name='datecompleted',
16 | field=models.DateTimeField(blank=True, null=True),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/migrations/__init__.py
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/migrations/__pycache__/0001_initial.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/migrations/__pycache__/0001_initial.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/migrations/__pycache__/0002_auto_20200131_0131.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/migrations/__pycache__/0002_auto_20200131_0131.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/migrations/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/migrations/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 | from django.contrib.auth.models import User
3 |
4 | class Todo(models.Model):
5 | title = models.CharField(max_length=100)
6 | memo = models.TextField(blank=True)
7 | created = models.DateTimeField(auto_now_add=True)
8 | datecompleted = models.DateTimeField(null=True, blank=True)
9 | important = models.BooleanField(default=False)
10 | user = models.ForeignKey(User, on_delete=models.CASCADE)
11 |
12 | def __str__(self):
13 | return self.title
14 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/static/todo/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todo/static/todo/logo.png
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/templates/todo/base.html:
--------------------------------------------------------------------------------
1 | {% load static %}
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Todo Woo
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | Todo Woo
23 |
24 |
25 |
26 |
27 |
28 | {% if user.is_authenticated %}
29 |
42 | {% endif %}
43 |
44 | {% if user.is_authenticated %}
45 |
46 | Logout
47 |
51 |
52 | {% else %}
53 |
54 | Sign Up
55 |
56 |
57 | Login
58 |
59 | {% endif %}
60 |
61 |
62 |
63 |
64 |
65 |
66 | {% block content %}{% endblock %}
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/templates/todo/completedtodos.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
5 |
6 |
Completed Todos
7 |
8 |
9 |
18 | {% endblock %}
19 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/templates/todo/createtodo.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
9 |
10 |
11 | {% if error %}
12 |
13 | {{ error }}
14 |
15 | {% endif %}
16 |
32 |
33 |
34 | {% endblock %}
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/templates/todo/currenttodos.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
5 |
6 | {% if todos %}
7 |
{{ todos.count }} Current Todo{{ todos.count|pluralize }}
8 | {% else %}
9 | Current Todos
10 | {% endif %}
11 |
12 |
13 |
14 |
15 | {% if todos %}
16 |
21 | {% else %}
22 |
23 |
Looks like you don't have any todos! Nice work.
24 |
25 |
New Todo
26 |
27 | {% endif %}
28 |
29 |
30 | {% endblock %}
31 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/templates/todo/home.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
Simply Your Todos. Woo!
14 |
Life is fun. But life is also busy. There's a million different things you could be doing. But what matters is what you do. We created Todo Woo to help you make sense of all of your opportunities and live that life that matters most to you. Your new organized life awaits.
15 |
Start
16 |
17 |
18 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/templates/todo/loginuser.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
9 |
10 |
11 | {% if error %}
12 |
13 | {{ error }}
14 |
15 | {% endif %}
16 |
17 | {% csrf_token %}
18 |
19 | Username
20 |
21 |
22 |
23 | Password
24 |
25 |
26 | Login
27 |
28 |
29 |
30 | Need an account?
Sign Up here
31 |
32 |
33 |
34 | {% endblock %}
35 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/templates/todo/signupuser.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
9 |
10 |
11 | {% if error %}
12 |
13 | {{ error }}
14 |
15 | {% endif %}
16 |
17 | {% csrf_token %}
18 |
19 | Username
20 |
21 | Your username must be unique. We'll let you know if someone has taken it already.
22 |
23 |
24 | Password
25 |
26 |
27 |
28 | Confirm Password
29 |
30 |
31 | Sign Up
32 |
33 |
34 |
35 | Do you already have an account?
Login here
36 |
37 |
38 |
39 | {% endblock %}
40 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/templates/todo/viewtodo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {% extends "todo/base.html" %}
8 |
9 | {% block content %}
10 |
11 |
12 |
New Todo
13 |
14 |
15 |
16 |
17 | {% if error %}
18 |
19 | {{ error }}
20 |
21 | {% endif %}
22 |
23 | {% csrf_token %}
24 |
25 | Title
26 |
27 |
28 |
29 | Memo
30 | {{ todo.memo }}
31 |
32 |
33 |
34 | Important
35 |
36 | Save
37 | Complete
38 | Delete
39 |
40 |
41 |
42 | {% if todo.datecompleted is None %}
43 |
44 | {% csrf_token %}
45 | Complete
46 |
47 | {% endif %}
48 |
49 | {% csrf_token %}
50 | Delete
51 |
52 | {% endblock %}
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todo/views.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render, redirect, get_object_or_404
2 | from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
3 | from django.contrib.auth.models import User
4 | from django.db import IntegrityError
5 | from django.contrib.auth import login, logout, authenticate
6 | from .forms import TodoForm
7 | from .models import Todo
8 | from django.utils import timezone
9 | from django.contrib.auth.decorators import login_required
10 |
11 | def home(request):
12 | return render(request, 'todo/home.html')
13 |
14 | def signupuser(request):
15 | if request.method == 'GET':
16 | return render(request, 'todo/signupuser.html', {'form':UserCreationForm()})
17 | else:
18 | if request.POST['password1'] == request.POST['password2']:
19 | try:
20 | user = User.objects.create_user(request.POST['username'], password=request.POST['password1'])
21 | user.save()
22 | login(request, user)
23 | return redirect('currenttodos')
24 | except IntegrityError:
25 | return render(request, 'todo/signupuser.html', {'form':UserCreationForm(), 'error':'That username has already been taken. Please choose a new username'})
26 | else:
27 | return render(request, 'todo/signupuser.html', {'form':UserCreationForm(), 'error':'Passwords did not match'})
28 |
29 | def loginuser(request):
30 | if request.method == 'GET':
31 | return render(request, 'todo/loginuser.html', {'form':AuthenticationForm()})
32 | else:
33 | user = authenticate(request, username=request.POST['username'], password=request.POST['password'])
34 | if user is None:
35 | return render(request, 'todo/loginuser.html', {'form':AuthenticationForm(), 'error':'Username and password did not match'})
36 | else:
37 | login(request, user)
38 | return redirect('currenttodos')
39 |
40 | @login_required
41 | def logoutuser(request):
42 | if request.method == 'POST':
43 | logout(request)
44 | return redirect('home')
45 |
46 | @login_required
47 | def createtodo(request):
48 | if request.method == 'GET':
49 | return render(request, 'todo/createtodo.html', {'form':TodoForm()})
50 | else:
51 | try:
52 | form = TodoForm(request.POST)
53 | newtodo = form.save(commit=False)
54 | newtodo.user = request.user
55 | newtodo.save()
56 | return redirect('currenttodos')
57 | except ValueError:
58 | return render(request, 'todo/createtodo.html', {'form':TodoForm(), 'error':'Bad data passed in. Try again.'})
59 |
60 | @login_required
61 | def currenttodos(request):
62 | todos = Todo.objects.filter(user=request.user, datecompleted__isnull=True)
63 | return render(request, 'todo/currenttodos.html', {'todos':todos})
64 |
65 | @login_required
66 | def completedtodos(request):
67 | todos = Todo.objects.filter(user=request.user, datecompleted__isnull=False).order_by('-datecompleted')
68 | return render(request, 'todo/completedtodos.html', {'todos':todos})
69 |
70 | @login_required
71 | def viewtodo(request, todo_pk):
72 | todo = get_object_or_404(Todo, pk=todo_pk, user=request.user)
73 | if request.method == 'GET':
74 | form = TodoForm(instance=todo)
75 | return render(request, 'todo/viewtodo.html', {'todo':todo, 'form':form})
76 | else:
77 | try:
78 | form = TodoForm(request.POST, instance=todo)
79 | form.save()
80 | return redirect('currenttodos')
81 | except ValueError:
82 | return render(request, 'todo/viewtodo.html', {'todo':todo, 'form':form, 'error':'Bad info'})
83 |
84 | @login_required
85 | def completetodo(request, todo_pk):
86 | todo = get_object_or_404(Todo, pk=todo_pk, user=request.user)
87 | if request.method == 'POST':
88 | todo.datecompleted = timezone.now()
89 | todo.save()
90 | return redirect('currenttodos')
91 |
92 | @login_required
93 | def deletetodo(request, todo_pk):
94 | todo = get_object_or_404(Todo, pk=todo_pk, user=request.user)
95 | if request.method == 'POST':
96 | todo.delete()
97 | return redirect('currenttodos')
98 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todowoo/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todowoo/__init__.py
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todowoo/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todowoo/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todowoo/__pycache__/settings.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todowoo/__pycache__/settings.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todowoo/__pycache__/urls.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todowoo/__pycache__/urls.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todowoo/__pycache__/wsgi.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Django-3-Full-Stack-Websites-with-Python-Web-Development/9c9da13cfa1bb0075973fff1bcab5079cd7b98aa/Section 7/django3-todowoo-project-master/todowoo/__pycache__/wsgi.cpython-38.pyc
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todowoo/asgi.py:
--------------------------------------------------------------------------------
1 | """
2 | ASGI config for todowoo project.
3 |
4 | It exposes the ASGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.asgi import get_asgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todowoo.settings')
15 |
16 | application = get_asgi_application()
17 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todowoo/settings.py:
--------------------------------------------------------------------------------
1 | """
2 | Django settings for todowoo project.
3 |
4 | Generated by 'django-admin startproject' using Django 3.0.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/topics/settings/
8 |
9 | For the full list of settings and their values, see
10 | https://docs.djangoproject.com/en/3.0/ref/settings/
11 | """
12 |
13 | import os
14 |
15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 |
18 |
19 | # Quick-start development settings - unsuitable for production
20 | # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
21 |
22 | # SECURITY WARNING: keep the secret key used in production secret!
23 | SECRET_KEY = '_jjhm#&qjqbm_qula%xs2(0&^qwai@2c%au&4z57%g+=-lsbno'
24 |
25 | # SECURITY WARNING: don't run with debug turned on in production!
26 | DEBUG = True
27 |
28 | ALLOWED_HOSTS = []
29 |
30 |
31 | # Application definition
32 |
33 | INSTALLED_APPS = [
34 | 'django.contrib.admin',
35 | 'django.contrib.auth',
36 | 'django.contrib.contenttypes',
37 | 'django.contrib.sessions',
38 | 'django.contrib.messages',
39 | 'django.contrib.staticfiles',
40 | 'todo',
41 | ]
42 |
43 | MIDDLEWARE = [
44 | 'django.middleware.security.SecurityMiddleware',
45 | 'django.contrib.sessions.middleware.SessionMiddleware',
46 | 'django.middleware.common.CommonMiddleware',
47 | 'django.middleware.csrf.CsrfViewMiddleware',
48 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
49 | 'django.contrib.messages.middleware.MessageMiddleware',
50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware',
51 | ]
52 |
53 | ROOT_URLCONF = 'todowoo.urls'
54 |
55 | TEMPLATES = [
56 | {
57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates',
58 | 'DIRS': [],
59 | 'APP_DIRS': True,
60 | 'OPTIONS': {
61 | 'context_processors': [
62 | 'django.template.context_processors.debug',
63 | 'django.template.context_processors.request',
64 | 'django.contrib.auth.context_processors.auth',
65 | 'django.contrib.messages.context_processors.messages',
66 | ],
67 | },
68 | },
69 | ]
70 |
71 | WSGI_APPLICATION = 'todowoo.wsgi.application'
72 |
73 |
74 | # Database
75 | # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
76 |
77 | DATABASES = {
78 | 'default': {
79 | 'ENGINE': 'django.db.backends.sqlite3',
80 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
81 | }
82 | }
83 |
84 |
85 | # Password validation
86 | # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
87 |
88 | AUTH_PASSWORD_VALIDATORS = [
89 | {
90 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
91 | },
92 | {
93 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
94 | },
95 | {
96 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
97 | },
98 | {
99 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
100 | },
101 | ]
102 |
103 |
104 | # Internationalization
105 | # https://docs.djangoproject.com/en/3.0/topics/i18n/
106 |
107 | LANGUAGE_CODE = 'en-us'
108 |
109 | TIME_ZONE = 'UTC'
110 |
111 | USE_I18N = True
112 |
113 | USE_L10N = True
114 |
115 | USE_TZ = True
116 |
117 |
118 | # Static files (CSS, JavaScript, Images)
119 | # https://docs.djangoproject.com/en/3.0/howto/static-files/
120 |
121 | STATIC_URL = '/static/'
122 |
123 | LOGIN_URL = '/login'
124 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todowoo/urls.py:
--------------------------------------------------------------------------------
1 | """todowoo URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/3.0/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: path('', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.urls import include, path
14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15 | """
16 | from django.contrib import admin
17 | from django.urls import path
18 | from todo import views
19 |
20 | urlpatterns = [
21 | path('admin/', admin.site.urls),
22 |
23 | # Auth
24 | path('signup/', views.signupuser, name='signupuser'),
25 | path('login/', views.loginuser, name='loginuser'),
26 | path('logout/', views.logoutuser, name='logoutuser'),
27 |
28 | # Todos
29 | path('', views.home, name='home'),
30 | path('create/', views.createtodo, name='createtodo'),
31 | path('current/', views.currenttodos, name='currenttodos'),
32 | path('completed/', views.completedtodos, name='completedtodos'),
33 | path('todo/', views.viewtodo, name='viewtodo'),
34 | path('todo//complete', views.completetodo, name='completetodo'),
35 | path('todo//delete', views.deletetodo, name='deletetodo'),
36 | ]
37 |
--------------------------------------------------------------------------------
/Section 7/django3-todowoo-project-master/todowoo/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for todowoo project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todowoo.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------