-
1
Show the table (database. Py or model. Py) 2.Show id card , git commit, collaborator 3.Write flask route for home pageTimes asked 1Official solution
SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.
Example
@app.route('/ping') def ping(): return jsonify(ok=True) @app.route('/even/<int:n>') def even(n): return 'even' if n % 2 == 0 else 'odd'Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
2
Why we use if(__name__==__main__)Times asked 1Official solution
Simple
if __name__=='__main__' only when file run directly. Import pe nahi — app.run yahi. Remove import pe server start ho sakta.Celery/tests import app without serving. Why used.
Flask Python micro web framework. Route decorator URL → function. MAD2 mein JSON API:
request.get_json(),jsonify, JWT.WSGI: server (Werkzeug) app ko call.
if __name__ == '__main__'sirf direct run. Factorycreate_app()test/celery ke liye.Blueprint/resources folders.
@app.routevs MethodView. Debug=True viva local, prod nahi. CORS alag port Vue ke liye.Project example: app.py bottom.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
3
Shift login button to right sideTimes asked 1Official solution
SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.
Example
/* button red */ .btn-primary { background: red; } /* center navbar item */ .navbar { justify-content: center; }Viva tipDevTools se pehle try, phir file mein permanent change.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
4
Which attributes you usedTimes asked 1Official solution
SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.
Suggested flow1) Concept kya hai?
2) Mere code mein kahan?
3) Example / demo
4) Edge caseExample
# related file: models.py / routes / template # formula: request → check/auth → DB → render/redirectViva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet