-
1
Demonstrate the Admin module first, then the User module.Times asked 1Official solution
SimpleAdmin CRUD first then user consume. Examiner flow follow skip mat. Demonstrate Admin module first then User.
Roles.
Examiner 2 cheezein: simple desi line + tumhare project ki exact file.
Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.
Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.
Project example: Two logins.
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
Include HTML tags in the movie description.Times asked 1Official solution
SimpleStore tags v-html XSS warn whitelist. Include HTML tags movie description.
Sanitize.
Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).
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.
Project example: v-html description.
Project example: v-html description.
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 your codebase, starting with: Models APIs Celery tasks Vue frontendTimes asked 1Official solution
SimpleOrder models → APIs/auth → celery → Vue router/pages → fetch.
Each layer 1 example. Entire codebase request.
Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).
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.
Suggested flow1) models.py
2) auth login/JWT
3) CRUD
4) cache
5) celery
6) Vue + storeProject example: 6 file tour.
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
How do you create an index in SQLAlchemy?Times asked 1Official solution
SimpleIndex kitab ki suchi — search tez, write thoda mehnga.
B-tree typically. filter wale columns, FKs. Over-index mat.
joinedload N+1 alag.
Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).
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
db.Column(db.String(80), index=True) db.Index('ix_name_city', User.name, User.city)Project example: email index, venue.name search index.
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 Celery and Celery Beat.Times asked 1Official solution
SimpleTasks list, schedule, broker, trigger, verify MailHog/logs.
Beat vs worker. User vs scheduled. App context.
Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.
Flow: Flask
.delay()→ Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS
async/awaitbrowser event loop hai, Celery server-side process — mix mat karo.Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.
Project example: Three tasks. Commands README.
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
What are the components of Celery?Times asked 1Official solution
SimpleClient (Flask .delay), Broker (Redis), Worker. Optional Beat + result backend.
Viva line'Flask produce, Redis transport, worker consume.'
include task modules, app context ke andar DB session. Windows pe eventlet/gevent issues — docs se command.
Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.
Flow: Flask
.delay()→ Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS
async/awaitbrowser event loop hai, Celery server-side process — mix mat karo.Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.
Project example: create_app ke baad celery.conf.update. tasks import taaki register hon.
Viva tip
Viva line'Flask task produce karta hai, Redis transport, worker consume.'
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
How do you stop/shutdown a Celery worker without using the terminal?Times asked 1Official solution
SimpleCTRL+C terminal. celery control shutdown. Unacked requeue config.
Viva terminal hi. Bina terminal pid kill.
Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.
Flow: Flask
.delay()→ Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS
async/awaitbrowser event loop hai, Celery server-side process — mix mat karo.Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.
Project example: Don't kill -9 first, graceful.
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
What is caching?Times asked 23Official solution
SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.
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.
Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis +
@cache.cachedcode dekhta hai.Example
@cache.cached(timeout=50, query_string=True) @app.route('/api/shows') def shows(): return jsonify([s.serialize() for s in Show.query.all()])Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad
cache.delete('venues').Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.
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
What is the difference between Memcached and Redis?Times asked 2Official solution
SimpleDono RAM cache. Redis zyada smart: lists, hashes, pub/sub, persistence, Celery broker.
Memcached: simple key-value, yahi. Redis: data structures + expire + optional disk dump.
MAD2 Redis choose — cache aur broker ek hi process. Memcached Celery nahi chalaata.
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.
Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser).
redis-cli ping→ PONG viva proof.Project example: Tumhare config mein CACHE_TYPE RedisCache, CELERY broker redis://. Memcached nahi.
Viva tipMAD2 mein Redis isliye — cache + broker ek hi tool. Memcached Celery nahi chalaata.
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
What is memoization?Times asked 4Official solution
SimpleMemoize = function(args) ka answer copy. Caching broader (HTTP, Redis, page).
Fibonacci textbook. Flask @cache.memoize. cached whole view.
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.
Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser).
redis-cli ping→ PONG viva proof.Project example: get_user(id) memoize. venues list cached.
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
What is the base Exception class in Python?Times asked 1Official solution
SimpleBaseException sabka base. Usual catch Exception. Base includes SystemExit KeyboardInterrupt.
Base class of all exceptions. Base Exception class Python.
Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).
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.
Project example: Don't except: bare.
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 Flask open source?Times asked 1Official solution
SimpleHaan, BSD-licensed open source.
Is Flask open source? Yes.
Flask Python micro web framework. Route decorator URL → function. MAD2 mein JSON API:
request.get_json(),jsonify, JWT.WSGI: server (Werkzeug) app ko call.
if __name__ == '__main__'sirf direct run. Factorycreate_app()test/celery ke liye.Blueprint/resources folders.
@app.routevs MethodView. Debug=True viva local, prod nahi. CORS alag port Vue ke liye.Project example: Don't overthink.
Project example: Don't overthink.
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
Can Flask be used for large-scale applications?Times asked 1Official solution
SimpleHaan blueprints gunicorn DB. Ops matter. Many companies started Flask. Not magic unlimited.
Can Flask large-scale? Yes with architecture.
Flask Python micro web framework. Route decorator URL → function. MAD2 mein JSON API:
request.get_json(),jsonify, JWT.WSGI: server (Werkzeug) app ko call.
if __name__ == '__main__'sirf direct run. Factorycreate_app()test/celery ke liye.Blueprint/resources folders.
@app.routevs MethodView. Debug=True viva local, prod nahi. CORS alag port Vue ke liye.Project example: Course app small. Prod pattern known.
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
Show where you have used the v-for directive in your code.Times asked 1Official solution
SimpleList pages v-for :key. Show where used v-for. Show list students loop.
Open template.
Directives Vue ke special attributes hain — HTML ko superpower:
v-if/v-show,v-for,v-bind(:),v-on(@),v-model.v-if DOM se hataata/jodta. v-show sirf CSS display. Rare/permission: v-if. Bar-bar toggle: v-show. v-model two-way form. v-bind one-way JS→attribute.
:keyv-for pe zaroori warna Vue galat reuse.v-htmlXSS. Secret UI ke liye sirf v-if kaafi nahi — API 403 bhi.MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.
Project example: Dashboard.vue.
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 filters in Vue?Times asked 1Official solution
SimpleVue2 filters | capitalize. Vue3 hata — methods/computed. Backend filters query params.
Frontend API filters computed or ?q=
SPA = ek HTML, Vue Router se views, full reload nahi. MPA = MAD1 Jinja har URL naya HTML.
Vue Router: routes array,
router-view,router-link,meta.auth+beforeEachguard. Dynamic/venues/:id→$route.params.id.Vite/CLI SFC + npm build
dist/. CDN script tag, no SFC. Jo tumne use kiya wahi justify. Flasksend_from_directory('dist')production pattern.Project example: If Vue3 no | filter syntax.
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
What are slots in Vue?Times asked 1Official solution
SimpleSlots = dabbe ke andar parent apna HTML daal de. Props data, slots markup.
Default slot, named slots. App.vue router-view layout jaisa outlet.
Agar nahi use kiya: 'layout router-view se kiya' valid.
Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.
computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.
SFC: template + script + style ek
.vuefile. Parent-child exam favourite: list parent, row child:item+@delete.Example
<div class="card"><slot>Default</slot></div> <Card><p>Custom body</p></Card>Project example: Card.vue <slot>Default</slot>. Parent custom body.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet