Django
In this section:
- Django
- Creating Django Project
- Creating Django Application in a Project
- Creating Templates
- Debugging Django Templates
- Navigating Between Templates and Views
- Navigation and Completion for Named URL Tags in Django Templates
- Navigating to Implementing Blocks of Templates
- Running Tasks of Manage.Py Utility
- Referring to Static Contents
- Viewing Model Dependency Diagram
- Internationalization and Localization Support
Prerequisite
Django framework and the corresponding Python interpreter are properly installed on your machine.
Supported versions of Django and Python
PyCharm supports the latest Django versions ( e.g. 1.5, 1.6, 1.7,1.8).
The supported Python versions depend on the Django version, for example:
- Django 1.8 supports Python interpreter 3.5.
- Django 1.7 supports Python interpreters from the version 2.7 up to the version 3.4.
- Django 1.6 supports Python interpreters from the version 2.6 up to the version 3.3.
Django support
Django support in PyCharm includes:
- Dedicated project type .
- Ability to run the tasks of the
manage.py
utility. - Django templates support (syntax and error highlighting, code completion, navigation, completion for block names, resolve and completion for custom tags and filters, and quick documentation for tags and filters).
- Ability to create templates from usage.
- Ability to debug Django templates.
- Live templates (snippets) for the quick development of Django templates.
- Run/debug configuration for Django server.
- Navigation between views and templates.
- Code insight support for Django ORM.
- Code completion and resolve in
- Class-based views. PyCharm provides Intention action to convert Django function-based generic views to class-based views.
- Generating model dependency diagrams for Django models.
Enabling or disabling Django support
Django support can be turned on or off by selecting/clearing the check box Enable Django support in the Django page.
To enable Django support, follow these steps:
- Open Settings/Preferences dialog, and click the page Django.
- Make sure that the check box Enable Django support is selected.
- Apply changes (if any) and close the dialog.
See Also
Concepts:
External Links:
Last modified: 23 November 2016