Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django blog #350

Open
wants to merge 436 commits into
base: Rafael-DJANGO-BLOG
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
436 commits
Select commit Hold shift + click to select a range
7a306f6
Merge branch 'arek-dj-lab1' into arek-dj-lab2
ArktheTark Jan 5, 2022
ff40614
update, detail and logout urls, views and templates
perennialAutodidact Jan 5, 2022
d17506f
adjusted styling
perennialAutodidact Jan 5, 2022
849eb49
Merge branch 'master' into austen-js-01
perennialAutodidact Jan 5, 2022
1c0d3b4
Merge pull request #291 from PdxCodeGuild/austen-js-01
perennialAutodidact Jan 5, 2022
20bbdf1
Merge branch 'master' into austen-tracker
perennialAutodidact Jan 5, 2022
16b7c01
Merge pull request #292 from PdxCodeGuild/austen-tracker
perennialAutodidact Jan 5, 2022
d8e774b
Merge branch 'master' into austen-flask-01
perennialAutodidact Jan 5, 2022
ee3ec2e
Merge pull request #293 from PdxCodeGuild/austen-flask-01
perennialAutodidact Jan 5, 2022
166409b
Merge branch 'master' into austen-flask-02
perennialAutodidact Jan 5, 2022
34ae5de
Merge pull request #294 from PdxCodeGuild/austen-flask-02
perennialAutodidact Jan 5, 2022
2eeeee2
added django lab2 and Django resources
perennialAutodidact Jan 5, 2022
c94c29d
added hyphen
perennialAutodidact Jan 5, 2022
1b6525f
Merge branch 'master' into lee-django-lab01
perennialAutodidact Jan 5, 2022
af8b7a2
Merge pull request #295 from PdxCodeGuild/lee-django-lab01
perennialAutodidact Jan 5, 2022
1bbe1a3
fixed so bootstrap actually applies
cdmichaelb Jan 5, 2022
478d0c7
fixed 404 error on port 8000
ArktheTark Jan 5, 2022
b27495a
Merge branch 'master' into arek-dj-lab1
perennialAutodidact Jan 5, 2022
2380823
Merge pull request #296 from PdxCodeGuild/arek-dj-lab1
perennialAutodidact Jan 5, 2022
7ac9271
saving changes
ArktheTark Jan 5, 2022
92a76fd
Philip-Django-Lab01_Todo Completed Version 1
philipbartoo Jan 5, 2022
0d5d6bc
Philip-Django-Lab01_Todo Removed Secret Key
philipbartoo Jan 5, 2022
dc4540b
added venv instructions and screenshots
perennialAutodidact Jan 5, 2022
a11dedb
Merge branch 'master' of github.com:PdxCodeGuild/Class_Raven
perennialAutodidact Jan 5, 2022
4caad2d
fixed spacing
perennialAutodidact Jan 5, 2022
432808d
Merge branch 'master' into arek-dj-lab2
ArktheTark Jan 6, 2022
add418e
Merge branch 'master' of https://github.com/PdxCodeGuild/Class_Raven
colburnlee Jan 6, 2022
4875272
ending blocks correctly(?)
cdmichaelb Jan 6, 2022
2601b24
minor adjustment
djhunter67 Jan 6, 2022
1b00982
Merge pull request #300 from PdxCodeGuild/master
austenc-id Jan 6, 2022
c46a8bb
complete django todo lab
austenc-id Jan 6, 2022
453c78b
Foriegn key functionality working
djhunter67 Jan 6, 2022
fa10ffe
added login and register views
james-jhnsn Jan 6, 2022
00c5f34
Merge branch 'master' into james-django-lab02
james-jhnsn Jan 6, 2022
154b80b
project init + home app setup + link to users app
austenc-id Jan 6, 2022
06f5e3f
fixed login view and register view
james-jhnsn Jan 6, 2022
90fa535
saving changes
ArktheTark Jan 6, 2022
8fcc033
pics_app models, create and list views. Display user's pics on detail…
perennialAutodidact Jan 6, 2022
d61cf13
implementing 'completed' status
djhunter67 Jan 6, 2022
ccdcdc7
Merge branch 'master' into james-Django-lab-01
perennialAutodidact Jan 6, 2022
8d4f985
Merge pull request #298 from PdxCodeGuild/james-Django-lab-01
perennialAutodidact Jan 6, 2022
96da053
Django Lab 1 Changes
rxr307 Jan 6, 2022
9887f98
Django Lab 1 Changes
rxr307 Jan 6, 2022
fbf622a
deleted images and added to gitignore
perennialAutodidact Jan 7, 2022
1fc4239
Delete Code/Arek/Django/lab2/blog directory
ArktheTark Jan 7, 2022
c3e5624
Restarted lab2
ArktheTark Jan 7, 2022
ff7ec78
home app fully initialized
austenc-id Jan 7, 2022
62ff829
refined index and created login/reg templates
austenc-id Jan 7, 2022
c96e9cf
update, delete, like views, more conditional rendering, JS for liking…
perennialAutodidact Jan 7, 2022
36fb134
Finished register and login views
ArktheTark Jan 7, 2022
4f0e192
saving change
ArktheTark Jan 7, 2022
0baec96
login/register functional - forms need styling
austenc-id Jan 7, 2022
90457d0
include statics
cdmichaelb Jan 7, 2022
7dab750
Completed, Create, and Delete functional. Still need to fix update T…
djhunter67 Jan 7, 2022
5d248eb
tried out a couple of fixes for success message
austenc-id Jan 7, 2022
620e286
update page rendered but logic broken
djhunter67 Jan 7, 2022
5d5aada
Merge branch 'master' into arek-dj-lab2
ArktheTark Jan 8, 2022
677f758
Merge branch 'master' of https://github.com/PdxCodeGuild/Class_Raven
colburnlee Jan 8, 2022
f97220a
added followers m2m field in User model and connected JS to toggle fo…
perennialAutodidact Jan 8, 2022
d8be21b
Merge branch 'master' into Christerpher_Hunter-DJANGO-LAB_01
djhunter67 Jan 8, 2022
44e23d0
ready to submit pull request
djhunter67 Jan 8, 2022
482135c
fixed link
perennialAutodidact Jan 8, 2022
a2fb851
Just need to filter by user for the profile pages posts
ArktheTark Jan 8, 2022
79a0a59
Philip-Django-Lab01_Todo Updated Jinja in index.html
philipbartoo Jan 8, 2022
c39a5b6
adding blog post functionality
james-jhnsn Jan 8, 2022
c0446d8
Merge branch 'master' into james-Django-lab02
james-jhnsn Jan 8, 2022
7f35570
added db diagram
perennialAutodidact Jan 8, 2022
ec65276
add query for user
ArktheTark Jan 8, 2022
9c9f7df
Saving changes
ArktheTark Jan 8, 2022
3856023
updated tables
perennialAutodidact Jan 9, 2022
6ea3037
planning
cdmichaelb Jan 9, 2022
6ece400
django lab 2 part 2 complete
james-jhnsn Jan 10, 2022
ce9930e
fixed the public boolienfield in my blogpost model
james-jhnsn Jan 10, 2022
ac280a2
added the blog to the post on the profile
james-jhnsn Jan 10, 2022
4e54fee
test to see what the __str__ function is doing
james-jhnsn Jan 10, 2022
ed1677b
updated picster db diagram
perennialAutodidact Jan 10, 2022
68e7a86
updated picster db diagram
perennialAutodidact Jan 10, 2022
65eb361
updated picster db diagram
perennialAutodidact Jan 10, 2022
74c4dbe
added navbar
james-jhnsn Jan 11, 2022
04bd3d5
Merge branch 'master' of https://github.com/PdxCodeGuild/Class_Raven
colburnlee Jan 11, 2022
36a9b51
added requirements.txt
james-jhnsn Jan 11, 2022
ac6764b
django lab_02 init
djhunter67 Jan 11, 2022
51e8eb6
created the user and blog applications
djhunter67 Jan 11, 2022
2734708
Merge branch 'arek-dj-lab2' into arek-dj-lab3
ArktheTark Jan 11, 2022
754271e
created project
james-jhnsn Jan 11, 2022
71a714b
Started Lab3
ArktheTark Jan 11, 2022
8a56ed2
made pokedex models and templates folder
james-jhnsn Jan 11, 2022
00f8136
Linked scss, bulma working urls installed
djhunter67 Jan 11, 2022
0a08737
added static load tag to base.html
ArktheTark Jan 11, 2022
0d962cb
adding lab02 as complete
colburnlee Jan 11, 2022
7eb6869
Worked out Bulma issue
djhunter67 Jan 11, 2022
f23134e
added ecommerce app
perennialAutodidact Jan 11, 2022
6955abe
Rodney Blog Django Project
rxr307 Jan 11, 2022
a93a70e
Merge branch 'master' into austen-django-01
perennialAutodidact Jan 11, 2022
10e6e57
Merge pull request #301 from PdxCodeGuild/austen-django-01
perennialAutodidact Jan 11, 2022
77f5665
Merge branch 'master' into arek-dj-lab2
perennialAutodidact Jan 11, 2022
e303d95
Merge pull request #305 from PdxCodeGuild/arek-dj-lab2
perennialAutodidact Jan 11, 2022
d6a24c2
Merge branch 'master' into arek-dj-lab3
ArktheTark Jan 12, 2022
b973e8b
added all views and blank html templates
djhunter67 Jan 12, 2022
ab5cc1d
Merge branch 'master' into james-django-lab03
james-jhnsn Jan 12, 2022
e4400b7
populated database, added CartItem through table
perennialAutodidact Jan 12, 2022
80eed1a
Merge branch 'master' of github.com:PdxCodeGuild/Class_Raven
perennialAutodidact Jan 12, 2022
d69830f
Merge branch 'master' into Christerpher_Hunter-DJANGO-LAB_01
perennialAutodidact Jan 12, 2022
e3ead72
Merge pull request #302 from PdxCodeGuild/Christerpher_Hunter-DJANGO-…
perennialAutodidact Jan 12, 2022
1fe0d9a
pokemon data is now able to be loaded into the DB
ArktheTark Jan 12, 2022
594d610
added command to load json into db
james-jhnsn Jan 12, 2022
3f1d4e7
changing styling and views
james-jhnsn Jan 12, 2022
89b8c5f
thought I already committed this...
djhunter67 Jan 13, 2022
1facc35
added untracked files
djhunter67 Jan 13, 2022
5d0a8e4
Merge branch 'master' into Christerpher_Hunter-DJANGO-LAB_02
djhunter67 Jan 13, 2022
a3a51c5
Philip-Django-Lab01_Todo Added Priorities
philipbartoo Jan 13, 2022
b922e68
Merge branch 'master' into arek-dj-lab3
ArktheTark Jan 13, 2022
378db6d
update / delete CartItems, querying examples
perennialAutodidact Jan 13, 2022
d1ca358
fixed __icontains lookup
perennialAutodidact Jan 13, 2022
cfb4d23
Merge branch 'master' of github.com:PdxCodeGuild/Class_Raven
perennialAutodidact Jan 13, 2022
44bdef1
Finished required version of Lab3
ArktheTark Jan 13, 2022
62f789a
Philip-Django-Lab02_Blog Complete
philipbartoo Jan 13, 2022
d1435bd
optimized renders
cdmichaelb Jan 13, 2022
7fc020a
fixed templates
james-jhnsn Jan 13, 2022
0f86e92
styling addition to profile page
james-jhnsn Jan 13, 2022
1213bbd
Merge branch 'master' of https://github.com/PdxCodeGuild/Class_Raven
colburnlee Jan 13, 2022
6cc7ede
added cl clone
perennialAutodidact Jan 13, 2022
81f4868
Merge branch 'master' into lee-django-lab02
perennialAutodidact Jan 13, 2022
86dee7d
Merge pull request #307 from PdxCodeGuild/lee-django-lab02
perennialAutodidact Jan 13, 2022
f423a29
Merge branch 'master' into arek-dj-lab3
ArktheTark Jan 14, 2022
f4e270f
minor html changes
djhunter67 Jan 14, 2022
2822975
added search filter form and backend logic
perennialAutodidact Jan 14, 2022
ea44b6b
getting rid of django form classes
james-jhnsn Jan 14, 2022
56934b9
Merge branch 'master' into Rodney_Django_Lab_2
perennialAutodidact Jan 14, 2022
fb53614
Merge pull request #308 from PdxCodeGuild/Rodney_Django_Lab_2
perennialAutodidact Jan 14, 2022
7c58861
registering users is working
djhunter67 Jan 14, 2022
4320b81
redirect and return are broken; re_password is broken
djhunter67 Jan 14, 2022
726646e
workin' through covid
cdmichaelb Jan 14, 2022
fdefb9a
Merge branch 'master' of https://github.com/PdxCodeGuild/Class_Raven
colburnlee Jan 14, 2022
745ccfc
Philip-Django-Lab01_Todo Added .objects.get_or_create to Model
philipbartoo Jan 14, 2022
3d4720c
help with rendering unwanted info on home view
james-jhnsn Jan 14, 2022
bbed811
completed lab02
james-jhnsn Jan 15, 2022
0d67e6b
added pagination
perennialAutodidact Jan 15, 2022
6a31782
cleaned up conditional rendering for pagination
perennialAutodidact Jan 15, 2022
cb5531f
Merge branch 'master' of github.com:PdxCodeGuild/Class_Raven
perennialAutodidact Jan 15, 2022
155543c
Probably going to scrap this but creating a commit
cdmichaelb Jan 15, 2022
c1c2dd1
Working registration and login
djhunter67 Jan 15, 2022
3542393
added JS! it works!
djhunter67 Jan 15, 2022
d3af072
new path
cdmichaelb Jan 15, 2022
aa9fc16
styling changes
james-jhnsn Jan 15, 2022
ac49e4d
Added search bar to html but not in backend yet
ArktheTark Jan 16, 2022
4597abe
Rodney Django Lab 3
rxr307 Jan 16, 2022
cef2065
Philip-Django-Lab03_Pokedex Complete
philipbartoo Jan 16, 2022
8a6a66c
Philip-Python-Lab14_ATM Updated to not allow negative deposits
philipbartoo Jan 16, 2022
6e62ca8
Philip-Django-Lab03_Pokedex Updated Styles Complete
philipbartoo Jan 17, 2022
4294d2b
fixed related name to be more explicit
james-jhnsn Jan 17, 2022
5d1876e
added view, route, template
james-jhnsn Jan 18, 2022
45cd017
Philip-Django-Lab03_Pokedex Made Additional Functionality Improvement…
philipbartoo Jan 18, 2022
ec1f758
updated load_pokemon.py to get types
james-jhnsn Jan 18, 2022
2a3ef53
added vueIntro
perennialAutodidact Jan 19, 2022
04baeb1
added Capstone folder
perennialAutodidact Jan 19, 2022
98466e2
Merge branch 'master' of https://github.com/PdxCodeGuild/Class_Raven
colburnlee Jan 19, 2022
3419f3c
more work on views
cdmichaelb Jan 19, 2022
f09fe68
fixed many to many fields
james-jhnsn Jan 19, 2022
e8566e1
updated dates, labs and added Django resources
perennialAutodidact Jan 19, 2022
515397f
Merge branch 'master' of github.com:PdxCodeGuild/Class_Raven
perennialAutodidact Jan 19, 2022
6e0c967
increased font size
perennialAutodidact Jan 19, 2022
c675235
updated link text
perennialAutodidact Jan 19, 2022
8f0a74e
Merge branch 'master' into Philip-Django-Lab01_Todo
perennialAutodidact Jan 19, 2022
4c45d7b
Merge pull request #311 from PdxCodeGuild/Philip-Django-Lab01_Todo
perennialAutodidact Jan 19, 2022
26d881e
Merge branch 'master' into Philip-Django-Lab02_Blog
perennialAutodidact Jan 19, 2022
cac3403
Merge pull request #310 from PdxCodeGuild/Philip-Django-Lab02_Blog
perennialAutodidact Jan 19, 2022
fcaf2c8
Merge branch 'master' of https://github.com/PdxCodeGuild/Class_Raven
colburnlee Jan 19, 2022
5f72252
adding lab 3
colburnlee Jan 19, 2022
50839ac
lots of progress want to protect
cdmichaelb Jan 20, 2022
7bd9987
requirements fulfilled; minimum viable project achieved!
djhunter67 Jan 20, 2022
9b05753
added drf_vue_todo_app frontend
perennialAutodidact Jan 20, 2022
2e1d982
Merge branch 'master' of github.com:PdxCodeGuild/Class_Raven
perennialAutodidact Jan 20, 2022
affc7c8
Merge branch 'master' into Rodney_Django_Lab_3
perennialAutodidact Jan 20, 2022
3616a56
Merge pull request #312 from PdxCodeGuild/Rodney_Django_Lab_3
perennialAutodidact Jan 20, 2022
b980317
Merge branch 'master' into Philip-Django-Lab03_Pokedex
perennialAutodidact Jan 20, 2022
da18460
Merge pull request #313 from PdxCodeGuild/Philip-Django-Lab03_Pokedex
perennialAutodidact Jan 20, 2022
6c20475
Merge branch 'master' into Philip-Python-Lab14_ATM
perennialAutodidact Jan 20, 2022
9ef7aac
Merge pull request #314 from PdxCodeGuild/Philip-Python-Lab14_ATM
perennialAutodidact Jan 20, 2022
0d13673
Merge branch 'master' into arek-dj-lab3
perennialAutodidact Jan 20, 2022
ecd17b2
Merge pull request #320 from PdxCodeGuild/arek-dj-lab3
perennialAutodidact Jan 20, 2022
f54cd26
lab19 finished
james-jhnsn Jan 20, 2022
a035e47
Philip-JavaScript-Lab04_Todo Complete
philipbartoo Jan 21, 2022
6606f1f
added DRF and rendered Vue app within Django
perennialAutodidact Jan 21, 2022
6a6cb45
Merge branch 'master' of github.com:PdxCodeGuild/Class_Raven
perennialAutodidact Jan 21, 2022
ed59764
Merge branch 'master' into james-django-lab03
perennialAutodidact Jan 21, 2022
8fca74a
Merge pull request #321 from PdxCodeGuild/james-django-lab03
perennialAutodidact Jan 21, 2022
89d2244
Merge branch 'master' into lee-django-lab03-pokedex
perennialAutodidact Jan 22, 2022
5a5cfc5
Merge pull request #322 from PdxCodeGuild/lee-django-lab03-pokedex
perennialAutodidact Jan 22, 2022
6637d54
Merge branch 'master' into Rodney_Django_Lab1
perennialAutodidact Jan 24, 2022
33f076b
Merge pull request #324 from PdxCodeGuild/Rodney_Django_Lab1
perennialAutodidact Jan 24, 2022
37afff5
Merge branch 'master' into Rodney_HTML_Lab_3_4_5
perennialAutodidact Jan 24, 2022
0c8d11a
Merge pull request #325 from PdxCodeGuild/Rodney_HTML_Lab_3_4_5
perennialAutodidact Jan 24, 2022
0c10e1a
Merge branch 'master' into Christerpher_Hunter-DJANGO-LAB_02
perennialAutodidact Jan 24, 2022
1901a9e
Merge pull request #326 from PdxCodeGuild/Christerpher_Hunter-DJANGO-…
perennialAutodidact Jan 24, 2022
b8bda5d
Merge branch 'master' into james-django-lab02
perennialAutodidact Jan 25, 2022
e590d41
Merge pull request #329 from PdxCodeGuild/james-django-lab02
perennialAutodidact Jan 25, 2022
3711c64
Merge branch 'master' into Philip-JavaScript-Lab04-Todo
perennialAutodidact Jan 25, 2022
435d47f
Merge pull request #328 from PdxCodeGuild/Philip-JavaScript-Lab04-Todo
perennialAutodidact Jan 25, 2022
9990f30
Merge branch 'master' into james-python-lab19
perennialAutodidact Jan 25, 2022
c391523
Merge pull request #327 from PdxCodeGuild/james-python-lab19
perennialAutodidact Jan 25, 2022
b6befe3
added Vue To Do App
perennialAutodidact Jan 27, 2022
fd6c5d5
Merge branch 'master' of github.com:PdxCodeGuild/Class_Raven
perennialAutodidact Jan 27, 2022
c3f2888
added django_polls_drf_vue
perennialAutodidact Jan 28, 2022
3c8db62
deleted unnecessary files
perennialAutodidact Jan 28, 2022
d85fef8
added form handling with vue to create new polls
perennialAutodidact Jan 29, 2022
00c357e
added user profile signals demo
perennialAutodidact Feb 3, 2022
8a85430
hooked up signals
perennialAutodidact Feb 4, 2022
e75d9ba
added messages api
perennialAutodidact Feb 10, 2022
55d1cdf
added n_plus_one project
perennialAutodidact Feb 15, 2022
69e7ec6
added docs for select_related / prefetch_related
perennialAutodidact Feb 15, 2022
8d08f89
configure for heroku
perennialAutodidact Feb 18, 2022
f5a8e19
initialized project and fleshed out USERS app
austenc-id Feb 25, 2022
870e649
Register error messages display.
austenc-id Feb 27, 2022
0b66e03
Defined queryString variable to button1's click event so now when the…
ArktheTark Mar 3, 2022
bef8ea8
Redid bubble sort to match psuedo code
ArktheTark Mar 3, 2022
a73ec45
finished requirements
austenc-id Mar 5, 2022
c6b94be
completed
cdmichaelb Mar 6, 2022
631e8fe
Merge branch 'master' into arek-js-lab5
perennialAutodidact Mar 7, 2022
7da428e
Merge pull request #331 from PdxCodeGuild/arek-js-lab5
perennialAutodidact Mar 7, 2022
310222c
Merge branch 'master' into arek-python-lab16
perennialAutodidact Mar 7, 2022
6eb8182
Merge pull request #332 from PdxCodeGuild/arek-python-lab16
perennialAutodidact Mar 7, 2022
a706a69
Merge branch 'austen-django-02' of github.com:PdxCodeGuild/Class_Rave…
perennialAutodidact Mar 7, 2022
00edd8d
Merge branch 'master' into austen-django-02
perennialAutodidact Mar 7, 2022
f484971
Merge pull request #333 from PdxCodeGuild/austen-django-02
perennialAutodidact Mar 7, 2022
b9c5330
made migrations and migrated
perennialAutodidact Mar 7, 2022
59c0a9b
Merge branch 'master' into michael-django-lab01
perennialAutodidact Mar 7, 2022
ff78bdd
Merge pull request #334 from PdxCodeGuild/michael-django-lab01
perennialAutodidact Mar 7, 2022
a5f0b29
html corrections
Mar 10, 2022
9d40086
java lab4
Mar 10, 2022
e301d0e
Javascript lab 5
Mar 10, 2022
649f5e5
Django lab 1
Mar 10, 2022
c116571
Django lab 2
Mar 11, 2022
ab82a95
Django lab 3
Mar 11, 2022
21d007d
Merge pull request #337 from PdxCodeGuild/jose_html_lab03
perennialAutodidact Mar 11, 2022
03eed15
Merge branch 'master' into jose_javascript_lab04
perennialAutodidact Mar 11, 2022
eb07023
Merge pull request #338 from PdxCodeGuild/jose_javascript_lab04
perennialAutodidact Mar 11, 2022
6db60c6
Merge branch 'master' into jose_javascript_lab05
perennialAutodidact Mar 11, 2022
0b39357
Merge pull request #339 from PdxCodeGuild/jose_javascript_lab05
perennialAutodidact Mar 11, 2022
05a116b
Merge branch 'master' into jose_django_lab01
perennialAutodidact Mar 11, 2022
8a978e3
Merge pull request #340 from PdxCodeGuild/jose_django_lab01
perennialAutodidact Mar 11, 2022
9e395e3
Merge branch 'master' into jose_django_lab02
perennialAutodidact Mar 11, 2022
dd009e9
Merge pull request #341 from PdxCodeGuild/jose_django_lab02
perennialAutodidact Mar 11, 2022
2ecff27
Merge branch 'master' into jose_django_lab03
perennialAutodidact Mar 11, 2022
0bf1e71
Merge pull request #342 from PdxCodeGuild/jose_django_lab03
perennialAutodidact Mar 11, 2022
55b99d2
python lab 17 complete
Arty-Guy Mar 12, 2022
581a2ac
Merge branch 'master' of https://github.com/PdxCodeGuild/Class_Raven
Arty-Guy Mar 12, 2022
fbe8dac
Merge pull request #345 from PdxCodeGuild/richard-python-lab-17
perennialAutodidact Mar 12, 2022
c2f5605
Merge branch 'master' into richard-django-lab-01
perennialAutodidact Mar 12, 2022
8031c71
Merge pull request #343 from PdxCodeGuild/richard-django-lab-01
perennialAutodidact Mar 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Code/Theo/quote_login.py
Code/josh/labs/API_lab/.env
env
secrets.*

