solved it

from django.shortcuts import render
from django.http import HttpResponse
from vmware.models import Customer
from django.shortcuts import render_to_response
from vmware.models import Vms
from .forms import SignUpForm
from vmware.models import Vmspecs
from django.views.decorators.csrf import csrf_protect
from django.template import Template, RequestContext

def index(request):
        form = SignUpForm(request.POST or None)
        if form.is_valid():
                save_it = form.save(commit=False)
                save_it.save()
        customers = Customer.objects.all()
        ctx = { 'customers':customers, 'form':form}
        return render_to_response('index.html', ctx, 
context_instance=RequestContext(request))

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f0c9cbdb-fb89-467e-bd62-2ea368f9abe6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to