From 1f25942622b5f235e51fa02b30e0a63039d6222c Mon Sep 17 00:00:00 2001 From: BrendonKootz Date: Tue, 12 Feb 2019 20:23:03 -0600 Subject: [PATCH 01/12] Initial PR | Cloned front-end-project --- lambda_notes/.gitignore | 23 + lambda_notes/README.md | 44 + lambda_notes/package.json | 33 + lambda_notes/public/favicon.ico | Bin 0 -> 3870 bytes lambda_notes/public/index.html | 40 + lambda_notes/public/manifest.json | 15 + lambda_notes/src/Actions/index.js | 70 + lambda_notes/src/App.css | 22 + lambda_notes/src/App.js | 38 + lambda_notes/src/App.test.js | 9 + lambda_notes/src/Components/CreateNote.js | 70 + lambda_notes/src/Components/DeleteNote.js | 28 + lambda_notes/src/Components/EditNote.js | 63 + lambda_notes/src/Components/Note.js | 48 + lambda_notes/src/Components/Notes.js | 59 + .../src/Components/Views/CreateNoteView.js | 32 + .../src/Components/Views/EditNoteView.js | 61 + .../src/Components/Views/NavigationBar.js | 48 + lambda_notes/src/Components/Views/NoteView.js | 41 + .../src/Components/Views/NotesView.js | 25 + lambda_notes/src/Components/Views/style.css | 0 lambda_notes/src/Components/style.css | 53 + lambda_notes/src/Notes/Note.js | 14 + lambda_notes/src/Notes/Notes.js | 18 + lambda_notes/src/Reducers/index.js | 44 + lambda_notes/src/index.css | 14 + lambda_notes/src/index.js | 19 + lambda_notes/src/serviceWorker.js | 135 + lambda_notes/yarn.lock | 10498 ++++++++++++++++ 29 files changed, 11564 insertions(+) create mode 100644 lambda_notes/.gitignore create mode 100644 lambda_notes/README.md create mode 100644 lambda_notes/package.json create mode 100644 lambda_notes/public/favicon.ico create mode 100644 lambda_notes/public/index.html create mode 100644 lambda_notes/public/manifest.json create mode 100644 lambda_notes/src/Actions/index.js create mode 100644 lambda_notes/src/App.css create mode 100644 lambda_notes/src/App.js create mode 100644 lambda_notes/src/App.test.js create mode 100644 lambda_notes/src/Components/CreateNote.js create mode 100644 lambda_notes/src/Components/DeleteNote.js create mode 100644 lambda_notes/src/Components/EditNote.js create mode 100644 lambda_notes/src/Components/Note.js create mode 100644 lambda_notes/src/Components/Notes.js create mode 100644 lambda_notes/src/Components/Views/CreateNoteView.js create mode 100644 lambda_notes/src/Components/Views/EditNoteView.js create mode 100644 lambda_notes/src/Components/Views/NavigationBar.js create mode 100644 lambda_notes/src/Components/Views/NoteView.js create mode 100644 lambda_notes/src/Components/Views/NotesView.js create mode 100644 lambda_notes/src/Components/Views/style.css create mode 100644 lambda_notes/src/Components/style.css create mode 100644 lambda_notes/src/Notes/Note.js create mode 100644 lambda_notes/src/Notes/Notes.js create mode 100644 lambda_notes/src/Reducers/index.js create mode 100644 lambda_notes/src/index.css create mode 100644 lambda_notes/src/index.js create mode 100644 lambda_notes/src/serviceWorker.js create mode 100644 lambda_notes/yarn.lock diff --git a/lambda_notes/.gitignore b/lambda_notes/.gitignore new file mode 100644 index 0000000000..4d29575de8 --- /dev/null +++ b/lambda_notes/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/lambda_notes/README.md b/lambda_notes/README.md new file mode 100644 index 0000000000..897dc83660 --- /dev/null +++ b/lambda_notes/README.md @@ -0,0 +1,44 @@ +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.
+You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.
+It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.
+Your app is ready to be deployed! + +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Learn More + +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). + +To learn React, check out the [React documentation](https://reactjs.org/). diff --git a/lambda_notes/package.json b/lambda_notes/package.json new file mode 100644 index 0000000000..c9a6340548 --- /dev/null +++ b/lambda_notes/package.json @@ -0,0 +1,33 @@ +{ + "name": "front-end-project", + "version": "0.1.0", + "private": true, + "dependencies": { + "axios": "^0.18.0", + "react": "^16.6.3", + "react-dom": "^16.6.3", + "react-redux": "^5.1.1", + "react-router": "^4.3.1", + "react-router-dom": "^4.3.1", + "react-scripts": "^2.1.5", + "redux": "^4.0.1", + "redux-logger": "^3.0.6", + "redux-thunk": "^2.3.0", + "styled-components": "^4.1.1" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": "react-app" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/lambda_notes/public/favicon.ico b/lambda_notes/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT binary patch literal 3870 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 baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 0 HcmV?d00001 diff --git a/lambda_notes/public/index.html b/lambda_notes/public/index.html new file mode 100644 index 0000000000..4bfce95684 --- /dev/null +++ b/lambda_notes/public/index.html @@ -0,0 +1,40 @@ + + + + + + + + + + + React App + + + +
+ + + diff --git a/lambda_notes/public/manifest.json b/lambda_notes/public/manifest.json new file mode 100644 index 0000000000..1f2f141faf --- /dev/null +++ b/lambda_notes/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/lambda_notes/src/Actions/index.js b/lambda_notes/src/Actions/index.js new file mode 100644 index 0000000000..a5a0a20385 --- /dev/null +++ b/lambda_notes/src/Actions/index.js @@ -0,0 +1,70 @@ +import axios from 'axios'; +export const GETTING = 'GETTING'; +export const GET = 'GET'; +export const ADDING = 'ADDING'; +export const ADDED = 'ADDED'; +export const EDITING = 'EDITING'; +export const EDITED = 'EDITED'; +export const DELETING = 'DELETING'; +export const DELETED = 'DELETED'; +export const ERROR = 'ERROR'; + +export const getNotes = () => { + return ( + dispatch => { + dispatch({ type: GETTING }); + axios.get(`https://fe-notes.herokuapp.com/note/get/all`) + .then(response => { + dispatch({ type: GET, payload: response.data }); + }) + .catch(err => { + dispatch({ type: ERROR, payload: err }); + }) + } + ); +}; + +export const addNote = note => { + return ( + dispatch => { + dispatch({ type: ADDING }); + axios.post(`https://fe-notes.herokuapp.com/note/create`, note) + .then(response => { + dispatch({ type: ADDED, payload: response.data }); + }) + .catch(err => { + dispatch({ type: ERROR, payload: err }); + }) + } + ); +} + +export const editNote = (id, note) => { + return ( + dispatch => { + dispatch({ type: EDITING }); + axios.put(`https://fe-notes.herokuapp.com/note/edit/${id}`, note) + .then(response => { + dispatch({ type: EDITED, payload: { id, ...response.data } }); + }) + .catch(err => { + dispatch({ type: ERROR, payload: err }); + }) + } + ); +} + +export const deleteNote = id => { + return ( + dispatch => { + dispatch({ type: DELETING }); + axios.delete(`https://fe-notes.herokuapp.com/note/delete/${id}`) + .then(response => { + dispatch({ type: DELETED, payload: response.data }); + }) + .catch(err => { + dispatch({ type: ERROR, payload: err }); + }) + } + ); +} diff --git a/lambda_notes/src/App.css b/lambda_notes/src/App.css new file mode 100644 index 0000000000..f1326aa56e --- /dev/null +++ b/lambda_notes/src/App.css @@ -0,0 +1,22 @@ +.container { + width: 100%; + max-height: 100%; + display: flex; + justify-content: flex-start; + +} + +.content { + width: 65%; + max-height: 100%; + margin-left: 32%; + background-color: #F2F1F2; + +} + +.wrapper { + margin: 38px 2%; + min-height: 100%; + max-height: 100%; + +} diff --git a/lambda_notes/src/App.js b/lambda_notes/src/App.js new file mode 100644 index 0000000000..ed54d44696 --- /dev/null +++ b/lambda_notes/src/App.js @@ -0,0 +1,38 @@ +import React, { Component } from 'react'; +import { Route } from 'react-router-dom'; +import './App.css'; +import NavigationBar from './Components/Views/NavigationBar'; +import NoteView from './Components/Views/NoteView'; +import NotesView from './Components/Views/NotesView'; +import CreateNoteView from './Components/Views/CreateNoteView'; +import EditNoteView from './Components/Views/EditNoteView'; + +class App extends Component { + render() { + return ( + +
+ + + +
+ +
+ + + + + + +
+ +
+ +
+ + ); + } +} + + +export default App; diff --git a/lambda_notes/src/App.test.js b/lambda_notes/src/App.test.js new file mode 100644 index 0000000000..a754b201bf --- /dev/null +++ b/lambda_notes/src/App.test.js @@ -0,0 +1,9 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import App from './App'; + +it('renders without crashing', () => { + const div = document.createElement('div'); + ReactDOM.render(, div); + ReactDOM.unmountComponentAtNode(div); +}); diff --git a/lambda_notes/src/Components/CreateNote.js b/lambda_notes/src/Components/CreateNote.js new file mode 100644 index 0000000000..952d07c8da --- /dev/null +++ b/lambda_notes/src/Components/CreateNote.js @@ -0,0 +1,70 @@ +import React from 'react'; +import styled from 'styled-components'; + +const Container = styled.div` + h2 { + margin-bottom: 20px; + font-weight: bold; + font-size: 30px; + }`; + +const Form = styled.form` + + input, textarea { + margin-bottom: 20px; + border: 1px solid #B7B5B7; + border-radius: 3px; + font-size: 16px; + padding: 15px 10px; + } + + input { + width: 50%; + height: 40px; + } + + textarea { + width: 100%; + height: 500px; + }`; + +const Button = styled.button` + width: 30%; + color: white; + padding: 15px 0; + margin: 10px 0; + background-color: #33CAFF; + font-size: 1.6rem; + a { + color: #FFF; + }`; + +const CreateNote = props => { + return ( + +

Create New Note:

+
+ + + + +
+ +
+ {% endif %} +
    + {% for entry in entrie %} +
  • {{ entry.title }}

    {{ entry.text|safe }}
  • + {% else %} +
  • No Notes!!!
  • + {% endfor %} +
+{% endblock %} From e4d6cd0fa108911e618dc7fee281e43aab8e2ded Mon Sep 17 00:00:00 2001 From: BrendonKootz Date: Sat, 16 Feb 2019 14:56:11 -0600 Subject: [PATCH 06/12] built login.html --- .../flaskr/flaskr/templates/.login.html.swp | Bin 0 -> 12288 bytes .../flaskr/flaskr/templates/login.html | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 back-end-python-week/flaskr/flaskr/templates/.login.html.swp create mode 100644 back-end-python-week/flaskr/flaskr/templates/login.html diff --git a/back-end-python-week/flaskr/flaskr/templates/.login.html.swp b/back-end-python-week/flaskr/flaskr/templates/.login.html.swp new file mode 100644 index 0000000000000000000000000000000000000000..98c5de5fcf863d54b82a0f28cffd1b9bfabb3ac3 GIT binary patch literal 12288 zcmeI&Pm9w)7zXfJ!9x%JLGeCjS=I%!>8=Q6NpcWHgbH5PlOU63n#LxXFf-Y-^&C22~c$PkahndX0GiiR%L+K>_*Dqf3!G537b(^uD^U0fo zdqei?31em^GB^CM%hmZqS*a7{KY!f!2kmB;SG{+IL9JD$MOo%m78IgPQV}F#H1%bb z`ZV`Wj;ueEa(ZEOVJE6u4~`3AraI^vE6chNR+^wtSzhf=Y*}1>E=C}*@dAw<`-2W&zSXr`f3@8$8VEoD z0uX=z1Rwwb2tWV=5P$##{zCzgGPZYH%0tR^$|==< zr+lS+p?s!%qPTq;3N8ph00Izz00bZa0SG_<0uX=zW6K>*$Gww6jiwj-d}qaaVK7#@ zj9HI*Y2n&ln5J=|vXc_m62o!@n(Hh$Gj zA6@kbE9Z8-t}#-(4gRbFLg`@~#~Y_6)vTP}H{i?=lPV7EP%zPra)E033w zjLogin + {% if error %}

Error:{{ error}}{% endif %} +

+
+
Username: +
+
Password: +
+
+
+
+{% endblock %} + From d3d6d72f4eb54d49c5d033a6f48685f6ca69aad8 Mon Sep 17 00:00:00 2001 From: BrendonKootz Date: Sat, 16 Feb 2019 15:04:49 -0600 Subject: [PATCH 07/12] Added CSS --- .../.login.html.swp => static/.style.css.swp} | Bin 12288 -> 12288 bytes .../flaskr/flaskr/static/style.css | 20 ++++++++++++++++++ 2 files changed, 20 insertions(+) rename back-end-python-week/flaskr/flaskr/{templates/.login.html.swp => static/.style.css.swp} (90%) create mode 100644 back-end-python-week/flaskr/flaskr/static/style.css diff --git a/back-end-python-week/flaskr/flaskr/templates/.login.html.swp b/back-end-python-week/flaskr/flaskr/static/.style.css.swp similarity index 90% rename from back-end-python-week/flaskr/flaskr/templates/.login.html.swp rename to back-end-python-week/flaskr/flaskr/static/.style.css.swp index 98c5de5fcf863d54b82a0f28cffd1b9bfabb3ac3..a310707b0b6107c97a317730ea681d4c9af292bc 100644 GIT binary patch literal 12288 zcmeI2y>b&V5XTid&k$hvszuyJ=dW>M&d`!!CQy-7G`f@SgWO3Tof5|ZL%}o9@e=SJ z6rtxOcmRf#a+jQOK^<6o{-Zg0_rJTpI~N`+>K{ITK_@|viLgwZ6m!2_OL^fCP{L5A{=2Ym)D zKnI|Qpr7FJ74#AG3N!-U0D13g$Ocgi(Jqy=W!&5E+BBH zle0C)SjzFU@tULeE4fK?#UgF3F2UAST5X3X@b>Pdv|RBMXxPeA%XpEeDx@Y)Gdrb; zR+d%ynRE?LoK0(h5nPi124YHENksu3K4C6hb_in?!q;eGnt;afv2V-|f7R?2gE)?T zy0fonk<)Al4)t(_OrQkwvjLSd!nae>h