images/


Code/Theo/django/blog/db.sqlite3
Expand All @@ -20,7 +20,8 @@ Code/Theo/django/blog/db.sqlite3
*.pot
*.pyc
__pycache__
db.sqlite3
*db.sqlite3

media
uploads/

Expand Down Expand Up @@ -134,3 +135,4 @@ GitHub.sublime-settings
.history

.vscode/settings.json
Code/Austen/js-05/scripts/secrets.js
139 changes: 139 additions & 0 deletions 3 JavaScript/demo/quoteAPISolution/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
@import url("https://fonts.googleapis.com/css2?family=Questrial&family=Varela+Round&display=swap");

* {
font-family: "Questrial", sans-serif;
}

h1,
blockquote {
font-family: "Varela Round", sans-serif;
}

h1 {
font-size: 3rem;
}
html,
body,
blockquote {
margin: 0;
padding: 0;
}

.container {
background-color: burlywood;
min-height: 100vh;
width: 100%;

padding-top: 100px;

display: flex;
flex-direction: column;
align-items: center;

position: relative;
}

form {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
width: 100%;
}
#search-query-input {
width: 70vw;
padding: 15px;
margin: 25px;
border: none;
border-radius: 100px;

font-size: 1.5rem;
}

#search-query-input:focus {
outline: 2px solid teal;
}

.button-icon {
font-size: 3rem;
transition: all 0.3s ease-in-out;
}

.button-icon:hover {
cursor: pointer;
color: teal;
}

#page-controls {
display: flex;
flex-direction: column;
align-items: center;
width: 60vw;
}

#page-change-arrows {
display: flex;
align-items: center;
justify-content: space-around;
margin: 20px;
width: 60vw;
}

#current-page-number {
font-size: 2rem;
}

#quotes {
display: flex;
flex-direction: column;
align-items: center;
}

blockquote {
background-color: rgba(165, 60, 60);
border-radius: 10px;
padding: 30px;
margin: 30px 0px;
max-width: 80%;

font-size: 2rem;
}

blockquote cite {
font-size: 1.5rem;
float: right;
margin-top: 20px;
}

@media screen and (min-width: 768px) {
#search-query {
width: 40vw;
}

#page-change-arrows {
width: 20vw;
}
}

.spinner {
animation: spin 2s infinite linear;
color:rgba(165, 42, 42, 0.8)
}

@keyframes spin {
0% {
transform: rotate(0deg)
}
25% {
transform: rotate(90deg)
}
50% {
transform: rotate(180deg)
}
75% {
transform: rotate(279deg)
}
100% {
transform: rotate(360deg)
}
}
48 changes: 48 additions & 0 deletions 3 JavaScript/demo/quoteAPISolution/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./index.css" />

