title: How to send image file without saving in database using django framework
body: <p><strong>I'm a novice in Django an am stuck in Django views.py am two field in forms.py 1st CharField 2nd ImageField my CharField is successfully rendered but ImageField does not render how solved this I want to send image file with tweet without saving in database please me to solved this problem thanks</strong></p>
  
  <p><strong>my files are here-</strong> </p>
  
  <p><strong>forms.py</strong> </p>
  
  <pre><code>from django import forms
  
  class HomeForm(forms.Form):
    tweet = forms.CharField()
    img = forms.ImageField(label='Select a Image file',)
  </code></pre>
  
  <p><strong>Views.py</strong></p>
  
  <pre><code>from django.http import HttpResponseRedirect
  from django.shortcuts import render
  from .forms import *
  from django.views.generic import TemplateView
  
  
  class Texting(TemplateView):        
    Template_name =  'app_temp/xyz.html'
  
    def get(self, request):
      form = HomeForm()
      return render(request, self.Template_name, {'form': form})
  
    def post(self, request):
      access_token = 'XYZ'
      access_token_secret = 'PQR'
      consumer_key = 'LMN'
      consumer_secret = 'ABC'
      api = TwitterAPI(consumer_key, consumer_secret , access_token , access_token_secret )
      form = HomeForm(request.POST , request.FILES)
      if form.is_valid():
          text = form.cleaned_data['tweet']
          img = form.request.FILES['img'] 
  
          r = api.request('statuses/update_with_media', {'status':text}, {'media[]':img})
      return render(request,'app_temp/new_page.html')
  </code></pre>
  
  <p><strong>html</strong></p>
  
  <pre><code>{% extends 'login_base.html'%}
  
  {% block content %}
  
  &lt;div class="container"&gt;
     &lt;form method="POST"&gt;
           {% csrf_token %}
           {{ form.as_p }}
           &lt;button type="submit" class="btn btn-primary"&gt;Tweet&lt;/button&gt;
     &lt;/form&gt;
     &lt;h1&gt;{{img}}&lt;/h1&gt;
      &lt;h1&gt;{{text}}&lt;/h1&gt;
   &lt;/div&gt;
  {% endblock  %}
  </code></pre>