-
1
ADMIN LOGINTimes asked 1Official solution
SimpleLogin flow pehle poochta hai "tu kaun hai?", token milne ke baad har API pe wohi proof dikhate ho.
Authentication step: Vue form email + password JSON POST karta hai. Flask user dhoondhta hai,
check_password_hashse prove karta hai ki tum genuine ho. Galat 401. Sahi pe JWT + role milta hai — yeh session/token hai.Vue
localStorage(ya cookie) mein token rakhta hai, dashboard perouter.push. Aage ki harfetchheader:Authorization: Bearer <token>.@jwt_requiredidentity check (authentication).@roles_required('admin')permission check (authorization) — logged in ho, lekin allowed nahi to 403.Validation alag cheez hai: empty email, password 8+ — form sahi bhara hai ya nahi. Woh identity prove nahi karta.
Logout = client token delete + login page. Server blacklist optional. Password response JSON mein kabhi mat bhejo.
Example
# Authentication @app.route('/api/login', methods=['POST']) def login(): u = User.query.filter_by(email=data['email']).first() if not u or not check_password_hash(u.password, data['password']): return jsonify(msg='bad'), 401 return jsonify(token=create_access_token(u.id), role=u.role) # baad ki APIs # Authorization: Bearer <token> if current_user.role != 'admin': abort(403)Project example: Login.vue POST /api/login → token LS → interceptor. Student token se admin route = 403. Empty form = validation, galat password = 401.
Viva tipNetwork tab mein password body dikhega localhost pe — prod HTTPS. Response mein hash/password echo 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
-
2
ADD A TREKTimes asked 1Official solution
SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).
Viva tip1 minute elevator pitch ready rakho, phir demo.
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
DELETE A TREKTimes asked 1Official solution
SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).
Viva tip1 minute elevator pitch ready rakho, phir demo.
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
EDIT A TREKTimes asked 1Official solution
SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).
Viva tip1 minute elevator pitch ready rakho, phir demo.
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
GO BACK TO LOGIN PAGETimes 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
-
6
GO TO CODE OPEN MODELS.PYTimes 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
-
7
WHAT IS BACKREF, BACKPOPULATES, PRIMARY KEY, FOREIGN KEYTimes asked 1Official solution
SimplePrimary key row ka unique identity — usually id Integer autoincrement.
Example
id = db.Column(db.Integer, primary_key=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
-
8
MAKE A NEW COLUMN TO THE REGISTER PAGETimes asked 1Official 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
-
9
MAKE CONFIRM PASSWORDTimes 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
-
10
CONNECT CONFIRM PASSWORD TO BACKENDTimes 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
-
11
WRITE A ROUTE TO FETCH USERID WITH HELP OF TREKIDTimes 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
-
12
IS ASSIGNING A STAFF IMPORTANT OR OPTIONALTimes 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
-
13
IF YOUR DONT WRITE RETURN RENDER_TEMPLATE WHAT WILL HAPPENTimes asked 1Official solution
Simplerender_template Jinja HTML file ko data deke final HTML banata hai.
Example
return render_template('dashboard.html', user=user, lots=lots)Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
14
WHAT IS HTTP METHODSTimes asked 1Official solution
SimpleHTTP verbs REST ke tools. Methods HTTP ke hain, REST unhe convention se use karta hai.
GET read cacheable. POST create payload. PUT replace. PATCH patch. DELETE remove.
GET exists bina REST ke bhi — browser address bar.
HTTP verbs + status REST ki zabaan. GET read, POST create, PUT replace, PATCH partial, DELETE remove. GET typically no body.
Status: 200 OK, 201 created, 202 accepted (Celery task), 400 bad input, 401 no/bad token, 403 role nahi, 404 missing, 409 conflict (double book), 500 server.
AJAX/fetch page reload nahi. SPA poori isi pe. Postman se bina Vue ke API prove karo — examiner pasand.
Example
GET /api/venues POST /api/venues PUT /api/venues/1 DELETE /api/venues/1Project example: resources.py methods list. Postman 4-5 calls.
Viva tipGET typically no body (cacheable). POST/PUT/PATCH haan payload. PUT idempotent, POST nahi.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
15
WHAT IS BOOTSTRAP WHERE HAVE YOU USEDTimes asked 1Official solution
SimpleBootstrap CSS framework — grid, navbar, buttons jaldi. CDN ya downloaded files.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
16
HOW MUCH AI HAVE YOU USEDTimes 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