-
1
Change the colour of the form bodyTimes asked 2Official solution
SimpleORM = Object Relational Mapping. Tables → Python classes. Raw SQL kam likhte ho.
Example
class User(db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True) User.query.get(5) # SELECT ... WHERE id=5Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
2
Write route which takes a username and prints its role.Times asked 2Official 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
-
3
Difference between filter and filter_byTimes asked 1Official solution
Simplefilter_by simple keyword arguments, filter full SQL-style conditions.
User.query.filter_by(email='a@x.com').first() # column=value, easy User.query.filter(User.age > 18, User.city == 'Delhi').all() # comparisons, OR, LIKEfilter_by sirf equals ke liye. Greater-than, LIKE, joins ke liye filter() use karo.
Example search
Trek.query.filter(Trek.name.ilike(f'%{q}%')).all()Yeh filter_by se nahi hoga.
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
Create 2 staffs and approve them .Times asked 2Official solution
SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.
Suggested flow1) Register/login user
2) Admin login — CRUD
3) Approval/blacklist
4) Booking/apply + edge case
5) Search
6) LogoutViva tipBolte-bolte dikhao. Code tab kholna jab poochhein.
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
Blacklist one of the staffs and try to loginTimes asked 2Official solution
SimpleBlacklist/block: user.status='blocked' check login/booking pe. Temporary flag vs hard delete permanent.
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
Show where this logic is implementedTimes asked 1Official solution
SimpleDemo 5–7 min ki kahani: saari roles, koi milestone skip nahi, bolte-bolte dikhao.
Examiner list tick karta hai. Crash ho to panic nahi — terminal error padho.
Code tab kholna jab poochhein. Extra uncommitted features mat dikhana agar portal ZIP mein nahi.
Suggested flow1) Register/login user
2) Admin login — CRUD
3) Approval/blacklist
4) Booking/apply + edge case
5) Search + charts
6) CSV export / email job
7) LogoutProject example: Jo statement/parking/jobs/tickets hai uske user+admin journeys.
Viva tipBol: 'Yahan overbooking rokta hoon'. Mandatory features pehle, polish baad.
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 serverTimes asked 1Official solution
SimpleMAD1 typical: Browser → Flask routes → validate/auth → SQLAlchemy → SQLite → Jinja response.
Suggested flowRequest → Route → Auth check → DB → render_template / redirect
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet