{"id":1611,"date":"2014-06-06T06:06:43","date_gmt":"2014-06-06T04:06:43","guid":{"rendered":"http:\/\/www.unicoda.com\/?p=1611"},"modified":"2014-06-05T14:46:26","modified_gmt":"2014-06-05T12:46:26","slug":"determiner-lemplacement-des-sources-de-django","status":"publish","type":"post","link":"https:\/\/www.unicoda.com\/?p=1611","title":{"rendered":"D\u00e9terminer l&#8217;emplacement des sources de Django"},"content":{"rendered":"<p>Voici comment d\u00e9terminer l&#8217;emplacement des sources de Django :<\/p>\n<pre class=\"lang-py prettyprint prettyprinted\"><code><span class=\"pln\">$ python\r\n<\/span><span class=\"pun\">&gt;&gt;&gt;<\/span><span class=\"kwd\">import<\/span><span class=\"pln\"> django\r\n&gt;&gt;&gt; django\r\n&lt;module 'django' from '\/usr\/lib\/python2.7\/dist-packages\/django\/__init__.pyc'&gt;\r\n<\/span><\/code><\/pre>\n<p>Le chemin vers Django est donc<\/p>\n<pre class=\"lang-py prettyprint prettyprinted\"><code><span class=\"pln\">\/usr\/lib\/python2.7\/dist-packages\/django\/<\/span><\/code><\/pre>\n<p>Autre possibilit\u00e9 plus rapide :<\/p>\n<pre>python -c \"\r\nimport sys\r\nsys.path = sys.path[1:]\r\nimport django\r\nprint(django.__path__)\"\r\n<\/pre>\n<p>Qui nous donne<\/p>\n<pre>['\/usr\/lib\/python2.7\/dist-packages\/django']<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Voici comment d\u00e9terminer l&#8217;emplacement des sources de Django : $ python &gt;&gt;&gt;import django &gt;&gt;&gt; django &lt;module &lsquo;django&rsquo; from &lsquo;\/usr\/lib\/python2.7\/dist-packages\/django\/__init__.pyc&rsquo;&gt; Le chemin vers Django est donc \/usr\/lib\/python2.7\/dist-packages\/django\/ Autre possibilit\u00e9 plus rapide : python -c \u00a0\u00bb import sys sys.path = sys.path[1:] import django print(django.__path__)\u00a0\u00bb Qui nous donne [&lsquo;\/usr\/lib\/python2.7\/dist-packages\/django&rsquo;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[185,186],"class_list":["post-1611","post","type-post","status-publish","format-standard","hentry","category-terminal","tag-django","tag-path"],"_links":{"self":[{"href":"https:\/\/www.unicoda.com\/index.php?rest_route=\/wp\/v2\/posts\/1611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.unicoda.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unicoda.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unicoda.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unicoda.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1611"}],"version-history":[{"count":1,"href":"https:\/\/www.unicoda.com\/index.php?rest_route=\/wp\/v2\/posts\/1611\/revisions"}],"predecessor-version":[{"id":1612,"href":"https:\/\/www.unicoda.com\/index.php?rest_route=\/wp\/v2\/posts\/1611\/revisions\/1612"}],"wp:attachment":[{"href":"https:\/\/www.unicoda.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unicoda.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unicoda.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}