Generally calm and student-friendly. Described as nice/helpful by students
Questioning style
Often probes theory concepts. Expects you to know and possibly modify your project code
Preparation tips
• Conclusion: Polite and gentle Man...
• Overall the examiner was chill at last he gave the positive feedback
• overall the Level1_95 proctor was chill and also gave me positive feedback
• very patient and chill guy and understanding, my system got overloaded mid viva so he waited patiently and even allowed me to proceed with the camera off till I showed the demo.
• Proctor was nice, gave some time as faced some issue while creating venv, prepare basics
• Very chill proctor. Go through code ones and stick to the other question in this sheet of same Proctor. Best of luck
• keep calm go though the code you have written know everyline about it
chill protector give positive feedback to me
• Overall Good guy gave a affirmative feedback and asked to prepare well for Level_2
• Proctor was quite scilent person didn't speak and say anything.... kind of not interested in taking viva
• The proctor was quiet. I didn't know I was going good or not. So, I asked for feedback myself. He gave positive response but I still can't say he was actually satisfied.
• Just know your project
• backend was very important to him
• Just follow this sheet for this proctor, he's very polite and gave a good feedback as well
my viva was over within 15mins
• He is chill overall, just be confident and wait patiently until he asks next question
• Know your code properly, like the functionalities and html.
• He told to focus more on theory for level 2 viva
Then told to show demo and in between asked about how you are blocking the students from applying multiple times then told to explain code in 5 mins
•Asked to code a simple route where two num are give return sum
Sheet responseMAD1
Shared viva questions from response sheet: Authentication vs Authorisation; How did I stop student from duplicate application; Asked me to explain a part of the html code
Questions remembered
Authentication vs Authorisation
How did I stop student from duplicate application
Asked me to explain a part of the html code
Types of HTTP requests
Checked my functions and checked of I have created the required functions
Code - Add two numbers and return sum
RamyaMAD1
Know your code properly, like the functionalities and html.
Questions remembered
Asked to show all html files
asked to go to the admin html file and asked to explain 146 , which was a jinja for loop
asked http requests
asked template inheritance
Sheet responseMAD1
He is chill overall, just be confident and wait patiently until he asks next question
Questions remembered
Id card
Github repo-commits and collaborators
Download, setup and show demo
Asked me to close the app and Asked what happens when a student tries to apply for same drive twice(i had showed him on demo) - just to check if I know the features of app exactly, and Asked me to show where I have implemented that in code
Explain http request methods
Authentication vs authorization
Write a register route to fetch name and class of a student on notepad
Said that will be the end of level 1... and gave feedback that the app looks good, and that I am aware of what's going on too, Asked me to brush up on the theory part, and I will be good to go
Sheet responseMAD1
Just follow this sheet for this proctor, he's very polite and gave a good feedback as well my viva was over within 15mins
Questions remembered
show ID
show github and some files in it
download from the vivaportal, no need for checksum
asked me showcase the file, interuppted me after a min to ask questions
did u use template inheritance, cascading and what they are
did u stop a student from applying to the same drive again, how
https methods explain
write a code in notepad taking 2 num from the user and printing their sum with "hello"
what is lazy=true
explain some stuff from the admin dashboard html file
el wiwiMAD1
Just know your project and he's nice
Questions remembered
• demo of admin,company,student
• template inheritence
• https methods
• asked to explain line containg jinja2 templating
• asked me to write a route which gets 2 var from html form and basically add them
Sheet responseMAD1
backend was very important to him
Questions remembered
Interview Flow Summary
Asked to show ID card
Asked to log in to admin dashboard and demonstrate functionality
While explaining company module:
Asked about logic for student applying to a drive
Asked how you prevent duplicate applications
You hadn’t implemented it
Asked how you would implement it → slight confusion, but logic idea was correct (placement mistake)
🔹 Technical Deep Dive
Asked to demonstrate the full application
You used this to buy some time
Interrupted and asked to:
Show frontend files
Appreciated your frontend structure/organization
🔹 Code Review
Asked to:
Explain models file → you explained well (no follow-up questions)
Show all project files one by one
Noted:
One unused file in your project
🔹 Conceptual Questions
Asked:
How to change admin dashboard appearance
You mentioned Flexbox
Also acknowledged limited frontend expertise (honest answer)
Asked:
About HTTP requests (types of requests)
🔹 Key Observations
Strong points:
Good frontend structure
Decent model explanation
Weak points:
Struggled with real-time logic implementation (duplicate apply)
Slight hesitation under pressure
RkMAD1
Shared viva questions from response sheet: ask me; to show the id card,; to login in admin dashboard and show me the functionality,
Questions remembered
ask me
to show the id card,
to login in admin dashboard and show me the functionality,
while i was show showing him company part, he ask me to show the logic of how the student applied in the drive, how did i stopped the student to in the same drive again and again, which unfortunately I have not applied. so he ask how would you do it right now, It was silence for 2 mins, then he emphasis just tell me don't implement that, which i totally messed up, but my logic was right, place i was telling to implement was wrong, then he ask me to demonstrate the whole application, I took this opportunity to waste the time as much as I can, then he stopped me in between and ask me to show the frontend files, He likes how i manage the frontend part,
then he ask me to show how I implement the models file. Which I explained, no questions asked on that,
then he ask me to show all the files, one by one, one of my file was unused, which he noted
and then ask me if I want to change the appearance of my admin dashboard, he gave the scenario on which i told him to "I would be using flexbox, but I am not good in frontend, there might be other options too."
Akash MauryaMAD1
Just know your project
Questions remembered
Http methods explain all
Write a helloworld route in notepad
Ask for flash messages
Explain block routes for student
And login logic explain
That is for level 1 says thankyou
VMAD1
The proctor was quiet. I didn't know I was going good or not. So, I asked for feedback myself. He gave positive response but I still can't say he was actually satisfied.
Questions remembered
Shown id card digitally.
Github repo
Checked Collaborator access
Asked for LLM Declaration percentage in project report.
Project demo
Asked to explain backend for patient booking. END - he said "that's it for level 1"
StrangerMAD1
Proctor was quite scilent person didn't speak and say anything.... kind of not interested in taking viva
Questions remembered
demonstrate project,
explain 1 whole route,
open dashboard html page,
what is cascading,
Open notepad and write a code takes two nums as an inputs and return it's sum with a string hello
Sheet responseMAD1
Overall Good guy gave a affirmative feedback and asked to prepare well for Level_2
Questions remembered
LEVEL - 1 :--
Checked basic functionality
Asked what is MVC
Asked about Cascading
Asked to open notepad and write a route which takes two nums as an inputs and return it's sum with a string hello
Amit ShivhareMAD1
keep calm go though the code you have written know everyline about it chill protector give positive feedback to me
Questions remembered
first asked to show id,
then asked to show demo
asked functionallity
then asked to explain one route of my prject
then asked to explain the one html file
what do you know about template inheritance
different http methods
RaghavMAD1
Very chill proctor. Go through code ones and stick to the other question in this sheet of same Proctor. Best of luck
Questions remembered
check for ID_card
check for github collaborator access
use only code download from viva portal then start application
LLM percentage should be given in report
application complex scienarios like in vehicle parking app if a person books parking site and admin delete the area of parking then what will happen.
Code question like where you handeled this error and template inheritance (show example in code he is very happy with that)
Authorization vs authentication(show example)
what is cascading?
Sheet responseMAD1
Proctor was nice, gave some time as faced some issue while creating venv, prepare basics
Questions remembered
Define authorisation and authentication
Cascading in model
Template inheritance
NoMAD1
very patient and chill guy and understanding, my system got overloaded mid viva so he waited patiently and even allowed me to proceed with the camera off till I showed the demo.
Questions remembered
Asked : Idcard,
GitHub,
download from portal,
demo all features,
asked various methods of http,
diffence b/w post and put ,
what methods I used how and that's it. Gave positive feedback
Ishaan SawantMAD1
overall the Level1_95 proctor was chill and also gave me positive feedback
Questions remembered
demo of code 2.what is authentication vs authorisation 3.what are the different HTTP methods
Sheet responseMAD1
Shared viva questions from response sheet: What are the HTTP method requests? Difference between push and put? what is true=Lazy in your model?
Questions remembered
What are the HTTP method requests? Difference between push and put? what is true=Lazy in your model?
Mahaprasad NandaMAD1
Overall the examiner was chill at last he gave the positive feedback
Questions remembered
ID card
GitHub repo
Project report(To check about the declaration of used of LLM)
Demo(CRUD operation)
cascading in databases
show me the jinja portion you have used in your project and explain what it does
Sheet responseMAD1
Shared viva questions from response sheet: Show Demo; What is MVC; Explain the HTTP request methods in one line each
Questions remembered
Show Demo
What is MVC
Explain the HTTP request methods in one line each
What is template inheritance
Show one example of jinja templating in your code
Khushi ChoudharyMAD1
Conclusion: Polite and gentle Man...
Questions remembered
asked about GitHub form and collaboration
ID Card
checksum
Demonstration of project functionalities
extra add on u did in ur project other than mentioned ones
2.How do you ensure that a Student cannot register to the same Drive more than once? Show me which part of the code does that.
Times asked2
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
3.Open notepad and write an API that calculates sum of 2 numbers
Times asked2
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
5.List all API methods - GET,POST,PATCH,PUT,etc and explain them.
Times asked2
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
6.Walkthrough of project
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: He just listened and didn't intervene or tell me that I answered correctly or wrongly. Will mostly give marks ig. Was chill and the viva was over within 23 minutes.
- then asked if i prevent a student from applying to the same drive, i showed code where i applied it
Times asked2
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
- then asked about lifecycle hook
Times asked2
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
- then, asked me to open notepad and write a route to sum two digit and return a json response
Times asked2
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
- then asked me to show the backend job export csv, there was some problem with CORS that took a lot of time. At then end, i solved it, then hurriedly show the email receiving in mailhog
Times asked1
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Very Good proctor and Just practice the question,he asks a lot from the sheet, You will be fine. Even when my code didn't run and i fixing the issue, he was patient and understanding. only when it was taking to long, he said to move on. But he passed me in viva level 1
Show you id, GitHub repo and download your file from the viva booking portal.
Times asked2
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
Did you use Vue CLI or CDN and what's the difference.
Times asked1
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
Write an app route for adding two numbers by passing arguments and write the message hello in notepad.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: 1. Will ask about EMAIL system and AI percentage in the report.
2. Take your time for setup and don't worry if errors pop up. Have your file where you have stored the commands to run on hand.
3. Very calm proctor.
- Asked that should I have mentioned of Ai usage percentage (I said No, I forgot😶🌫️)
Times asked2
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
- Asked that I have implemented Role Based Access Control and Tokens (I explained him whatever I had done)
Times asked2
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
- Asked to open Notepad and then asked to create a hello world route taking 2 integers as input, and returning their sum as output with a message hello and source code 302
Times asked1
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
- Asked Cascade in database,
Times asked2
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
I guess asked one more question (I forgot)
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Nice Proctor, just relax and answer whatever he asks with calm mind
What you have used for token based and role based system.
Times asked2
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
Difference between vue cli and cdn
Times asked1
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: In my opinion one of the best, he was chill even had a bit of convo ai related after the viva and was chill if you can't remember a think he said google it man!
- RBAC and Token based authentication, which library used for tokens?
Times asked1
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 cascading in database
Times asked2
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
---------- Done in 15 minutes ----------
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: He is very calm, patient and understanding. My backend celery beat and mail report was taking time but he understood and was patient. So, just be confident and present well.
Auth: session['user_id'] + role check. CRUD: add/commit, query.all, field update, delete.
Live change maange to: related model → route → template, phir browser refresh karke dikhao.
Example (generic create):
obj = Model(name=request.form.get('name'))
Same headers, encrypted channel. MITM se password/token bachao. Local viva HTTP OK.
HTTP/1.1 version keep-alive. TCP neeche, TLS security layer, SMTP mail alag.
Browser + API ke beech extra darwaze: CORS origin allow, HTTPS encrypt transit, CSRF cookie-auto-send attack, XSS HTML inject, SQL injection raw query.
MAD2 SPA: Vue :8080 Flask :5000 → Flask-CORS. JWT localStorage XSS se chori ho sakta — v-html user input pe avoid. Password Network tab localhost pe dikhega; prod HTTPS, response mein password echo nahi.
401 unauthenticated, 403 unauthorized, 400 validation. Hash one-way — SHA decrypt nahi hota. Secret key .env, GitHub pe nahi.
Project example: Dev localhost http. Production https:// + cert.
Suggested flow1) Concept kya hai?
2) Mere code mein kahan?
3) Example / demo
4) Edge case
Example
# related file: models.py / routes / template
# formula: request → check/auth → DB → render/redirect
Viva 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
21
🔹 Key Observations
Times asked1
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
22
Strong points:
Times asked1
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
23
Good frontend structure
Times asked1
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
24
Decent model explanation
Times asked1
Official 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
25
Weak points:
Times asked1
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
26
Struggled with real-time logic implementation (duplicate apply)
Suggested flow1) Concept kya hai?
2) Mere code mein kahan?
3) Example / demo
4) Edge case
Example
# related file: models.py / routes / template
# formula: request → check/auth → DB → render/redirect
Viva 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
Advice: The proctor was quiet. I didn't know I was going good or not. So, I asked for feedback myself. He gave positive response but I still can't say he was actually satisfied.
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
Advice: Proctor was nice, gave some time as faced some issue while creating venv, prepare basics
4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.
Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.
Example
POST /api/venues
PUT /api/venues/1 {all fields}
PATCH /api/venues/1 {only name}
Project example: POST /api/venues create. PUT /venues/1 saari fields. PATCH sirf name.
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
what methods I used how and that's it. Gave positive feedback
Times asked1
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: very patient and chill guy and understanding, my system got overloaded mid viva so he waited patiently and even allowed me to proceed with the camera off till I showed the demo.
extra add on u did in ur project other than mentioned ones
Times asked1
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
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
Models explanation
Times asked1
Official 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
6
authentication vs Authorisation
Times asked1
Official solution
SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).
Example
# auth
if check_password_hash(user.password, pwd):
session['user_id'] = user.id
# authz
if user.role != 'admin':
abort(403)
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
fetch vs put
Times asked1
Official solution
SimpleUngli rakhe to 4-line formula — panic ki jagah structure.
Advice: He just listened and didn't intervene or tell me that I answered correctly or wrongly. Will mostly give marks ig. Was chill and the viva was over within 23 minutes.
Suggested flow1) Concept kya hai?
2) Mere code mein kahan?
3) Example / demo
4) Edge case
Example
# related file: models.py / routes / template
# formula: request → check/auth → DB → render/redirect
Viva 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
3
- then asked if i prevent a student from applying to the same drive, i showed code where i applied it
Times asked2
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
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
- then asked about lifecycle hook
Times asked2
Official solution
SimpleLifecycle = component ki zindagi ke stages. API call tab jab DOM ready ho — mounted.
created: instance bani, this data, DOM nahi. mounted/onMounted: page pe aa gaya — fetch, Chart.js, setInterval.
updated: data change ke baad. unmounted: cleanup (clearInterval) warna memory leak.
Dashboards onMounted isliye: canvas/API tab valid. created mein $el nahi.
@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
Advice: Very Good proctor and Just practice the question,he asks a lot from the sheet, You will be fine. Even when my code didn't run and i fixing the issue, he was patient and understanding. only when it was taking to long, he said to move on. But he passed me in viva level 1
@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
Advice: 1. Will ask about EMAIL system and AI percentage in the report.
2. Take your time for setup and don't worry if errors pop up. Have your file where you have stored the commands to run on hand.
3. Very calm proctor.
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.
What you have used for token based and role based system.
Times asked2
Official 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
Advice: In my opinion one of the best, he was chill even had a bit of convo ai related after the viva and was chill if you can't remember a think he said google it man!
SimpleLifecycle = component ki zindagi ke stages. API call tab jab DOM ready ho — mounted.
created: instance bani, this data, DOM nahi. mounted/onMounted: page pe aa gaya — fetch, Chart.js, setInterval.
updated: data change ke baad. unmounted: cleanup (clearInterval) warna memory leak.
Dashboards onMounted isliye: canvas/API tab valid. created mein $el nahi.
Viva tipcreated: data setup, DOM nahi. mounted/onMounted: $el mil gaya — fetch yahi. Dashboards isliye onMounted use karti hain.
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
- Is caching implemented?
Times asked1
Official solution
SimpleHaan Redis routes X demo hit miss. Nahi: kaise add karte — decorator + redis + invalidation.
Don't lie. Examiner code dekhega.
Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.
MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.
Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.
Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.
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
---------- Done in 15 minutes ----------
Times asked2
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: He is very calm, patient and understanding. My backend celery beat and mail report was taking time but he understood and was patient. So, just be confident and present well.
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.
Viva tipWorker + Redis bina Beat ke user-triggered chalega. Scheduled jobs ke liye Beat bhi chahiye.
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
Redis
Times asked6
Official solution
SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.
Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.
MAD2 mein Redis do kaam karta hai:
1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.
Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.
Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.
Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.
Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"
Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).
MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.
Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.
Project example: Bearer header. 401 pe redirect login.
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
Which library did you use for token-based authentication?
Times asked1
Official solution
SimpleNamed from requirements. import line dikhao.
Which framework/library token.
Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"
Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).
MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.
Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.
Project example: Don't say both if one.
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
Vue CLI vs Vue CDN. Which one did you use and why?
Times asked3
Official solution
SimpleCDN = Vue script tag se, jaise pen drive. CLI/Vite = poori factory (SFC, npm, bundle).
CDN: no build, chhote apps, exam PC pe Node nahi to bhi chal. Weak: no .vue compile, 3rd-party cache, scale/team.
CLI/Vite: Single File Components, env, code-split, production dist/. Scalable.
Examiner 'which + why' — jo use kiya wahi justify, doosra naam rato mat.
Example
<!-- CDN -->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
# Vite
npm run dev
npm run build
Viva tipCDN scalable large teams ke liye weak (no SFC compile, caching 3rd party). Examiner 'which + why' poochta hai — jo use kiya wahi justify 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
15
What are Vue Lifecycle Hooks?
Times asked5
Official solution
SimpleLifecycle = component ki zindagi ke stages. API call tab jab DOM ready ho — mounted.
created: instance bani, this data, DOM nahi. mounted/onMounted: page pe aa gaya — fetch, Chart.js, setInterval.
updated: data change ke baad. unmounted: cleanup (clearInterval) warna memory leak.
Dashboards onMounted isliye: canvas/API tab valid. created mein $el nahi.
Viva tipcreated: data setup, DOM nahi. mounted/onMounted: $el mil gaya — fetch yahi. Dashboards isliye onMounted use karti hain.
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
Which lifecycle hooks have you used?
Times asked1
Official solution
Simplemounted/onMounted data load. beforeUnmount cleanup. created if used. List 2 + why.
Which lifecycle hooks did you use.
Lifecycle = component ki zindagi: created (instance, DOM nahi) → mounted/onMounted (DOM ready — fetch, Chart.js yahi) → updated → unmounted (clearInterval).
Dashboard API created mein isliye nahi ki $el/canvas missing ho sakta. Composition API: onMounted(() => {}) setup ke andar. Options: mounted() method. Mix mat.
Examiner 'konsa hook use kiya' — related .vue kholo, line padh ke bolo.
Project example: Open files grep mounted.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
17
What is Redis?
Times asked21
Official solution
SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.
Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.
MAD2 mein Redis do kaam karta hai:
1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.
Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.
Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.
Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
18
Where have you used Redis?
Times asked2
Official solution
Simpledb indexes cache vs broker, ping, which keys, why used.
Physical RAM. Vue nahi. Hit miss. Celery alag.
Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.
MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.
Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.
Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.
SimpleHaan Redis routes X demo hit miss. Nahi: kaise add karte — decorator + redis + invalidation.
Don't lie. Examiner code dekhega.
Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.
MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.
Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.
Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.
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.
Repo → Settings → Collaborators → instructor added.
Commits: git log / GitHub History — regular commits better, ek dum 1 commit suspicious.
README + report mein AI usage likha hona chahiye agar use kiya.
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
Download the project from the Viva Portal.
Times asked7
Official solution
SimpleExaminer submitted ZIP chahta hai, local extra changes nahi.
Portal se ZIP download → extract → venv → pip install -r requirements.txt → flask run / python app.py.
Checksum maange to hash match karke dikhao. Camera/OPPE setup unke instructions.
Linux/Mac: paths, gunicorn; Windows paths alag ho to relative paths use karo.
Do browsers: admin + user parallel demo impressive lagta hai.
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
Show your project report (to verify LLM/AI usage declaration).
Times asked1
Official solution
SimpleSach bolo. AI se boilerplate/docs theek, logic samajh ke explain karo.
'Boilerplate aur CSS ke liye AI use kiya, models/routes khud design kiye. Report mein X% mention hai.'
Line-by-line nahi explain kar paoge to examiner pakad lega. Documentation: official Flask/SQLAlchemy + course lectures.
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
Demonstrate the complete application.
Times asked33
Official solution
SimpleDemo script pehle se practice karo, 5-7 minute, saari roles.
Suggested flow
1) Register/login user 2) Admin login — CRUD 3) Approval/blacklist 4) Booking/apply 5) Search 6) Validation edge (slots 0, duplicate) 7) Logout
Bolte-bolte dikhao: 'Yahan overbooking rokta hoon'. Code tab kholna jab poochhein.
Crash ho to debug calmly: terminal error, typo, DB path.
Mandatory features skip mat karna — examiner list tick karta hai.
Explain how you prevent duplicate submissions (e.g., student applying multiple times).
Times asked1
Official solution
SimpleDuplicate/overbook rokne ke liye DB constraint + route check dono.
Pehle query: Booking.query.filter_by(user_id=uid, trek_id=tid).first()
Agar exists: flash('Already booked'); return
Slots: if trek.available <= 0: reject else trek.available -= 1; commit
Race condition: unique(user_id, trek_id) constraint — do tabs se double click pe bhi ek hi row.
Blacklist: login pe is_blacklisted check.
Active drive limit: if Company ke paas status=open drive hai to naya mat banne do.
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 the backend logic for a booking/application workflow.
Times asked1
Official solution
Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.
1) Yeh file/line kya role hai (model / route / template / config)?
2) Input kahan se aata hai (form, URL <id>, session, JSON)?
3) DB pe kya query/write?
4) Output kya (render_template / redirect / jsonify)?
Example
@app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.
Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason 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
10
Explain how you would implement duplicate prevention if it is not already implemented.
Times asked1
Official solution
SimpleDuplicate/overbook rokne ke liye DB constraint + route check dono.
Pehle query: Booking.query.filter_by(user_id=uid, trek_id=tid).first()
Agar exists: flash('Already booked'); return
Slots: if trek.available <= 0: reject else trek.available -= 1; commit
Race condition: unique(user_id, trek_id) constraint — do tabs se double click pe bhi ek hi row.
Blacklist: login pe is_blacklisted check.
Active drive limit: if Company ke paas status=open drive hai to naya mat banne do.
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
Explain models.py.
Times asked21
Official solution
Simplemodels.py har table ki class hai — columns, PK/FK, relationships. Yeh Model layer hai.
Viva mein file khol ke bolo:
1) Kaunsi classes/tables hain (User, Role-specific, Booking...)
2) Har table ka kaam 1 line
3) Relationships: 1-1 / 1-M / M-M, backref, cascade, lazy
4) Constraints: unique email, nullable, default status
Example skeleton
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String(120), unique=True, nullable=False)
role = db.Column(db.String(20), default='user')
bookings = db.relationship('Booking', backref='user', cascade='all, delete-orphan')
ER diagram: rectangles entities, lines relationships, PK/FK mark. Schema = yahi structure.
Tables create: db.create_all() ya migrations. SQLite file SQL viewer se dikha sakte ho.
Ek route explain karne ka template:
1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect
Example GET+POST same route: GET form, POST save.
Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.
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
Explain the login logic.
Times asked1
Official solution
SimpleLogin GET form dikhata hai, POST credentials check karke session set karta hai.
@app.route('/login', methods=['GET','POST'])
def login():
if request.method == 'POST':
u = User.query.filter_by(email=request.form.get('email')).first()
if u and check_password_hash(u.password, request.form.get('password')):
if getattr(u, 'blacklisted', False):
flash('Blocked'); return redirect(url_for('login'))
session['user_id'] = u.id
session['role'] = u.role
return redirect(url_for('dashboard'))
flash('Invalid')
return render_template('login.html')
Logout: session.clear(); redirect login. Incognito alag cookie jar — logged out dikhega.
Single login page: role se redirect alag dashboards.
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
Explain the logic for blocking specific users/routes.
Ek route explain karne ka template:
1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect
Example GET+POST same route: GET form, POST save.
Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.
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
Show and explain all project files.
Times asked1
Official solution
Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.
1) Yeh file/line kya role hai (model / route / template / config)?
2) Input kahan se aata hai (form, URL <id>, session, JSON)?
3) DB pe kya query/write?
4) Output kya (render_template / redirect / jsonify)?
Example
@app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.
Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason 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
16
Show all HTML files.
Times asked1
Official solution
SimpleDemo script pehle se practice karo, 5-7 minute, saari roles.
Suggested flow
1) Register/login user 2) Admin login — CRUD 3) Approval/blacklist 4) Booking/apply 5) Search 6) Validation edge (slots 0, duplicate) 7) Logout
Bolte-bolte dikhao: 'Yahan overbooking rokta hoon'. Code tab kholna jab poochhein.
Crash ho to debug calmly: terminal error, typo, DB path.
Mandatory features skip mat karna — examiner list tick karta hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
17
Explain a Jinja for loop from your HTML template.
Times asked1
Official solution
SimpleJinja2 Flask ka template engine hai. HTML ke andar Python-jaisa data print/loop/if kar sakte ho.
Bina Jinja har user ke liye alag HTML file. Jinja se ek template + data.
{{ user.name }} print, {% for x in items %} loop, {% if %} condition, {% extends %} layout.
Example routereturn render_template('dash.html', treks=treks)
dash.html: {% for t in treks %}<li>{{ t.name }}</li>{% endfor %}
HTML files templates/ folder mein isliye kyunki Flask default wahan dhundhta hai. render_template Jinja ko run karta hai.
Boolean Jinja handle karta hai: {% if user.is_admin %}.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
18
Explain where you handled a specific error in your project.
Times asked1
Official solution
Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.
1) Yeh file/line kya role hai (model / route / template / config)?
2) Input kahan se aata hai (form, URL <id>, session, JSON)?
3) DB pe kya query/write?
4) Output kya (render_template / redirect / jsonify)?
Example
@app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.
Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason 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
19
What is MVC?
Times asked9
Official solution
SimpleMVC = Model-View-Controller. Code ko 3 hisson mein baant ta hai taaki mix na ho.
Model: data + DB. models.py — User, Trek, Booking classes.
View: jo user dekhta hai. templates/*.html + Jinja.
Controller: beech ka logic. routes / app.py — request lo, model se data, view ko do.
Example flow (register):
Browser form POST → Controller register() → User model save → redirect → View dashboard.html
Draw: Browser → Controller → Model → DB, phir Controller → View → Browser.
ORM na ho to bhi MVC ho sakta hai — Model raw SQL functions ho sakte hain. Structure matter karta hai, library nahi.
MVP/MVVM doosri architectures hain; MAD1 mein MVC expected hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
20
Difference between Authentication and Authorization (with examples from your project).
Times asked1
Official solution
SimpleAuthentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"
Authentication: login. Username + password check karke prove karte ho ki tum genuine user ho. Success pe session/token milta hai.
Authorization: uske baad role check. Admin hi parking lot delete kar sakta hai, normal user nahi.
Example (Flask):
# Authentication
if user and check_password_hash(user.password, form_password):
session['user_id'] = user.id
# Authorization
if session.get('role') != 'admin':
abort(403) # logged in ho, lekin allowed nahi
Project example: student login = authentication. Student admin dashboard nahi khol sakta = authorization.
Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+).
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
21
Explain all HTTP request methods.
Times asked3
Official solution
SimpleHTTP methods batate hain request kya karna chahti hai. Common: GET POST PUT PATCH DELETE.
GETread/fetch. Safe, URL se. Page kholna, search.
POSTcreate/submit. Form, login.
PUTpoora replace/update. Idempotent.
PATCHpartial update.
DELETEhataana.
HEAD: sirf headers. OPTIONS: CORS preflight.
Flask: @app.route('/x', methods=['GET','POST'])
Agar methods na likho to default sirf GET.
HTML form native sirf GET/POST. PUT/DELETE JS/fetch ya hidden _method se.
GET se data fetch ho sakta hai, create nahi karna chahiye. POST se theoretically fetch ho sakta hai lekin cache/semantics galat.
DELETE fetch ke liye nahi. GET POST ka kaam officially nahi karta — side effects GET pe mat 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
22
Difference between POST and PUT.
Times asked4
Official solution
SimplePOST nayi cheez create karta hai, PUT existing cheez ko replace/update karta hai.
POST /books → naya book add. Har baar naya ID banega. Idempotent nahi — 2 baar POST = 2 records.
PUT /books/5 → id=5 wale book ko poora update. Same PUT dubara bhejo to same result (idempotent).
PUT se create bhi ho sakta hai (agar ID client decide kare), lekin REST convention: create = POST, replace = PUT, partial = PATCH.
HTML <form> PUT nahi bhejta, isliye Flask apps mein edit pe bhi POST use hota hai. Examiner ko yeh reason clearly bolo.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
23
Difference between PUT and FETCH.
Times asked1
Official solution
SimpleGET read karta hai, PUT existing resource replace/update karta hai.
GET /users/1 → data lao, side-effect nahi. PUT /users/1 → poora user update, idempotent.
PUT vs FETCH: FETCH HTTP method nahi, JS fetch() function hai jo GET/PUT/POST kuch bhi bhej sakta hai.
Search GET, edit-save PUT/POST. GET se create 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
24
What is Template Inheritance?
Times asked10
Official solution
Simpleextends poora layout inherit karta hai, include chhota piece insert karta hai.
extends: child page base.html ka structure use karti hai, blocks override karti hai. Ek hi parent.
include: navbar.html / footer.html jahan chaho insert. Kai baar use ho sakta hai.
base.html:
{% block content %}{% endblock %}
home.html:
{% extends 'base.html' %}
{% block content %}<h1>Home</h1>{% endblock %}
{% include 'navbar.html' %} → navbar har page pe
Fayda: header/footer ek jagah, change once — saari pages update. MAD1 mein almost har project use karta hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
25
What is Cascade (Cascading) in databases?
Times asked1
Official solution
SimpleCascade parent ke saath child pe automatic action (generally delete).
Company delete → uski drives bhi delete, warna orphan rows / FK error.
SQLAlchemy: db.relationship('Drive', cascade='all, delete-orphan', backref='company')
SQL: ForeignKey(..., ondelete='CASCADE')
Cascade sirf delete nahi: save-update, merge, refresh-expire, expunge, delete-orphan.
Cascade Update: parent PK change to child FK update (rare, PK mat badlo).
Parent delete jab children active hon: constraint error, ya cascade se children gayab, ya pehle children handle karo — design choice examiner poochta hai.
CSS cascading alag topic hai (styles inherit/override).
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
26
What does lazy=True mean in SQLAlchemy?
Times asked1
Official solution
SimpleSQLAlchemy Python ka sabse popular ORM hai. MAD1 mein Flask-SQLAlchemy wrapper use hota hai.
db = SQLAlchemy(app)
class Book(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(80), nullable=False)
Operations: db.session.add(obj), .commit(), .delete(obj), Model.query.all(), .filter_by(), .get_or_404(id).
db.Model ek class hai (function nahi). db object engine + session + metadata hold karta hai.
SQLALCHEMY_TRACK_MODIFICATIONS=False extra signals band karta hai, performance warning hatati hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
27
What are Flash Messages?
Times asked1
Official solution
Simpleflash() ek baar dikhne wala message session mein store karta hai — 'Login successful'.
flash('Invalid password', 'danger')
Template
{% with messages = get_flashed_messages(with_categories=True) %}
JS se auto-hide bhi kar sakte ho.
SECRET_KEY chahiye kyunki flash session use karta hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
28
If an admin deletes a parking lot (or similar parent record) that has active bookings, what will happen?
Times asked1
Official solution
Yeh MAD-1 viva question tumhare project ke context se linked hai. Short answer is structure se do:
Pehle 1 line definition/purpose, phir tumhare project ka example, phir chhota code/flow.
Auth: session['user_id'] + role check. CRUD: add/commit, query.all, field update, delete.
Live change maange to: related model → route → template, phir browser refresh karke dikhao.
Example (generic create):
obj = Model(name=request.form.get('name'))
hello.html: <h1>Hello {{ name }}</h1>
POST-only: @app.route('/x', methods=['POST'])
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
31
Write a route that accepts two numbers as input and returns their sum along with the string "Hello".
Times asked1
Official solution
SimpleURL parameters se numbers lo, calculate karke return/render.
@app.route('/sum/<int:a>/<int:b>')
def add(a, b):
return f'Hello, sum is {a+b}'
Product: a*b. Square: n*n. Even/odd: 'even' if n%2==0 else 'odd'.
Form se: request.form.get('a', type=int). Background color even/odd:
color = 'green' if n%2==0 else 'red'
return render_template('page.html', color=color)
CSS: body { background: {{ color }}; }
Patternfilter query → template/JSON. Examiner jo entity bole us class ka naam use karo.
@app.route('/admin/blacklisted')
def blacklisted():
rows = User.query.filter_by(is_blacklisted=True).all()
return render_template('list.html', rows=rows)
JSON: return jsonify([{'id': r.id, 'name': r.name} for r in rows])
ID se: User.query.get_or_404(id)
Do filters: .filter(Drive.approved==False, Drive.title=='Data Scientist')
Join example: students jinhone blacklisted company ke drive pe apply kiya — join Application-Drive-Company.