Python Django PostgreSQL .cursorrules prompt file
About .cursorrules prompt file
What you can build
Real-time Chat Application: Create a web-based chat application using Django Channels for handling WebSockets to provide real-time messaging capabilities. Leverage Django's authentication framework for user management and Redis for message queuing and caching.
E-commerce Platform: Develop a scalable e-commerce platform using Django with features like product catalog, shopping cart, payment processing, and user profiles. Utilize Celery for handling asynchronous tasks like sending order confirmation emails and Redis for optimizing session management and caching.
Event Management System: Design an event management system with Django that allows users to create and manage events, register attendees, and send notifications. Use Django REST Framework to provide a RESTful API for third-party integrations.
Blogging Platform with SEO Optimization: Build a blogging platform using Django, focusing on SEO features like optimized URLs, metadata, and sitemap generation. Implement Django templates for rendering and allow Markdown or WYSIWYG editor support for content creation.
Online Learning Portal: Create a learning management system (LMS) using Django, including functionalities such as course creation, enrollment, quizzes, and progress tracking. Leverage Django's form classes for handling quiz submissions and grading.
Social Networking Site: Develop a social networking site using Django with features like user profiles, friend connections, news feed, and user-generated content. Utilize Django's signal framework to handle notifications and alerts asynchronously.
Job Board Application: Build a job board application using Django, where users can post job listings, apply for jobs, and manage resumes. Incorporate Django’s built-in security features to protect user data and ensure safe transactions.
Crowdfunding Platform: Create a crowdfunding site with Django that allows users to start campaigns, pledge funds, and track progress. Use Django's ORM to manage complex funding transactions and Django REST Framework for API development.
Online Marketplace: Design a peer-to-peer marketplace using Django, where users can buy and sell goods. Implement user reviews, seller ratings, and transaction history using Django's built-in tools for form handling and user management.
Data Analytics Dashboard: Develop a data analytics dashboard using Django and integrate with popular visualization libraries like Matplotlib or Plotly. Allow users to upload datasets, perform analyses, and generate visual reports, optimizing performance with Django’s caching framework.
Benefits
- Emphasizes the use of Django's built-in features, encouraging efficient resource use and enabling full capability leverage.
- Encourages prioritizing readability and maintainability with PEP 8 compliance and descriptive naming conventions for enhanced clarity.
- Supports modular project structure with Django apps for separation of concerns, promoting reusability and maintainability.
Synopsis
Developers building scalable web applications with Django will benefit by creating robust, secure, and maintainable systems adhering to Django standards and using advanced features like ORMs, CBVs, and caching.
Overview of .cursorrules prompt
The .cursorrules file outlines guidelines for developing scalable web applications using Python and Django. It emphasizes clear, technical communication with precise Django examples, prioritizing readability, maintainability, and adherence to Django's coding style (PEP 8). The file covers best practices such as using Django’s built-in tools, following the MVT pattern, employing Django’s ORM for database interactions, and leveraging class-based views. It stresses error handling, validation, and adhering to security best practices. Important dependencies are listed, including Django REST Framework, Celery, and PostgreSQL or MySQL. Performance optimization techniques, key project conventions, and recommendations for using Django’s caching and middleware features are also included. Developers are encouraged to refer to Django's documentation for further best practices.