The goal of efficiency is more slack.

Sunday, June 16, 2019

Create a new Django project in VSCode

  • Go to user settings (cmd-,):
"python.venvPath": "~/.virtualenvs",
  • Quit VSCode.
  • Open a Python file in VSCode.
  • Select virtualenv in bottom bar.
  • Debug > Open Configurations to create launch.json. Otherwise, "Add Configurations" may not work.
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Server",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "runserver",
                "--noreload",
            ],
            "debugOptions": [
                "RedirectOutput",
                "Django"
            ]
        },
        {
            "name": "Script",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "runscript",
                "$(basename -s .py ${file})"
            ],
            "debugOptions": [
                "RedirectOutput",
                "Django"
            ]
        }
    ]
}
  • Click button on bottom right to Install Linting.

Related Posts:

  • Sites for DjangoHow to use the Sites package for Django. Follow instructions in documentation to install the Sites package. Then create a migration in one of your ap… Read More
  • Create a new Django project in VSCode Go to user settings (cmd-,): "python.venvPath": "~/.virtualenvs", Quit VSCode. Open a Python file in VSCode. Select virtualenv in bottom ba… Read More
  • FeinCMS installationFollowing directions at https://feincms-django-cms.readthedocs.io/en/stable/installation.html, I ran into some problems, probably due to a Django vers… Read More
  • Django in a subdirectoryHow to serve a Django project as a subdirectory of another Django project's URL. For example, the first Django site is at www.example.com/ and the sec… Read More
  • Install Django on a development MacNotes on installing a Django development environment on a Mac. Install Python Install Python 3 from www.python.org. Run Install Cerltificates.comm… Read More

0 comments:

Popular Posts

Recent Posts

Unordered List

Text Widget

Pages

Powered by Blogger.
Scroll To Top