-
1
Level 2 (LEVEL3_47)Times asked 1Official solution
SimpleLevel = viva difficulty band. Level 1 usually demo + basics; higher pe live coding + deeper theory.
Viva tipJo level assign hai uske hisaab se demo + theory ready rakho.
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
Explain all models in models.py.Times asked 1Official solution
Simplemodels.py = har table ki class: columns, PK/FK, relationships. Yeh Model layer hai.
Suggested flow1) Classes list karo
2) Har table ka kaam 1 line
3) Relationships (1-M / M-M)
4) Constraints (unique, nullable)Example
class Lot(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80), nullable=False) spots = db.relationship('Spot', backref='lot', lazy=True)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
Explain all database constraints.Times asked 1Official solution
SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.
Viva tipFunction signature + 3-4 important lines + edge case.
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
Add a new attribute (e.g., emergency phone) to the entire system.(I explained that my current project doesn't use Flask-Migrate, so I would recreate the SQLite database after updating the model. The examiner accepted this approach.)Times asked 1Official solution
SimpleSQLite file-based DB — setup easy, MAD1 ke liye perfect. Production heavy traffic pe Postgres better.
Example
SQLALCHEMY_DATABASE_URI = 'sqlite:///app.db'Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
5
Difference between Cell Padding and Cell Spacing.Times asked 3Official 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
-
6
Explain CSRF with a real-life example.Times asked 1Official solution
SimpleCSRF: attacker tumhari logged-in browser se unwanted POST. CSRF token form mein proof hai request genuine hai.
Viva tipFlask-WTF CSRF protect karta hai. Token bina POST reject.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
7
What is Secret Key?Times asked 1Official solution
SimpleSECRET_KEY Flask ka secret jisse session cookies sign/encrypt hoti hain.
app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'dev-key')Iske bina session/flash unreliable ya insecure. Key leak = attacker session forge kar sakta hai.
Hardcode mat karo production mein — .env / environment variable. Flash messages bhi session use karti hain, isliye SECRET_KEY se related hain.
Hataane pe session kaam nahi / warning. Change karne pe purane sessions invalid.Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
8
Explain how the Jinja template engine works.Times asked 1Official solution
SimpleJinja2 Flask ka template engine — HTML ke andar {{ }} variables, {% %} logic.
Example
{% for lot in lots %} <li>{{ lot.name }} — {{ lot.spots }}</li> {% else %} <p>No lots</p> {% endfor %}Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
9
Explain {{ }} ( Expression Delimiters ) and {% %} ( Statement Delimiters).Times asked 1Official solution
SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.
Viva tipFunction signature + 3-4 important lines + edge case.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
10
Explain Template Inheritance.Times asked 1Official solution
SimpleBase template pe navbar/footer, child pages {% extends %} + {% block %} se content bharte hain. DRY.
Example
{# base.html #} {% block content %}{% endblock %} {# home.html #} {% extends 'base.html' %} {% block content %} <h1>Home</h1> {% endblock %}Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet