Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3e8762a
initial commit
cdmichaelb Dec 21, 2021
dc68d06
formatting
cdmichaelb Dec 29, 2021
b5373a4
created new apps, up next is customuser
cdmichaelb Dec 30, 2021
2ebd769
some kind of error migrating
cdmichaelb Dec 30, 2021
6a6f8f5
trying to add CustomUser
cdmichaelb Dec 30, 2021
d868354
trying to fix things
cdmichaelb Dec 30, 2021
cc6b270
fixing
cdmichaelb Dec 30, 2021
6dd98cf
gitignore added
cdmichaelb Dec 30, 2021
343bfce
Merge branch 'michael-django-lab01' of https://github.com/PdxCodeGuil…
cdmichaelb Dec 30, 2021
6c4912e
Somehow broke everything so starting over
cdmichaelb Dec 31, 2021
eea167c
Rebuilt project from scratch
cdmichaelb Dec 31, 2021
0fb0836
re-write again, but more content fleshed out
cdmichaelb Jan 3, 2022
dc8ac5d
userforms, js, styling
cdmichaelb Jan 4, 2022
1bbe1a3
fixed so bootstrap actually applies
cdmichaelb Jan 5, 2022
4875272
ending blocks correctly(?)
cdmichaelb Jan 6, 2022
90457d0
include statics
cdmichaelb Jan 7, 2022
6ea3037
planning
cdmichaelb Jan 9, 2022
d1435bd
optimized renders
cdmichaelb Jan 13, 2022
726646e
workin' through covid
cdmichaelb Jan 14, 2022
155543c
Probably going to scrap this but creating a commit
cdmichaelb Jan 15, 2022
d3af072
new path
cdmichaelb Jan 15, 2022
3419f3c
more work on views
cdmichaelb Jan 19, 2022
50839ac
lots of progress want to protect
cdmichaelb Jan 20, 2022
c6b94be
completed
cdmichaelb Mar 6, 2022
b9c5330
made migrations and migrated
perennialAutodidact Mar 7, 2022
59c0a9b
Merge branch 'master' into michael-django-lab01
perennialAutodidact Mar 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Code/Michael/Python/5-palindrome_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ def check_palindrome(list_of_strings)->list:
case unknown_command:
print (f"\nUnknown command '{unknown_command}' Please enter Palindrome or Anagram or Quit.")
valid_command = False


print("\nGoodbye. Thank you for using this program.")
26 changes: 26 additions & 0 deletions Code/Michael/Python/email_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from smtplib import SMTP
from email.message import EmailMessage


def email_alert(to, subject="Alert", body="Alert!"):
msg = EmailMessage()
msg.set_content(body)
msg["Subject"] = subject
msg["To"] = to

user = "mrnotifi@gmail.com"
msg["From"] = user
password = "nixqgstknzqcfqig"
port = int(587)

with SMTP("smtp.gmail.com", port) as server:
server.starttls()
server.login(user, password)

server.send_message(msg)


if __name__ == "__main__":

print("test")
email_alert("broetjem@gmail.com", "hey", "hello world")
152 changes: 152 additions & 0 deletions Code/Michael/django/lab01/lab01project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
8 changes: 8 additions & 0 deletions Code/Michael/django/lab01/lab01project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Personal Assistant

## Install

- pip3 install -r requirements.txt
- python3 manage.py migrate
- Optional: python3 manage.py createsuperuser
- python3 manage.py runserver
Empty file.
7 changes: 7 additions & 0 deletions Code/Michael/django/lab01/lab01project/assistant/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.contrib import admin

# Register your models here.
from .models import *

admin.site.register(Priority)
admin.site.register(TodoItem)
6 changes: 6 additions & 0 deletions Code/Michael/django/lab01/lab01project/assistant/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class AssistantConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "assistant"
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Generated by Django 3.2.10 on 2022-03-06 17:32

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = []

operations = [
migrations.CreateModel(
name="Priority",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"name",
models.CharField(
choices=[
("High", "High"),
("Medium", "Medium"),
("Low", "Low"),
],
default="Medium",
max_length=6,
),
),
],
options={
"ordering": ["-name"],
},
),
migrations.CreateModel(
name="TodoItem",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=250)),
("description", models.TextField()),
("completed", models.DateTimeField(blank=True, null=True)),
],
options={
"ordering": ["-priority"],
},
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Generated by Django 3.2.10 on 2022-03-06 17:32

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
("assistant", "0001_initial"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.AddField(
model_name="todoitem",
name="owner",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL
),
),
migrations.AddField(
model_name="todoitem",
name="priority",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="assistant.priority"
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.10 on 2022-03-06 17:47

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("assistant", "0002_initial"),
]

operations = [
migrations.AlterField(
model_name="priority",
name="name",
field=models.CharField(
choices=[(1, "High"), (2, "Medium"), (3, "Low")],
default=2,
max_length=6,
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.10 on 2022-03-06 17:48

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("assistant", "0003_alter_priority_name"),
]

operations = [
migrations.AlterField(
model_name="priority",
name="name",
field=models.CharField(
choices=[("High", 1), ("Medium", 2), ("Low", 3)],
default="Medium",
max_length=6,
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.10 on 2022-03-06 17:50

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("assistant", "0004_alter_priority_name"),
]

operations = [
migrations.AlterField(
model_name="priority",
name="name",
field=models.CharField(
choices=[(1, "High"), ("Medium", 2), ("Low", 3)],
default="Medium",
max_length=6,
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 3.2.10 on 2022-03-06 17:51

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("assistant", "0005_alter_priority_name"),
]

operations = [
migrations.AlterField(
model_name="priority",
name="name",
field=models.CharField(
choices=[(1, 1), (2, 2), (3, 3)], default="Medium", max_length=6
),
),
]
Loading