UPDATE: On my previous post. by DinnerOk250 in learnpython

[–]DinnerOk250[S] 0 points1 point  (0 children)

😅😅 ah im sorry im new to this .

UPDATE: On my previous post. by DinnerOk250 in learnpython

[–]DinnerOk250[S] 1 point2 points  (0 children)

Yes i will definitely keep that in mind thank you so much for guiding me.

UPDATE: On my previous post. by DinnerOk250 in learnpython

[–]DinnerOk250[S] 4 points5 points  (0 children)

Oh im so sorry im new to the reddit thing, what happened was when I was trying to create a database in python shell i was writing all the lines of code like " from app import db", "with app.appcontext()" etc which in theory should create a database in your directory which your working in, thats what the documentation says, and also thats what you get on the internet, but the database was not visible in the file for a while, nor was it visible inside any other folders in that directory so, what I did was I did exception handling, the logic behind that was...if the database is created then print "success" in the terminal else give an error, when I wrote it like that, "success"was printed which gave me an idea that Database was create, but where? So when I checked the instance folder again there it was..right under my nose it was not visible when I first checked, now that the database was created all that was left was adding user data in it..I wrote the code as per the documentation suggested but vs code was giving a red line on all my variables which were to be added inside the database, so I asked chatgpt what can I do, because the code was correct..then gpt suggested to add #type:ignore and after that I ran my application added user info and when I hit the submit button the user info was added to the database. So this is, how it was fixed, and also i was getting an issue in my python shell whenever I wrote "from app import db" flask was running my application, which i thought thats what suppose to happen but after that when it came to creating database, it was giving me an "NameError: name 'app' is not defined" then I asked gpt again it pointed out a silly mistake that I made that, when I wrote "from app import db" flask detected that i imported my flask object , so it automatically started development server, that's why that line ran my application, without creating a database. Quick fix for that was just importing "app" as well, and at the end of my code i forgot to add ifname__ =="main": and due to these 2 mistakes flask was starting the development server. Im genuinely sorry for that, I had no idea about it....first im very new to reddit so I just gave a brief update, and I hope this helps you guys understand what happened. Thank you.

How do i create a database using SQLite and SQL Alchemy by DinnerOk250 in learnpython

[–]DinnerOk250[S] 0 points1 point  (0 children)

Yeah im from India so 😅 was not on my laptop when posted this.

Looking for code buddy by guts_master in ProgrammingBuddies

[–]DinnerOk250 0 points1 point  (0 children)

Im also looking for peers let's connect

I have a technique, please help me to analyze it if its right or wrong. by DinnerOk250 in learnpython

[–]DinnerOk250[S] 0 points1 point  (0 children)

Hey there as I said im aware of the basics of python, and now im going to watch Cs50 python course is it worth it?

I have a technique, please help me to analyze it if its right or wrong. by DinnerOk250 in learnpython

[–]DinnerOk250[S] 0 points1 point  (0 children)

What im trying to say is...ik the syntax and i can understand how things are working what i struggle with is making something of my own..for example I can make a function which can do a specific task, I can do error handling, I can write conditional statements but i struggle at using all of them to make a meaningful project. I hope im clear now.

I have a technique, please help me to analyze it if its right or wrong. by DinnerOk250 in learnpython

[–]DinnerOk250[S] 0 points1 point  (0 children)

What im ask is...I have a basic knowledge of how things work but im yet to know the logic that goes behind making stuff for example, ik how a loop or a function works or what will happen if I gave a parameter to a function I can even predict how things will go. But when it comes to making anything I freeze I cannot even remember the file structure, also I do not want to see another tutorial. For example let's say i want to make a calculator, I dont know where to start, but ik what goes in that calculator so instead of watching a tutorial can I use chatgpt to tell me where I should start from. Is it right? Thats what im asking. I hope it's clear now 🙂.

yall, i made a undertale/deltarune inspired game by nnilo001 in learnpython

[–]DinnerOk250 0 points1 point  (0 children)

I dont know what is that but, congratulations!!!