<!-- AXIOS -->
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>

<!-- FONT AWESOME -->
<script
src="https://kit.fontawesome.com/7e23fc28a2.js"
crossorigin="anonymous"
></script>

<title>Says Who?</title>
</head>
<body>
<section class="container">
<h1>Says Who?</h1>
<form>
<input type="text" id="search-query-input" />
<i class="fas fa-search button-icon" id="search-button"></i>
</form>
<div id="page-controls">
<div id="page-change-arrows">
<i
class="fas fa-arrow-circle-left button-icon"
id="previous-page-arrow"
></i>
<i
class="fas fa-arrow-circle-right button-icon"
id="next-page-arrow"
></i>
</div>
<div id="current-page-number" title="Current Page">1</div>
</div>
<div id="quotes">
<!-- render quotes with JS -->
</div>
</section>

<script src="secrets.js"></script>
<script src="quoteAPI.js"></script>
</body>
</html>
169 changes: 169 additions & 0 deletions 3 JavaScript/demo/quoteAPISolution/quoteAPI.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
let quoteContainer = document.querySelector('#quotes'),
pageChangeArrows = document.querySelector('#page-change-arrows'),
searchButton = document.querySelector('#search-button'),
searchQueryInput = document.querySelector('#search-query-input'),
pageControls = document.querySelector('#page-controls'),
previousPageArrow = document.querySelector('#previous-page-arrow'),
nextPageArrow = document.querySelector('#next-page-arrow'),
currentPageNumber = document.querySelector('#current-page-number')

