title: How to import and run a django function at the command line
body: <p>I have a Django function "get_data_from_text_file()" that I want to test run from the command line. I tried:</p>
  
  <pre><code>&gt;&gt;&gt; import v1.views
  &gt;&gt;&gt; get_data_from_text_file("kk")
  Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
  NameError: name 'get_data_from_text_file' is not defined
  </code></pre>
  
  <p>Why is it not defined if its imported sucessfully?</p>