|
56 | 56 |
|
57 | 57 | <body> |
58 | 58 | <header> |
59 | | - <aside>February 27, 2025</aside> |
| 59 | + <aside>February 28, 2025</aside> |
60 | 60 | <a href="https://gto76.github.io" rel="author">Jure Šorn</a> |
61 | 61 | </header> |
62 | 62 |
|
@@ -2107,7 +2107,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment |
2107 | 2107 | </ul> |
2108 | 2108 | <div><h3 id="staticrequest">Static Request</h3><pre><code class="python language-python hljs"><span class="hljs-meta">@app.route('/img/<path:filename>')</span> |
2109 | 2109 | <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">serve_file</span><span class="hljs-params">(filename)</span>:</span> |
2110 | | - <span class="hljs-keyword">return</span> fl.send_from_directory(<span class="hljs-string">'DIRNAME/'</span>, filename) |
| 2110 | + <span class="hljs-keyword">return</span> fl.send_from_directory(<span class="hljs-string">'DIRNAME'</span>, filename) |
2111 | 2111 | </code></pre></div> |
2112 | 2112 |
|
2113 | 2113 | <div><h3 id="dynamicrequest">Dynamic Request</h3><pre><code class="python language-python hljs"><span class="hljs-meta">@app.route('/<sport>')</span> |
@@ -2898,7 +2898,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment |
2898 | 2898 | self.<attr_name> = <arg_name> |
2899 | 2899 | </code></pre> |
2900 | 2900 | <div><h3 id="virtualenvironments">Virtual Environments</h3><p><strong>System for installing libraries directly into project's directory.</strong></p><pre><code class="python hljs">$ python3 -m venv NAME <span class="hljs-comment"># Creates virtual environment in current directory.</span> |
2901 | | -$ source NAME/bin/activate <span class="hljs-comment"># Activates env. On Windows run `NAME\Scripts\activate`.</span> |
| 2901 | +$ source NAME/bin/activate <span class="hljs-comment"># Activates it. On Windows run `NAME\Scripts\activate`.</span> |
2902 | 2902 | $ pip3 install LIBRARY <span class="hljs-comment"># Installs the library into active environment.</span> |
2903 | 2903 | $ python3 FILE <span class="hljs-comment"># Runs the script in active environment. Also `./FILE`.</span> |
2904 | 2904 | $ deactivate <span class="hljs-comment"># Deactivates the active virtual environment.</span> |
@@ -2942,7 +2942,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment |
2942 | 2942 |
|
2943 | 2943 |
|
2944 | 2944 | <footer> |
2945 | | - <aside>February 27, 2025</aside> |
| 2945 | + <aside>February 28, 2025</aside> |
2946 | 2946 | <a href="https://gto76.github.io" rel="author">Jure Šorn</a> |
2947 | 2947 | </footer> |
2948 | 2948 |
|
|
0 commit comments