// global state variables,
// these are manipulated at a global level
// because they are used in various places
let currentPage = 1
let searchQuery = ''

// Fetch the quote of the day from FAVQs api and render it on the page
function fetchQuoteOfTheDay () {
let url = 'https://favqs.com/api/qotd'
// let quotes = []

// create an object for HTTP headers
const headers = {
'Content-Type': 'application/json'
}

// axios.get(url, configObject)
axios
.get(url, { headers: headers })
.then(response => {
quote = response.data.quote
renderQuotes([quote])
renderPageArrows([quote])
})
.catch(error => console.log(error))
}

// search for the filterQuery
function fetchQuotes (pageNumber = 1, filterQuery = '') {
let url = 'https://favqs.com/api/quotes'
let quotes, isLastPage

// create an object for HTTP headers
const headers = {
'Content-Type': 'application/json',
Authorization: `Token token=${FAVQ_API_KEY}`
}

// create an object for the URL query parameters
const params = {
page: pageNumber,
filter: filterQuery
}

// axios.get(url, configObject)
axios
.get(url, {
headers: headers,
params: params
})
.then(response => {
// pull the data out of the HTTP response
quotes = response.data.quotes
currentPage = response.data.page
isLastPage = response.data.last_page

//
renderQuotes(quotes)
renderPageArrows(quotes, pageNumber, isLastPage)
})
.catch(error => console.log(error))
}

