File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
lessons/beginners/venv-setup Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 1
- {%- macro sidebyside(titles=[ 'Unix', 'Windows'] ) -%}
1
+ {%- macro sidebyside(titles=[ 'Unix', 'Windows'] , code=True ) -%}
2
2
<div class =" row side-by-side-commands " >
3
3
{%- for title in titles -%}
4
4
<div class =" col " >
5
5
<h4 >{{ title }}</h4 >
6
6
{%- filter markdown() -%}
7
- ``` {%- if title.lower().startswith('win') -%}dosvenv{%- else -%}console{%- endif -%}
7
+ {%- if code -%}```
8
+ {%- if title.lower().startswith('win') -%}dosvenv{%- else -%}console{%- endif -%}
9
+ {%- endif -%}
8
10
{{ caller() | extract_part(loop.index0, '---') | dedent }}
9
- ```
11
+ {%- if code -%} ```{%- endif -%}
10
12
{%- endfilter -%}
11
13
</div >
12
14
{%- endfor -%}
@@ -192,10 +194,21 @@ V grafickém prohlížeči souborů to vypadá např. takto:
192
194
193
195
Nakonec virtuální prostředí aktivuj:
194
196
195
- {% call sidebyside(titles=[ 'Unix', 'Windows'] ) %}
197
+ {% call sidebyside(titles=[ 'Unix', 'Windows'] , code=False) %}
198
+ ``` console
196
199
$ source venv/bin/activate
200
+ ```
197
201
---
202
+ ``` doscon
198
203
> venv\Scripts\activate
204
+ ```
205
+
206
+ Jestli používáš příkazovou řádku ve Visual Studio Code,
207
+ je příkaz pro Windows složitější:
208
+ ``` doscon
209
+ > &powershell -ExecutionPolicy bypass
210
+ > venv/Scripts/Activate.ps1
211
+ ```
199
212
{% endcall %}
200
213
201
214
Po spuštění tohoto příkazu by se mělo na začátku příkazové řádky
You can’t perform that action at this time.
0 commit comments