-
1
mam was very calm and polite. 1)Id card 2)Explain the folder structure of your app and MVC of your app?Times asked 1Official solution
SimpleCamera pe clearly college/IITM ID dikhao — naam aur photo match hone chahiye.
Viva tipPehle se ID haath mein rakho, glare mat aane do. Iske baad GitHub + project run.
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 the models.py and the relationship.Times asked 1Official solution
Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.
Example
spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')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
What is backref and back populates?Times asked 1Official solution
Simplebackref reverse attribute auto banata hai. back_populates dono sides explicitly naam dete ho — clearer.
Example
# backref spots = db.relationship('Spot', backref='lot') # spot.lot available # back_populates spots = db.relationship('Spot', back_populates='lot') # Spot.lot = db.relationship('Lot', back_populates='spots')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
if the field unique=True and you keep inserting duplicate values then what will happen?Times 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
-
5
Explain the role based access in your controllers.py?Times asked 1Official 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
-
6
show and explain the blacklist Route?Times asked 1Official 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
-
7
Explain create_drive route,edit drive route,update route? 9)How have you ensured that if a student has applied for the drive then he will not be able to apply for the same drive again? 10)how have you prevented duplicate applications?Times asked 1Official solution
SimpleDuplicate booking/register rokne ke liye unique constraint + query check pehle.
Example
exists = Booking.query.filter_by(user_id=uid, slot_id=sid).first() if exists: flash('Already booked'); abort/redirectCommunity 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 enctype multipart/form-data?Times asked 1Official 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
-
9
write a jinja if loop for the student if cgpa>7 then display the name of the student with green color?Times asked 1Official solution
SimpleJinja for loop list render karta hai. loop.index, else branch empty list pe.
Example
{% for u in users %} <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr> {% 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
-
10
Write a route to update the cgpa of the student? 17)Write a drop down option in the register student.html that show gender of the person?Times 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
-
11
In the navbar create a profile link?Times 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
-
12
what is db.flush? I didnot know about it 20)center a div vertically and horizontally Viva lasted for 50 minutes..Times asked 1Official 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