On Sun, 6 Nov 2022 at 18:30, Balogun Awwal <awwalbalogu...@gmail.com> wrote:
> Thanks > > Sent from awwal > > On 5 Nov 2022, at 6:14 PM, Balogun Awwal <awwalbalogu...@gmail.com> wrote: > > I’m using *vscode* editor I’m not sure there is any typo but I will > recheck it > > Sent from awwal > > On 5 Nov 2022, at 5:41 PM, 'Kasper Laudrup' via Django users < > django-users@googlegroups.com> wrote: > > On 05/11/2022 16.38, Balogun Awwal wrote: > > I don’t understand what you mean > > > > That you made a typo in your settings. > > Using an editor that can highlight such mistakes can be quite convenient. > Not only would it have saved you from having to post a question here, you > wouldn't even have to (re)start your Django development server. > > Kind regards, > Kasper Laudrup > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/c2fb9014-7feb-75e8-8e44-85f0b2420dc1%40stacktrace.dk > . > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/3609A45F-B1B8-4DA4-8663-1D668BC1218B%40gmail.com > <https://groups.google.com/d/msgid/django-users/3609A45F-B1B8-4DA4-8663-1D668BC1218B%40gmail.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/3609A45F-B1B8-4DA4-8663-1D668BC1218B%40gmail.com > <https://groups.google.com/d/msgid/django-users/3609A45F-B1B8-4DA4-8663-1D668BC1218B%40gmail.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/3609A45F-B1B8-4DA4-8663-1D668BC1218B%40gmail.com > <https://groups.google.com/d/msgid/django-users/3609A45F-B1B8-4DA4-8663-1D668BC1218B%40gmail.com?utm_medium=email&utm_source=footer> > . > -- Best Regards*,* *MD.Seam uddin* *Software Engineer* *E-mail:* *s <saz...@divine-it.net>eamuddin2...@gmail.com <eamuddin2...@gmail.com>* *Contact: +8801854422750* -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMSMAXBusHA0HkOSkecoPhvn0k%3D7iK5A5%3DwEk%3DiL4nj8fwSM8A%40mail.gmail.com.
Index: mypractice/rocking_notes_2021/requirements.txt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- mypractice/rocking_notes_2021/requirements.txt (revision d3c9d6ef4fd8f9856f4adfcfef518bed04f7fc41) +++ mypractice/rocking_notes_2021/requirements.txt (revision 9998d030c880605610af7bf2178446322721e54e) @@ -1,9 +1,15 @@ click==8.1.3 colorama==0.4.6 +decorator==5.1.1 Flask==2.2.2 +Flask-JWT-Extended==4.4.4 importlib-metadata==5.0.0 itsdangerous==2.1.2 Jinja2==3.1.2 MarkupSafe==2.1.1 +peewee==3.15.3 +PyJWT==2.6.0 +python-dotenv==0.21.0 +validators==0.20.0 Werkzeug==2.2.2 -zipp==3.10.0 \ No newline at end of file +zipp==3.10.0 Index: mypractice/rocking_notes_2021/src/__init__.py IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- mypractice/rocking_notes_2021/src/__init__.py (revision d3c9d6ef4fd8f9856f4adfcfef518bed04f7fc41) +++ mypractice/rocking_notes_2021/src/__init__.py (revision 9998d030c880605610af7bf2178446322721e54e) @@ -7,6 +7,8 @@ from flask_jwt_extended import JWTManager def create_app(test_config=None): app = Flask(__name__,instance_relative_config=True) + if __name__ == '__main__': + app.run(debug=True) if test_config is None: app.config.from_mapping( Index: mypractice/rocking_notes_2021/src/app.py IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- mypractice/rocking_notes_2021/src/app.py (revision d3c9d6ef4fd8f9856f4adfcfef518bed04f7fc41) +++ mypractice/rocking_notes_2021/src/app.py (revision 9998d030c880605610af7bf2178446322721e54e) @@ -1,4 +1,11 @@ from src import create_app - - +from flask import Flask, jsonify, render_template +from . import database +app = Flask(__name__) application = create_app() + + + +@app.get("/") +def say_hello(): + return render_template('home.html') Index: mypractice/rocking_notes_2021/src/note.py IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- mypractice/rocking_notes_2021/src/note.py (revision d3c9d6ef4fd8f9856f4adfcfef518bed04f7fc41) +++ mypractice/rocking_notes_2021/src/note.py (revision 9998d030c880605610af7bf2178446322721e54e) @@ -35,40 +35,3 @@ 'tags': tags } }), HTTP_201_CREATED - - - - -# @note.route('/',methods=['POST','GET']) -# def note(): -# if request.method=='POST': - # current_user = get_jwt_identity() - - # title = request.form.get('title') - # body = request.form.get('body') - # tags = request.form.get('tags') - - # note = Notes(title=title, body=body,tags=tags, user_id=current_user) - # note.commit - - - # with db.transaction() as note: - # - # Notes.create(title=title, body=body, tags=tags) - # note.commit() - - # return jsonify( - # { - # 'message': 'Note Created', - # 'user': - # { - # 'title': title, - # 'body': body, - # 'tags':tags - # } - # - # } - # ), HTTP_201_CREATED - - - Index: mypractice/rocking_notes_2021/src/templates/home.html IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- mypractice/rocking_notes_2021/src/templates/home.html (revision 9998d030c880605610af7bf2178446322721e54e) +++ mypractice/rocking_notes_2021/src/templates/home.html (revision 9998d030c880605610af7bf2178446322721e54e) @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>Rocking Notes 2021</title> + <link rel="preconnect" href="https://fonts.googleapis.com"> +<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> +<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet"> + <style> + table ,th, td + { + border: 1px solid #0088cc; + border-collapse: collapse; + padding: 5px; + } + table td + { + width: 300px; + } + table td:first-child + { + font-weight:bold; + } + </style> +</head> +<body style="padding: 25px"> + <H1 style="font-family: 'Roboto', sans-serif; font-size: 3em">Rocking Notes 2021 API Documentation</H1> + <H3 style="font-family: 'Roboto', sans-serif; font-size: 1.5em"><span style="color: #0088cc;">USER</span> | Create a new User</H3> + <div style="display: flex; align-items: center; padding: 5px"><p style="margin: 5px">URL -</p> <a href="127.0.0.1:5000/api/v1/auth/register">127.0.0.1:5000/api/v1/auth/register</a></div> + <H3 style="font-family: 'Roboto', sans-serif; font-size: 1em; padding: 4px; margin: 5px"><span style="color: #0088cc;">Method</span> - POST</H3> + <h2>Request Body-</h2> + <table> + <tr> + <th>Field Name</th> + <th>Type</th> + <th>Description</th> + </tr> + <tr> + <td>username</td> + <td>string</td> + <td>Name of the user</td> + </tr> + + <tr> + <td>Email</td> + <td>string</td> + <td>email of the user</td> + </tr> + + <tr> + <td>Password</td> + <td>string</td> + <td>password of the user</td> + </tr> + </table> + + + +</body> +</html> \ No newline at end of file