{"id":729,"date":"2022-04-04T14:33:48","date_gmt":"2022-04-04T13:33:48","guid":{"rendered":"http:\/\/dominic.no\/blog\/?p=729"},"modified":"2022-04-04T14:33:48","modified_gmt":"2022-04-04T13:33:48","slug":"vs-code-virtualenvironment-and-django-simple-setup","status":"publish","type":"post","link":"https:\/\/dominic.no\/blog\/vs-code-virtualenvironment-and-django-simple-setup\/","title":{"rendered":"VS Code, virtualenvironment and Django; simple setup"},"content":{"rendered":"\n<p>Just found out that VS code is genious:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\"><span class=\"hljs-keyword\">in<\/span> shell, make a project folder:\n&gt;mkdir myproject\n&gt;<span class=\"hljs-built_in\">cd<\/span> myproject\n&gt;python3 -m virtualenv myproject_venv\n&gt;<span class=\"hljs-built_in\">source<\/span> myproject_venv\/bin\/activate\n&gt;pip install Django\n&gt;django-admin startproject myproject .<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Now if you open the &#8220;root&#8221; myproject folder, the one created on line 1, VS code will detect the django project and the virtual environment. So hit F5 to to run the server in debug mode.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just found out that VS code is genious: Now if you open the &#8220;root&#8221; myproject folder, the one created on line 1, VS code will detect the django project and the virtual environment. So hit F5 to to run the server in debug mode.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"ngg_post_thumbnail":0,"spay_email":""},"categories":[1],"tags":[],"gutentor_comment":0,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/posts\/729"}],"collection":[{"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/comments?post=729"}],"version-history":[{"count":1,"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/posts\/729\/revisions"}],"predecessor-version":[{"id":730,"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/posts\/729\/revisions\/730"}],"wp:attachment":[{"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/media?parent=729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/categories?post=729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dominic.no\/blog\/wp-json\/wp\/v2\/tags?post=729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}