title: Django The 'image' attribute has no file associated with it
body: <p>When a user registers for my app.I receive this error when he reaches the profile page.</p>
  
  <pre><code>The 'image' attribute has no file associated with it.
  Exception Type: ValueError 
  Error during template rendering
  In template C:\o\mysite\pet\templates\profile.html, error at line 6
  1 &lt;h4&gt;My Profile&lt;/h4&gt;
  2  
  3 {% if person  %}
  4 &lt;ul&gt;           
  5   &lt;li&gt;Name: {{ person.name }}&lt;/li&gt;
  6   &lt;br&gt;&lt;img src="{{ person.image.url }}"&gt;
  Traceback Switch back to interactive view
  File "C:\o\mysite\pet\views.py" in Profile
   71.     return render(request,'profile.html',{'board':board ,'person':person})
  </code></pre>
  
  <p>I think this error happens because my template requires a image and seen he just registered he can't add a image unless he go to the edit page and adds a page then he can access the profile page.</p>
  
  <p>My profile.html</p>
  
  <pre><code>&lt;h4&gt;My Profile&lt;/h4&gt;
  
  {% if person  %}
  &lt;ul&gt;           
      &lt;li&gt;Name: {{ person.name }}&lt;/li&gt;
      &lt;br&gt;&lt;img src="{{ person.image.url }}"&gt;
  
  
  &lt;/ul&gt;
  {% endif %}
  </code></pre>
  
  <p>My Profile function at views.py</p>
  
  <pre><code>def Profile(request):
      if not request.user.is_authenticated():
          return HttpResponseRedirect(reverse('world:LoginRequest'))
      board = Board.objects.filter(user=request.user)
      person = Person.objects.get(user=request.user)
      return render(request,'profile.html',{'board':board ,'person':person})
  </code></pre>
  
  <p><em>I tried this solution by creating a 2 instance of Person object and separating them at my template with a if but it didn't succeed.</em></p>
  
  <pre><code>&lt;h4&gt;My Profile&lt;/h4&gt;
  
  {% if person  %}
  &lt;ul&gt;           
      &lt;li&gt;Name: {{ person.name }}&lt;/li&gt;
   &lt;/ul&gt;
  {% endif %}
  {% if bob %}
  &lt;ul&gt;           
  &lt;br&gt;&lt;img src="{{ bob.image.url }}"&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p><em>My solutions to the Profile function</em></p>
  
  <pre><code>def Profile(request):
      if not request.user.is_authenticated():
          return HttpResponseRedirect(reverse('world:LoginRequest'))
      board = Board.objects.filter(user=request.user)
      person = Person.objects.get(user=request.user)
      bob = Person.objects.get(user=request.user)
  
      return render(request,'profile.html',{'board':board ,'person':person,'bob':bob})
  </code></pre>
  
  <p>I'm been reading the documentation for Built-in template tags and filters I think a solution here is to use ( and ) template tag but I can't seem to use it properly.</p>
  
  <p>How can I configure this template to make picture an option. If their are no picture leave it but display the persons name.</p>
  
  <p>Thank you for helping me</p>