What's new

Python programmer pasok po.

PHC - NoName

Established
Joined
Sep 27, 2021
Posts
230
Reaction
37
Pa help naman po dito. Pano poba magagawa yang pinapagawa samin.?

Pano poba magagawa yunh code na kagaya pojan sa example? Please pa help po. Kaylangan lang po talaga.

Pano poba magaya yung sana direction po? Pa help naman po please

Up po
 

Attachments

Last edited:
I actually don't use flask. I don't focus on web app.
But base on your return info, this code below should be the correct way.
Then ang need mo nalang next is to search how to create simple HTML with flask in python

Just figure out kung paano mo ilalagay yang return infos sa web page


Python:
from dataclasses import dataclass

@dataclass
class MyInfo:
    full_name: str
    age: int
    province: str
    favorite_food: str
    favorite_color: str
 
 
@app.route('/')
def full_info() -> MyInfo:
   return MyInfo(
       full_name='MY FULL NAME',
       age=19,
       province='Albay',
       favorite_food='Seas Foods',
       favorite_color='Red'
    )
 
if __name__ == '__main__':
   app.run()
 
Last edited:

PHC - NoName

Established
I actually don't use flask. I don't focus on web app.
But base on your return info, this code below should be the correct way.
Then ang need mo nalang next is to search how to create simple HTML with flask in python

Just figure out kung paano mo ilalagay yang return infos sa web page


Python:
from dataclasses import dataclass

@dataclass
class MyInfo:
    full_name: str
    age: int
    province: str
    favorite_food: str
    favorite_color: str
   
 
 @app.rout('/')
 def full_info() -> MyInfo:
    return MyInfo(
        full_name='MY FULL NAME',
        age=19,
        province='Albay',
        favorite_food='Seas Foods',
        favorite_color='Read'
     )
 
 if __name__ == '__main__':
    app.run()
Bakit po sya error sir? Wala pong lumabas na IP addres yung 207.0.0.1/5000. Bakit po kaya?
 

Attachments

PHC - NoName

Established
I actually don't use flask. I don't focus on web app.
But base on your return info, this code below should be the correct way.
Then ang need mo nalang next is to search how to create simple HTML with flask in python

Just figure out kung paano mo ilalagay yang return infos sa web page


Python:
from dataclasses import dataclass

@dataclass
class MyInfo:
    full_name: str
    age: int
    province: str
    favorite_food: str
    favorite_color: str
   
 
 @app.rout('/')
 def full_info() -> MyInfo:
    return MyInfo(
        full_name='MY FULL NAME',
        age=19,
        province='Albay',
        favorite_food='Seas Foods',
        favorite_color='Read'
     )
 
 if __name__ == '__main__':
    app.run()
flask po kase dapat sir e. Base po dun sa nasa direction po. Bali naka CP lang po ako. Nakapag try napo ako makaoag run ng flask program. Okay naman po sya.

missing e =D route*
Ahhh.. Okay po. Wait.

missing e =D route*
Bakit ayaw padin po? Anong line poba ang mali at ano pong mali?

missing e =D route*
Eto po yung code.
 

Attachments

Last edited:
flask po kase dapat sir e. Base po dun sa nasa direction po. Bali naka CP lang po ako. Nakapag try napo ako makaoag run ng flask program. Okay naman po sya.


Ahhh.. Okay po. Wait.


Bakit ayaw padin po? Anong line poba ang mali at ano pong mali?


Eto po yung code.
Indentation error. Yung def full_info may extra indent

Ang isearch mo nalng how to input that information into web page.
 
Last edited:
1637765977907.png

Diyan mo malalaman kung saan yung error

Wala po akong makita na how to input that information into web page
Yun lang.
try mo to
You do not have permission to view the full content of this post. Log in or register now.

You do not have permission to view the full content of this post. Log in or register now.

di kaso ako focus sa web. More on tools lang ako saka di rin related sa work ko haha
Just doing for fun and learning lang
 

Attachments

PHC - NoName

Established

PHC - NoName

Established

Attachments

PHC - NoName

Established
Hindi kopo talaga maware. Huhu

Madming indentation error

wag ka mag copy paste. I manual type mo lahat to make sure walang indentation error

like

SPACE SPACE def

dapat ganito

def
Po double space po?

Pano bato. Huhu

Madming indentation error

wag ka mag copy paste. I manual type mo lahat to make sure walang indentation error

like

SPACE SPACE def

dapat ganito

def
Bakit ayaw padin po nag manual nako.

Sige po sir. Kahit bukas nalang po naistorbo kona po kayo gabing gabi napo sensya napo. Sana po mahelp nyopo bukas need kolang po kase takaga makapag pasa bago mag 1 pm. Salamat sir sa time
 

Attachments

Last edited:
Hindi kopo talaga maware. Huhu


Po double space po?

Pano bato. Huhu


Bakit ayaw padin po nag manual nako.

Sige po sir. Kahit bukas nalang po naistorbo kona po kayo gabing gabi napo sensya napo. Sana po mahelp nyopo bukas need kolang po kase takaga makapag pasa bago mag 1 pm. Salamat sir sa time
Ok na pero di mo nasama yung code ng flask

check mo yung sa oringinal screenshot mo

alighn mo yung app and def sa gilid saka move mo rin yung info para mag match sa indentation

Pati pala yung if name mo wrong indetation parin. sagad mo lang sa gilid

1637769344830.png


Code:
Po double space po?
No. I mean ayan yung error mo may mga extra spaces
 

Attachments

Last edited:

nemuhiro

Established
salute sayo sir napaka helpful mong tao
Ok na pero di mo nasama yung code ng flask

check mo yung sa oringinal screenshot mo

alight mo yung app and def sa gilid saka move mo rin yung info para mag match sa indentation

Pati pala yung if name mo wrong indetation parin. sagad mo lang sa gilid

View attachment 1728513

Code:
Po double space po?
No. I mean ayan yung error mo may mga extra spaces
 
salute sayo sir napaka helpful mong tao

wahhaha akala ko nasa private convo kami =D

Pero thanks hanggat may maitutulong why not.

Wait ka nlang bukas sa mga Web Developer :)

edit:
Nakapag-aral tuloy ako ng wala sa oras =D (Nagkainterest lang sa flask)

1637775692388.png


Ikaw nalang magtuloy para sa next page sa sinsabi sa Direction 2
Check mo yung html para magets mo yung sa **get_info()

You do not have permission to view the full content of this post. Log in or register now.

1637776297996.png

OR
DL LINK:
You do not have permission to view the full content of this post. Log in or register now.
1637830262551.png
 

Attachments

Last edited:

New Topics

Online statistics

Members online
1,519
Guests online
1,189
Total visitors
2,708

Forum statistics

Threads
1,237,675
Posts
21,696,737
Members
1,617,578
Attachments
1,744,038
Profile posts
100,375
Top