-
1
Download the project from the portal and run it.Times asked 6Official 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
-
2
Show the GitHub repository and collaborators.Times asked 1Official solution
SimpleGitHub repo public/private policy ke hisaab, MAD-1 collaborator add, commits dikhao.
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
Write a route that accepts an ID as input and returns/displays it on the frontend.Times asked 1Official solution
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.
PUT@app.route('/x/<int:id>', methods=['PUT']) + request.get_json()
url param display: @app.route('/show/<int:id>') return render_template('show.html', id=id)
Form → next page: POST values render_template('out.html', **request.form)
Count: return str(User.query.filter_by(is_blacklisted=True).count())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
Which HTML tag is used to create a form?Times asked 1Official solution
SimpleForm user input server ko bhejti hai. Table rows/columns dikhati hai.
<form action="{{ url_for('register') }}" method='POST' enctype='multipart/form-data'> <input name='email' required> <button type='submit'>Go</button> </form>name attribute server pe key ban'ti hai: request.form['email']. id JS/CSS, value default/dikhta hua text.
action URL. method GET/POST. enctype file upload pe multipart.
required frontend empty submit rokta hai (backend phir bhi check).<table><thead><tr><th>Name</th></tr></thead><tbody><tr><td>{{ u.name }}</td></tr></tbody></table>th header, td data, tr row. Nested table: td ke andar table (avoid, messy).
method hataoge to GET, password URL mein — buri baat.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
What is the Internal Server Error (HTTP 500) status code?Times asked 1Official solution
SimpleStatus code number batata hai request ka result.
200 OK — success, page/data mil gaya.
201 Created — POST se naya resource.
302/303 Found/See Other — redirect (login ke baad).
304 Not Modified — cache use karo.
400 Bad Request — galat input.
401 Unauthorized — login nahi (ironically authentication missing).
403 Forbidden — login hai, permission nahi.
404 Not Found — route/record nahi.
500 Internal Server Error — server crash (DB error, NoneType). debug=True pe traceback.
501 Not Implemented — method server nahi sambhalta.abort(404) Flask mein. get_or_404(id) record na ho to 404.
User ID GET pe exist na kare to 404 return karo, 500 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