-
1
asked to do checksum, i asked for downloading from portal - agreedTimes asked 2Official solution
SimpleExaminer portal wala submitted ZIP chahta hai. Local extra changes mat dikhana.
Suggested flow1) Portal ZIP download
2) Extract
3) venv + pip install -r requirements.txt
4) flask run / python app.pyCommunity answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
2
demoTimes asked 12Official 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
-
3
where is token storedTimes asked 2Official solution
SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.
Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.
Login pe server secret se HMAC (HS256). Har API
Authorization: Bearer <token>.
Expiryexp. Change payload → signature fail → 401.Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.
Example
eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature # Authorization: Bearer <token>Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.
Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.
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
how did you do cachingTimes asked 2Official 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
-
5
show caching in codeTimes asked 2Official solution
SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.
Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.
Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.
Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai — isliye write pe invalidation zaroori hai.
Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis +
@cache.cachedcode dekhta hai.Example
@cache.cached(timeout=50, query_string=True) @app.route('/api/shows') def shows(): return jsonify([s.serialize() for s in Show.query.all()])Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad
cache.delete('venues').Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.
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
RBACTimes asked 4Official solution
SimpleRBAC = Role Based Access Control. Roles (admin/user) se permissions milti hain, har user pe alag list nahi.
Example
if current_user.role != 'admin': flash('Not allowed') return redirect(url_for('user.home'))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
explain your ORM modelTimes 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
-
8
what is cascading in your databaseTimes asked 2Official solution
SimpleCASCADE = parent gaya to bacche bhi. Restrict = pehle bacche sambhalo.
ON DELETE CASCADE SQL. SQLAlchemy cascade='all, delete-orphan' collection se orphans.
Opposite auto nahi — child delete se parent nahi marata.Venue delete: bookings restrict (safer viva) ya cascade+cancel policy. Examiner design poochta hai.
ON UPDATE CASCADE PK change — rare. SET NULL, RESTRICT bhi options.
Example
shows = db.relationship('Show', cascade='all, delete-orphan', back_populates='venue')Project example: Show belongs Venue delete-orphan. Booking venue pe restrict — 'reassign first'.
Viva tipVenue delete pe bookings: restrict (mat delete) ya cascade+refund policy. Examiner design poochta hai. Cascade UPDATE bhi hota hai (PK change) — rare.
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
what are anchor tagsTimes asked 2Official solution
SimpleHTML structure, CSS styling. Templates mein semantic tags + classes. Responsive ke liye viewport + flex/grid/bootstrap.
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
how is admin createdTimes asked 2Official 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
-
11
what are foreign keys in your modelsTimes asked 2Official solution
SimpleForeign key dusri table ke PK ko point karti hai — relationship banati hai.
Example
lot_id = db.Column(db.Integer, db.ForeignKey('lot.id'), nullable=False)Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
12
what happens to the spots, if a lot is deletedTimes asked 2Official 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