0% found this document useful (0 votes)
4 views3 pages

Django

The document contains a series of technical questions and answers covering topics related to Django, Flask, AWS S3, Git, Docker, SQL, and behavioral scenarios. Key concepts include Django's MVT architecture, Flask Blueprints, secure file uploads to S3, Git operations, Docker image optimization, SQL indexing, and handling real-time updates. Additionally, it addresses behavioral questions on project management, conflict resolution, and staying updated with technology trends.

Uploaded by

gowtham.python3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Django

The document contains a series of technical questions and answers covering topics related to Django, Flask, AWS S3, Git, Docker, SQL, and behavioral scenarios. Key concepts include Django's MVT architecture, Flask Blueprints, secure file uploads to S3, Git operations, Docker image optimization, SQL indexing, and handling real-time updates. Additionally, it addresses behavioral questions on project management, conflict resolution, and staying updated with technology trends.

Uploaded by

gowtham.python3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Django/Flask Questions

1. What is the Django MVT architecture?

• Answer: MVT stands for Model-View-Template. Model handles data, View


processes data and sends it to the template, and Template handles the presentation
layer.

2. Explain Django Signals.

• Answer: Django Signals allow decoupled applications to get notified when certain
events occur, like after a model is saved or deleted.

3. How would you create a custom middleware in Django?

• Answer: By creating a Python class with __init__, __call__, or process_request,


and process_response methods, and adding it to the MIDDLEWARE settings.

4. Explain Flask Blueprints.

• Answer: Blueprints in Flask are used for organizing a project into smaller, reusable
components, making the application modular and scalable.

5. What is Flask's application context?

• Answer: It helps in maintaining the app-specific data during a request, using


app_context() and g object.

AWS S3 Questions

6. How do you securely upload files to AWS S3?

• Answer: Using pre-signed URLs, setting up IAM roles with limited permissions,
validating MIME types, and encrypting files at rest and in transit.

7. Explain the use of S3 Bucket Policies.

• Answer: Bucket Policies control access to the entire bucket or specific files, allowing
or denying permissions based on conditions.

8. How do you handle large file uploads to S3?

• Answer: By using multipart upload API to upload parts in parallel for better
performance and reliability.

Git and Docker Questions

9. What are Git Rebase and Git Merge?


• Answer: Merge combines two branches and creates a new commit, while Rebase
moves or reapplies commits on top of another base branch to keep history clean.

10. How would you resolve a Git merge conflict?

• Answer: By manually editing the conflicting files, staging them using git add, and
committing the changes.

11. Explain Dockerfile and its basic structure.

• Answer: A Dockerfile contains instructions to build a Docker image like FROM, RUN,
COPY, CMD.

12. How do you optimize Docker images?

• Answer: Use smaller base images like Alpine, minimize the number of layers, use
.dockerignore, and combine RUN commands.

13. How do you manage Docker containers in production?

• Answer: Use orchestration tools like Docker Compose or Kubernetes for multi-
container setups, along with monitoring and scaling solutions.

SQL and Database Questions

14. What is indexing in databases and why is it important?

• Answer: Indexing improves the speed of data retrieval by reducing the number of
records to scan. It is critical for optimizing read-heavy queries.

15. What is a database transaction?

• Answer: A transaction is a unit of work that is completed entirely or not at all,


maintaining ACID properties (Atomicity, Consistency, Isolation, Durability).

16. Explain JOIN types in SQL.

• Answer: INNER JOIN returns matching rows, LEFT JOIN returns all rows from the
left table, RIGHT JOIN returns all from right table, FULL JOIN returns all rows with
NULLs where there is no match.

17. How do you prevent SQL injection in Django?

• Answer: Using Django ORM and parameterized queries instead of raw SQL.

18. What is normalization?

• Answer: Normalization is the process of organizing data to reduce redundancy and


improve data integrity in databases.
19. How to optimize complex queries in SQL?

• Answer: By analyzing query plans, adding indexes, breaking complex queries into
smaller parts, and reducing unnecessary columns in SELECT statements.

🤝 Behavioral & Scenario-Based Questions

20. Describe a time when you had to meet a tight deadline.

• Answer: During the Digital Scoreboard project, we had a hard deadline for a product
demo. I prioritized key modules, worked extended hours, and collaborated closely
with frontend and DevOps teams to ensure delivery.

21. How do you handle a situation where you disagree with a team member on a
technical solution?

• Answer: I prefer open discussions backed by data and proof-of-concept testing. I


listen to their perspective, present my solution with pros and cons, and decide based
on project goals.

22. Describe a challenging bug you encountered and how you fixed it.

• Answer: In a hiring platform project, real-time notifications were failing. I debugged


WebSocket timeouts and implemented heartbeat mechanisms to maintain the
connection.

23. How do you ensure database schema changes don't break production?

• Answer: By applying Django migrations carefully in staging, writing rollback scripts,


and performing zero-downtime deployments.

24. How do you handle real-time updates for high-concurrency applications?

• Answer: I use WebSocket with Redis pub/sub pattern, horizontally scale servers, and
use connection pooling.

25. How do you stay updated with new technologies?

• Answer: I follow tech blogs, newsletters like Python Weekly, take online courses,
and contribute to open-source projects.

You might also like