8=Q6NpcWHgbH5PlOU63n#LxXFf-Y-^&C22~c$PkahndX0GiiR%L+K>_*Dqf3!G537b(^uD^U0fo zdqei?31em^GB^CM%hmZqS*a7{KY!f!2kmB;SG{+IL9JD$MOo%m78IgPQV}F#H1%bb z`ZV`Wj;ueEa(ZEOVJE6u4~`3AraI^vE6chNR+^wtSzhf=Y*}1>E=C}*@dAw<`-2W&zSXr`f3@8$8VEoD z0uX=z1Rwwb2tWV=5P$##{zCzgGPZYH%0tR^$|==< zr+lS+p?s!%qPTq;3N8ph00Izz00bZa0SG_<0uX=zW6K>*$Gww6jiwj-d}qaaVK7#@ zj9HI*Y2n&ln5J=|vXc_m62o!@n(Hh$Gj zA6@kbE9Z8-t}#-(4gRbFLg`@~#~Y_6)vTP}H{i?=lPV7EP%zPra)E033w zj Date: Sat, 16 Feb 2019 15:31:47 -0600 Subject: [PATCH 08/12] Debating on what test library to use | unittest #1 as of commit --- .../flaskr/flaskr.egg-info/SOURCES.txt | 8 +++++++- back-end-python-week/flaskr/flaskr/flaskr.py | 1 + back-end-python-week/flaskr/flaskr/flaskr.pyc | Bin 4269 -> 4516 bytes .../flaskr/flaskr/static/.style.css.swp | Bin 12288 -> 0 bytes .../flaskr/flaskr/tests/test_flaskr.py | 0 back-end-python-week/flaskr/setup.py | 1 - 6 files changed, 8 insertions(+), 2 deletions(-) delete mode 100644 back-end-python-week/flaskr/flaskr/static/.style.css.swp create mode 100644 back-end-python-week/flaskr/flaskr/tests/test_flaskr.py diff --git a/back-end-python-week/flaskr/flaskr.egg-info/SOURCES.txt b/back-end-python-week/flaskr/flaskr.egg-info/SOURCES.txt index aff2a1e78a..1df9346356 100644 --- a/back-end-python-week/flaskr/flaskr.egg-info/SOURCES.txt +++ b/back-end-python-week/flaskr/flaskr.egg-info/SOURCES.txt @@ -1,4 +1,5 @@ MANIFEST.in +setup.cfg setup.py flaskr/__init__.py flaskr/flaskr.py @@ -6,4 +7,9 @@ flaskr/schema.sql flaskr.egg-info/PKG-INFO flaskr.egg-info/SOURCES.txt flaskr.egg-info/dependency_links.txt -flaskr.egg-info/top_level.txt \ No newline at end of file +flaskr.egg-info/top_level.txt +flaskr/static/.style.css.swp +flaskr/static/style.css +flaskr/templates/layout.html +flaskr/templates/login.html +flaskr/templates/show_notes.html \ No newline at end of file diff --git a/back-end-python-week/flaskr/flaskr/flaskr.py b/back-end-python-week/flaskr/flaskr/flaskr.py index 7a1b9950b9..7ac45dece7 100644 --- a/back-end-python-week/flaskr/flaskr/flaskr.py +++ b/back-end-python-week/flaskr/flaskr/flaskr.py @@ -1,5 +1,6 @@ import os import sqlite3 +import unittest from flask import (Flask, request, session, g, redirect, url_for, abort, render_template, flash) diff --git a/back-end-python-week/flaskr/flaskr/flaskr.pyc b/back-end-python-week/flaskr/flaskr/flaskr.pyc index 9539984c53ca31696838b8bf1b6010e4ff8b1b70..14d9beb24fca658181776124aedae57625bede6a 100644 GIT binary patch delta 731 zcmZ{hzfaph6vw~M2_eKu?EGj5brQ-CAy7mII-nw2p?2?(F#>^vJg>Oqv>aLI*zdzdTVX|iU zzr)|))5w{(2%dqi0RadD-sttli<3OMd5}y)7H~o679oppEx7hXp~=1kk%9!=GTe%W zs-w%+yLU?{YtmZ zQ{R=nVEs(Wx9V^Dsk%-TsT$s<%w*s>IjTMN^?}2+OqrI|TINq;eLd50_@&xvZ~7(y zI5#(xm(9{MHO&4?sPlAIE_&%B|7^eS2Xe3#{+#)oH0QawMX$mebDUJ#X67F9hrw=S8*O3Ol%v&U&H{sjKj@UAJj-F&KMr`PAS_#@BwxN?W&6Yz SLr=aW<_D`B@}xf6EB^tU`LmY* delta 550 zcmYk2y-UMD7{=dAv>$0cntrHl`W+~uPF=)JM+KLHOBJi_1>0B~B!zAY>K|Y^1P4dK z$tjD74o)uq0gi5tQk(@Z*QV*g-Fx?Yp7(j-?)Ar_#{Wvf&3XZ{5+Q-BqB434_ootFlzGLObQ8Ne}5$}*Az9A_;FkLNv}1Wa~N zGFTV^a*DF4q9r;x2%4>YxN9!%{dUR zr^d6^LyVca;WWf|UtB@kb&V5XTid&k$hvszuyJ=dW>M&d`!!CQy-7G`f@SgWO3Tof5|ZL%}o9@e=SJ z6rtxOcmRf#a+jQOK^<6o{-Zg0_rJTpI~N`+>K{ITK_@|viLgwZ6m!2_OL^fCP{L5A{=2Ym)D zKnI|Qpr7FJ74#AG3N!-U0D13g$Ocgi(Jqy=W!&5E+BBH zle0C)SjzFU@tULeE4fK?#UgF3F2UAST5X3X@b>Pdv|RBMXxPeA%XpEeDx@Y)Gdrb; zR+d%ynRE?LoK0(h5nPi124YHENksu3K4C6hb_in?!q;eGnt;afv2V-|f7R?2gE)?T zy0fonk<)Al4)t(_OrQkwvjLSd!nae>h

