-
1
Demonstrate the entire project.Times 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
-
2
First tell me about the models.py in your app and how you have connected it.Times 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
-
3
Explain entire MVC control flow of the login system in your code.Times asked 1Official solution
SimpleMVC: Model=data (SQLAlchemy), View=Jinja HTML, Controller=Flask routes/business logic.
Flask loosely MVC follow karta hai — routes controllers, templates views, models.py models.
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
Explain the difference between authentication and authorization used in your projectTimes asked 1Official 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
-
5
Explain how bootstrap is used in your project. I had mix of CSS, Bootstrap and inline stuffs.Times 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
-
6
Explain the difference between render_template and redirect used in your app.Times 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
-
7
Explain ORM and its benefit. Where it was used in your model.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
-
8
In user signup page add an extra attribute "emergency_contact_name" to the entire frontend and backend system. (You have to add it in template, then model, then controller.. After completing this, open your db with db browser and show that the new column is populated with NULL for the old users and with the data received from the new user onwards.Times 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
-
9
In user signup page there is a signup button. change the button color using bootstrap(if bootstrap is used)Times 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
-
10
Difference between GET and POST.Times asked 7Official solution
SimpleGET data read/show karta hai (idempotent). POST create/submit karta hai (form).
Example
@app.route('/login', methods=['GET', 'POST']) def login(): if request.method == 'POST': # validate + session ... return render_template('login.html')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 CSRF and real life examples.Times asked 1Official solution
SimpleCSRF: attacker tumhari logged-in browser se unwanted POST. CSRF token form mein proof hai request genuine hai.
Viva tipFlask-WTF CSRF protect karta hai. Token bina POST reject.
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
Explain how Jinja template tool works in your app. I explained how this pulls data and renders.Times asked 1Official solution
SimpleJinja2 Flask ka template engine — HTML ke andar {{ }} variables, {% %} logic.
Example
{% for lot in lots %} <li>{{ lot.name }} — {{ lot.spots }}</li> {% else %} <p>No lots</p> {% 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