// render the page navigation arrows based on the currentPage and
function renderPageArrows (quotes, pageNumber, isLastPage) {
// hide the arrows unless there is more than one quote
if (quotes.length < 2) {
pageControls.style.display = 'none'
} else {
pageControls.style.display = 'flex'

// hide the left arrow if we're on the first page
if (pageNumber === 1) {
previousPageArrow.style.display = 'none'
} else {
previousPageArrow.style.display = 'block'
}

// hide the right arrow if we're on the last page
if (isLastPage) {
nextPageArrow.style.display = 'none'
} else {
nextPageArrow.style.display = 'block'
}
}

currentPageNumber.innerHTML = currentPage
}

function renderQuotes (quotes) {
let quote, blockquote, cite
quoteContainer.innerHTML = ''

if (quotes[0].body.toLowerCase() === 'no quotes found') {
quoteContainer.innerHTML = `<h1>No quotes found</h1>`
} else {
for (quote of quotes) {
blockquote = document.createElement('blockquote')
cite = document.createElement('cite')

blockquote.classList.add('quote')

blockquote.innerHTML = quote.body + '<br/>'

cite.innerHTML = `- ${quote.author}`
blockquote.appendChild(cite)

quoteContainer.appendChild(blockquote)
}
}
}

// when the searchButton is clicked,
searchButton.addEventListener('click', function () {
// set the searchQuery to the current value of the searchQueryInput,
// reset the currentPage to 1
searchQuery = searchQueryInput.value
currentPage = 1

// set loading message
quoteContainer.innerHTML =
'<h1><i class="fas fa-stroopwafel spinner"></i></h1>'

// call the API with the new currentPage
// number and previous searchQuery
fetchQuotes(currentPage, searchQuery)
})

function handlePageChange (direction) {
// set loading message
quoteContainer.innerHTML =
'<h1><i class="fas fa-stroopwafel spinner"></i></h1>'

// change the currentPage based on the direction
if (direction === 'previous') {
currentPage--
} else if (direction === 'next') {
currentPage++
}

// call the API with the new currentPage
// number and previous searchQuery
fetchQuotes(currentPage, searchQuery)
}

// handlePageChange could also be defined like this
// using a ternary if/else operation and an arrow function:
// const handlePageChange = direction =>
// fetchQuotes(direction === 'next' ? currentPage++ : currentPage--, searchQuery)

// when the previousPageArrow is clicked,
// call handlePageChange to decrease page number
previousPageArrow.addEventListener('click', () => handlePageChange('previous'))

// when the nextPageArrow is clicked,
// call handlePageChange to increase page number
nextPageArrow.addEventListener('click', () => handlePageChange('next'))

// load the initial quote
fetchQuoteOfTheDay()
5 changes: 5 additions & 0 deletions 3 JavaScript/demo/vueIntro/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap');

* {
font-family: 'Montserrat', sans-serif;
}
Loading