Django Test Count
Django Test Count
Django Test Count
Overview
Your task is to create a Web application using Django. The application will allow users to login and filter the
database table using a form.
Once the user submits the form, display the count of records based on the applied filters.
Technical Requirements
1. Project Setup
• Framework: The application should be built using the Django framework to leverage its performance
and modern features. Name the application as catalyst-count.
• Programming Language: Python 3.x
• Virtual Environment: Use virtual environments to manage Python packages.
2. Database Configuration
• Database: PostgreSQL. It should store user data and the uploaded CSV data.
• ORM: Utilize Django ORM to facilitate database interactions.
• Company Data Model: Download the test data set from here. Create a model schema (table) by as per
the data set. Import this csv into a Postgres table.
4. Authentication
• User Authentication: Implement user session authentication using django-all-auth.
6. User Interface
• Template Engine: Utilize Django template engine for front-end design to ensure a responsive and
intuitive user interface. Feel free to use Bootstrap 4 to create your own UI.
• Pages: The application should include the following pages:
1. Login Page: For user authentication.
2. Upload Data Page: Allows users to upload CSV files.
3. Query Builder Page: Enables users to filter the uploaded data and query & view the count of
records matching the filters.
4. DRF API: Querying should be done using an API. Use DRF to create this API.
5. User Management Page (Optional): For viewing and managing user accounts.
7. Documentation
• README.md: Include a README file in the repository with detailed setup instructions, environment
configuration steps, and how to run tests.
8. Testing (Optional)
• Unit Testing: Write unit tests for all functionalities, focusing on the file upload process, database
operations, and query builder logic.
Functional Requirements
14. Performance
• The application should handle large file uploads and data processing efficiently without significant
delays.
• Optimize database queries to handle large datasets effectively.
15. Scalability
• The system should be designed to accommodate an increasing amount of data and users.
16. Security
• Adhere to best practices for web security to protect sensitive data and prevent common vulnerabilities.
Deliverables
Sample UIs
The following are the approximate reference UIs for the task.
Application Login
Query Builder
Upload Data
Users