Date: Mon, 18 Feb 2019 20:25:56 -0600 Subject: [PATCH 09/12] Front end looking a lot nicer, Working on connecting DB --- back-end-python-week/flaskr/flaskr/flaskr.db | Bin 16384 -> 16384 bytes back-end-python-week/flaskr/flaskr/flaskr.py | 33 +++++++++++++----- back-end-python-week/flaskr/flaskr/flaskr.pyc | Bin 4516 -> 5115 bytes back-end-python-week/flaskr/flaskr/schema.sql | 12 +++---- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/back-end-python-week/flaskr/flaskr/flaskr.db b/back-end-python-week/flaskr/flaskr/flaskr.db index 9e882899821153133bd133c7d615248d39d23016..894e242bec3c35d5f0983d1153f67d5b12f98afb 100644 GIT binary patch delta 186 zcmZo@U~Fh$oFFa8&A`CG0>m)DGEv8vk$Ypp5`G>Q{ud1VzxcoKzvF+gSy12xzX}Tr z3j;4N3p1Ex0+Wm&k{76(38eZnSmhml6;38*amKv-lGI`*ZboKl#?-u$qRiA{7Kq9V v4E)deF96Lv!fzl7G)Gdouq?G)p)e&;p*$m)DG*QQxk!fSX5`HEIfz5&f*ZC(-P-f!=N#o)I0RE^B A&;S4c diff --git a/back-end-python-week/flaskr/flaskr/flaskr.py b/back-end-python-week/flaskr/flaskr/flaskr.py index 7ac45dece7..eade55c4dd 100644 --- a/back-end-python-week/flaskr/flaskr/flaskr.py +++ b/back-end-python-week/flaskr/flaskr/flaskr.py @@ -10,7 +10,7 @@ # Load in default app.config.update( DATABASE = os.path.join(app.root_path, "flaskr.db"), - SECRET_KEY = b'_5#y2L"F4Q8z\n\xec/', + SECRET_KEY = '_5#y2L"F4Q8z\n\xec/', USERNAME = "Admin", PASSWORD = "Default" ) @@ -56,6 +56,7 @@ def close_db(error): # Route for "home" @app.route('/') +@app.route('/api') def show_notes(): db = get_db() cur = db.execute('select title, text from notes order by id desc') @@ -63,19 +64,19 @@ def show_notes(): return render_template("show_notes.html", notes=notes) # Route for adding notes -@app.route('/add', methods=['POST']) +@app.route('/api/add', methods=['POST']) def add_note(): if not session.get('logged_in'): abort(401) db = get_db() - db.execute('insert into notes (title, text) values (?, ?)', + db.execute('INSERT INTO notes (title, text) VALUES (?, ?)', [request.form['title'], request.form['text']]) db.commit() flash("New note was succesfully posted") return redirect(url_for('show_notes')) -# Login & Logout -@app.route('/login', methods=['GET','POST']) +# Login +@app.route('/api/login', methods=['GET','POST']) def login(): error = None if request.method == 'POST': @@ -84,14 +85,28 @@ def login(): elif request.form['password'] != app.config['PASSWORD']: error = "Bad Password" else: - sesion['logged_in'] = True + session['logged_in'] = True flash("Successfully Logged In") return redirect(url_for('show_notes')) return render_template('login.html', error=error) - -@app.route('/logout') + +# Logout +@app.route('/api/logout') def logout(): - sesion.pop('logged_in', None) + session.pop('logged_in', None) flash("Logged Out") return redirect(url_for('show_notes')) + +# Display Profiles +@app.route('/api/') +def show_profile(username): + flash("User Profile") + return redirect(url_for('show_notes')) + +# Test +@app.route('/api/test') +def show_test(): + flash("TEST") + return "

TEST

" + diff --git a/back-end-python-week/flaskr/flaskr/flaskr.pyc b/back-end-python-week/flaskr/flaskr/flaskr.pyc index 14d9beb24fca658181776124aedae57625bede6a..44ea3c7e9a452362e06a545ecc9bef4284050251 100644 GIT binary patch delta 721 zcmYLHOK;Oa5T0>J8z*jTqynLC>E_X3B!uCLqC$ZjDxnnF35N=Ss@OE4p{cT49;Y1O z!WADtLgK_33Hb#7fg`^IA;gIbGh18iV?6WCxAT%eHUD083%{4jANCI(3?W-4eQ(m0 z-@mvmoX1sovJTNQyh4c1z-wTI&aQyWbrzy?5Y=Fxag5GqoZWg(SkVMma}3Q{%{h&n zv&J!_3pw7*aerMqMDA$ij=IJhIlciALg+Qq&loP6@)R}T?;VX(G)L$ZOtjHLS<2Al zxcsfX-3z-xUu^gKJK}JvVktZ|R+IR$Q1J_ON!;JMJLrb#pkiU;HqXN$0fvoBXwr7E zOk0+-km=ldhQ+`j^KJDV?j-N4Yo$u&OukkpXe4d>dY&oDBuohNT?8$0TEA)Ms*e8!9-~j=QA0*~ag(~PDk=Z#qKdLw6bI;c z!@h2>GrG1Z*b*I|)RXL7k_V9dab~NWMc2St4%o;G@Y?AQdl{V@1O{6yZn3zN{B+*n UmE`5=4a-8eRJU4oZLzlS52K}m>i_@% delta 359 zcmeyZzC>A?`7)&T7|JbMTDV+fuWg^AxeQEm5(7yo*_k) zAw`TKMVuj>5h%`>A^}sN2vZ;lRv-md!vt0%4O628QzHX1Ges6AuFR0a$Pla{2edfz zKM?q7fZS2Sy7@1oGy7&w&J0E#CQe3vMjpmu7NErBgIv4RGV_X4i%JwS^Gfm+^72bk zixo6VGD~t&breccD@rsK$`W%*Q;Rn*ybeg=5N0NmNsCDyso-#)65)iXEwKy|B zZ?YHPbR|C!R|H5fFtGuxkz(WoVJ0p{E=FO-Vs@bTWOn`>M*GPn{PP53K#D;IFfa)K k6= Date: Tue, 19 Feb 2019 19:42:29 -0600 Subject: [PATCH 10/12] Debugged database connection issues, moving forward --- .../flaskr/flaskr/__init__.pyc | Bin 213 -> 235 bytes back-end-python-week/flaskr/flaskr/flaskr.db | Bin 16384 -> 16384 bytes back-end-python-week/flaskr/flaskr/flaskr.pyc | Bin 5115 -> 5115 bytes .../flaskr/flaskr/templates/layout.html | 2 +- .../flaskr/flaskr/templates/show_notes.html | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/back-end-python-week/flaskr/flaskr/__init__.pyc b/back-end-python-week/flaskr/flaskr/__init__.pyc index 9ed0ed8f6696eac6c113ea4f80485e94e4c690db..36977379b606dbfa1786cda6ac5c14f3263e68cf 100644 GIT binary patch delta 35 rcmcc0_?nTO`7164oZt!o=}$c6AQE_ZnOdbWgQ51 diff --git a/back-end-python-week/flaskr/flaskr/flaskr.db b/back-end-python-week/flaskr/flaskr/flaskr.db index 894e242bec3c35d5f0983d1153f67d5b12f98afb..d14ec3e92b2546ea307c2d092d0304568c9c8bed 100644 GIT binary patch literal 16384 zcmeI(zi!h&90%~b*fdH|YDxzWX83`S+Nco=FMvS?S-4IKu0#fe-1G`2j?>;FJoMY#vDG(5V00bZa0SG_<0uX=z1Rwx` zKMB0Hny%~e#Z#T`<)WBsp{mTjHwgSBpv1o$1ynU{wp-agWrY^cg``87O;S0hv6xdj z)6=XNNih+H?zLMw)43omUg@$Y6|+1yts7;-#&UDJyVF>4x3>7O`hRtln+5YTC5~pI z7>RR-*3y{Ho!l(aiRhW0-9?i(UC-kSQQgxFNoGRTMPun6bt9clEsT@kK`@}5LAdP? zhV(EPlE0hu!`O7%4&vnJ)RN#yLUG@u-6;AswWa2EyIZc!ZRZnnzB}KXFQ$Tk00bZa z0SG_<0uX=z1Rwwb2teS%3fQ*IIvv}p@I+s`*1OE2tWV=5P$## zAOHafKmY;|fIuzKYFI8meQn}0w>)0IR$y2A|EmFWK06eap&A`6I*56*wMNWI^iA44v3~rdc`mmE0=6eQBC#j;BGo>jdl}!%Krwc;L tsqC4Ze81a&K?gD$jcG1ab@5cnu`1(!82eE)tmCTL@%Oy_RF%KF_yM|-BWM5s delta 159 zcmZo@U~Fh$oFFa8&A`CG0>m)DGEv7^n43XQW&|cZdItT`Z diff --git a/back-end-python-week/flaskr/flaskr/templates/layout.html b/back-end-python-week/flaskr/flaskr/templates/layout.html index d40f4480fb..26d137963d 100644 --- a/back-end-python-week/flaskr/flaskr/templates/layout.html +++ b/back-end-python-week/flaskr/flaskr/templates/layout.html @@ -12,7 +12,7 @@

Lambda Notes.py

{% endif %} - {% for mesage in get_flashed_messages() %} + {% for message in get_flashed_messages() %} {{ message }} {% endfor %} {% block body %}{% endblock %} diff --git a/back-end-python-week/flaskr/flaskr/templates/show_notes.html b/back-end-python-week/flaskr/flaskr/templates/show_notes.html index d48a5d02fd..92f9b7d42c 100644 --- a/back-end-python-week/flaskr/flaskr/templates/show_notes.html +++ b/back-end-python-week/flaskr/flaskr/templates/show_notes.html @@ -12,8 +12,8 @@ {% endif %}
    - {% for entry in entrie %} -
  • {{ entry.title }}

    {{ entry.text|safe }}
  • + {% for note in notes %} +
  • {{ note.title }}

    {{ note.text|safe }}
  • {% else %}
  • No Notes!!!
  • {% endfor %} From c1e9d907e01dc2773c196e7e7bd524c10ea6cca7 Mon Sep 17 00:00:00 2001 From: BrendonKootz Date: Tue, 19 Feb 2019 19:58:26 -0600 Subject: [PATCH 11/12] Working on delete POST --- back-end-python-week/flaskr/flaskr/flaskr.db | Bin 16384 -> 16384 bytes back-end-python-week/flaskr/flaskr/flaskr.py | 10 ++++++++++ back-end-python-week/flaskr/flaskr/flaskr.pyc | Bin 5115 -> 5556 bytes 3 files changed, 10 insertions(+) diff --git a/back-end-python-week/flaskr/flaskr/flaskr.db b/back-end-python-week/flaskr/flaskr/flaskr.db index d14ec3e92b2546ea307c2d092d0304568c9c8bed..a7610733b0b76f355e2a9a8d2ed2e4d64874d817 100644 GIT binary patch delta 96 zcmZo@U~Fh$oFL68G*QNxQD|erBz*-|ZboKl#?-u$qRiA{7G4Gh239_E2L3nv`}k+^ yx$>EB78FqBljLD#VGtEfNi0qQ;ie!KRtDi##hlcf%@gf787D8WbDTWOJ`Dh05E#Ay delta 80 zcmZo@U~Fh$oFL68I8nx#QE+3zBz-v+ZboKl#?-u$qRiA{7G4Gh1{OY72L3nv`}k+^ kxo#E|Fy-TJ3Swbp5N=h>NzK_j(T!VHTqX}`4qQZ&;nrtOPh=^I*rd7$VxJX1Q!BOV! zA8?Y2f56Sv&C$IM99_IwOy>RO&3nK1dvE4D`Iy!{Umfaaqq4mZf2)no9GU&`pjUAu z3Wo@FM6SankONx@usWgK54;z6H}F2-#8D(i++#NOmmH8>KKNfW3>=}58frB0O-;0u z{`lT;X`EXX%dyHz4pg5wA7mD;omsTLxynG=Mi zTN1EiZ%keLvxZT897t delta 203 zcmdm@{aam{`7xcKZw>0Cx-X@(RDhIA%|W=6&o8HN@HAcG-F zi6NDbAxoYiMHa-JyoJ$*ErpRGSVMU;AJZ+a&6RvoOpN}MrwGhrw3%!yIFT`K@=?JK zMyttzY{h~+AhR>_%i{}*^3yVNQd1{i5_-#@4H9Jm5)4dSj2dc_&k1j1w42;25-VU2 i6bo_$5l$e&WwH-j#pHZZK}NmFjiTCYD*O`c5^Mm`SuYa+ From e7f7e9b611bfb5001bf7d5f9e603935a4cfc3442 Mon Sep 17 00:00:00 2001 From: BrendonKootz Date: Wed, 20 Feb 2019 19:31:28 -0600 Subject: [PATCH 12/12] added Edit buttons & lots of style changes --- back-end-python-week/flaskr/flaskr/flaskr.db | Bin 16384 -> 16384 bytes back-end-python-week/flaskr/flaskr/flaskr.py | 11 ++++--- back-end-python-week/flaskr/flaskr/flaskr.pyc | Bin 5556 -> 5618 bytes .../flaskr/flaskr/static/style.css | 31 ++++++++++++++++-- .../flaskr/flaskr/templates/show_notes.html | 16 +++++---- 5 files changed, 43 insertions(+), 15 deletions(-) diff --git a/back-end-python-week/flaskr/flaskr/flaskr.db b/back-end-python-week/flaskr/flaskr/flaskr.db index a7610733b0b76f355e2a9a8d2ed2e4d64874d817..d4092a6d1472972964c4f3069e3750ace5723c98 100644 GIT binary patch literal 16384 zcmeI(!D4RZa}e1k)4F!EX?G{B z0YOsGi+c3p)vE_zK*3k=5j=SiFM9Ii>^8AYEuMNQ{0C+x^X=?p_P1HWu)8bw%8nF# zz2!G;$*+(s(KK?Cb3(|N%2efkN~jNq+gg9af9f%E>HG&>b%&jWyDhxBIMR#{%<0I+Y0qwoS+!@Oo79po3#*3@gQmLYLS~M%x-$S#^`xdV(sk~Y)9~|01IGrwp zYjeuJ5%!z?Vn5UeBnUtN0uX=z1Rwwb2tWV=5P$##POSi?l;}E*M`bK3wXh7=|FLlW z{}XHfQ+skTaR@*F0uX=z1Rwwb2tWV=5P(2WAQg)nTJ(%Wc36w&wccX|G+h5@Q?Cj8 z&OWiX88dS&!!s%UtNum*tiRV^>Q6^LrrxLyNDzPk1Rwwb2tWV=Coho5Qo>lH@nVt< z5%y}~a?r53%BVnqU%@{Y!cO-_MqMX+o%z#wfvEejWQ;{8RvkcNe1wwgx%s(c)9&1y z937^_n27rKcM2LTt%Bzc1v4oXFb)EfXDFGvx*;TYBww*=Rx?Gw>|YfgXFt*z#q2* z$<_aX)7(<8E(qUm`LpUyezCChh_CxjeUo=Y5Or?({$>!SJEcmoT(0%fS#`%hpYNT+ GUiAlT^~+!Y delta 62 zcmZo@U~Fh$oFL68G*QNxQD|erBz*-|ZboKl#?-u$qRiA{7G4Gh239_E2L3nv`}k+^ Sx$>EB78FqB+iY%kk`Vyn7Y{uE diff --git a/back-end-python-week/flaskr/flaskr/flaskr.py b/back-end-python-week/flaskr/flaskr/flaskr.py index c060919323..a98b62fa4f 100644 --- a/back-end-python-week/flaskr/flaskr/flaskr.py +++ b/back-end-python-week/flaskr/flaskr/flaskr.py @@ -72,18 +72,19 @@ def add_note(): db.execute('INSERT INTO notes (title, text) VALUES (?, ?)', [request.form['title'], request.form['text']]) db.commit() - flash("New note was succesfully posted") + flash("Note successfully") + error = "lel" return redirect(url_for('show_notes')) # Route for delete -@app.route('/api/delete', methods=['POST']) -def delete_note(): +@app.route('/api/delete/', methods=['DELETE']) +def delete_note(id): if not session.get('logged_in'): abort(401) db = get_db() - db.execute('DELETE FROM notes WHERE id = ?',(id,)) + db.execute('DELETE FROM notes WHERE id = ?',request.form['id']) db.commit() - return redirect(url_for("show_notes.html")) + return redirect(url_for("show_notes.html",notes=notes)) # Login @app.route('/api/login', methods=['GET','POST']) diff --git a/back-end-python-week/flaskr/flaskr/flaskr.pyc b/back-end-python-week/flaskr/flaskr/flaskr.pyc index a32e9be2d7d952082fbab142330aecd21417d940..000e0ac985f91c49a9902190ad9bac449ffc306f 100644 GIT binary patch delta 654 zcmX|-%Wl&^6o$`n5<8dLA!$(qp)_gJC~biVv7peXLO>8m6#|z9s<<@DxUGZRM9hSX z1OgNgY++dQ4p1I|1-t-jHaq~EvSYR5O~m=1~CO<62wsuCD^h|&ve`~8~0S$BC0X3#eBx_*_hA8yk_`Z z%~;ewH-}O5SS5%?LG*6yN{$cot1R>Sx-IXdsq6@Gcb81&Cq)8a<SNaFD)_lDj*#3lVR{|VRi`vV{FoIX`} zi=qBjc!Mi^fdw|0RD=8d%`gfE`g`#gKG0vrzv6lQYU1YMGt}X?SonhdHp?ZJ%X-y* Rr27Y38Mm6PId+j+Rque2LE|xdg(Kdl3x}@IR;Ed!vlMzg`w($Pm!03ZuCJXR_)4GV zzF|wp@)tNCUcg=6!M1h^H`vj)g-cw}f1j)k&(aicj^#BAAJ|)Bd80q)-s_)F=M(8l KvYstkMe{$B4svP$ diff --git a/back-end-python-week/flaskr/flaskr/static/style.css b/back-end-python-week/flaskr/flaskr/static/style.css index 6767581ada..ca346d193e 100644 --- a/back-end-python-week/flaskr/flaskr/static/style.css +++ b/back-end-python-week/flaskr/flaskr/static/style.css @@ -7,9 +7,34 @@ h2 { font-size: 1.2em; } .page { margin: 2em auto; width 35em; border: 5px solid #ccc; padding: 0.8em; background: lightgrey; } -.notes { list-style: none; margin: 0; padding: 0; } -.notes li { margin: 0.8em 1.2em; } -.notes li h2 { margin-left: -1em; } +.notes { + display:flex; + flex-direction:row; + flex-wrap:wrap; + justify-content:space-evenly; + list-style: none; + margin: 0; + padding: 0; +} +.notes li { + margin: 0.8em 1.2em; + border:5px solid darkgrey; + max-width:550px; + padding:10px; +} + +.notes button { + height:30px; + background:darkgrey; + color:light-grey; +} + +.notes button:hover { + color:white; +} + +.notes-body { border:5px solid #ccc; } + .add-note { font-size: 0.9em; border-bottom: 1px solid #ccc; } .add-note dl { font-weight: bold; } .metanav { text-align: right; font-size: 0.8em; padding: 0.3em; diff --git a/back-end-python-week/flaskr/flaskr/templates/show_notes.html b/back-end-python-week/flaskr/flaskr/templates/show_notes.html index 92f9b7d42c..35a7a7942e 100644 --- a/back-end-python-week/flaskr/flaskr/templates/show_notes.html +++ b/back-end-python-week/flaskr/flaskr/templates/show_notes.html @@ -11,11 +11,13 @@ {% endif %} -
      - {% for note in notes %} -
    • {{ note.title }}

      {{ note.text|safe }}
    • - {% else %} -
    • No Notes!!!
    • - {% endfor %} -
    +
    +
      + {% for note in notes %} +
    • {{ note.title }}

      {{ note.text|safe }}
    • + {% else %} +
    • No Notes!!!
    • + {% endfor %} +
    +
    {% endblock %}