Django Structure Explorer

A Visual Studio Code extension that provides a PyCharm-like Django project structure explorer, making it easier to navigate and understand your Django projects.
Features
- Project Structure Tree View: Quickly visualize your entire Django project structure
- Smart Django Detection: Automatically identifies Django apps, models, views, and more
- Model Field Explorer: View detailed information about model fields and their types
- Admin Class Detection: Navigate to admin classes and their associated models
- URL Patterns: Explore URL patterns and their associated views
- Settings Explorer: Browse through your Django settings
- Property Method Support: Identifies and displays @property methods in models
Why Use Django Structure Explorer?
If you're transitioning from PyCharm to VS Code or simply want a better way to navigate your Django projects, this extension provides:
- Improved Navigation: Quickly jump to any component in your Django project
- Better Understanding: Visualize the relationships between different parts of your project
- Time Saving: No more searching through files to find models, views, or URLs
- Enhanced Productivity: Focus on coding, not on finding files
Installation
Install this extension from the VS Code Marketplace:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Django Structure Explorer"
- Click Install
Or install using the VS Code Quick Open (Ctrl+P):
ext install Dos2Locos.django-structure-explorer
Usage
- Open a Django project in VS Code
- The extension activates automatically when it detects a
manage.py
file
- Access the "Django Explorer" view in the Explorer sidebar
- Navigate through your Django project structure
Exploring Models
Click on any model to see its fields and properties. The extension shows:
- Field names and types
- Property methods (with a distinct icon)
- Direct navigation to field definitions
Exploring Views
Browse through your views with information about:
- Function-based views
- Class-based views
- Direct navigation to view definitions
Exploring URLs
Examine your URL patterns with details about:
- URL patterns
- Associated views
- URL namespaces
Requirements
- Visual Studio Code v1.60.0 or higher
- A Django project
Extension Settings
This extension works out of the box with no additional configuration required.
Known Issues
- Complex custom model fields may not be detected correctly
- Very large Django projects might experience slight performance delays
Roadmap
Future plans for this extension include:
- Support for Django templates exploration
- Integration with Django REST Framework
- Custom field type detection improvements
- Performance optimizations for large projects
- Theme-aware icons and styling
Contributing
Contributions are welcome! To contribute to this extension:
- Fork the repository
- Clone your fork
- Run
npm install
- Make your changes
- Test your changes by pressing F5 to launch a new VS Code window with the extension loaded
- Submit a pull request
License
This extension is licensed under the MIT License.
About
Developed by Dos2Locos to make Django development in VS Code more enjoyable and productive.
Enjoy coding with Django Structure Explorer!