from django.shortcuts import render

# Create your views here.
from .forms import AddForm
def home(request):
	title ='Add/Edit'
	
	#add a form
	form = AddForm(request.POST or None)

	if form.is_valid():
		instance = form.save(commit=False)
		instance.save()

	context = {
		"title": title,
		"form" : form
	}

	return render(request,"home.html",context)
372563a687ca0b245155a304bfc459b485554ba0
<mask token>

<mask token>


def home(request):
    title = 'Add/Edit'
    form = AddForm(request.POST or None)
    if form.is_valid():
        instance = form.save(commit=False)
        instance.save()
    context = {'title': title, 'form': form}
    return render(request, 'home.html', context)

from django.shortcuts import render
from .forms import AddForm


def home(request):
    title = 'Add/Edit'
    form = AddForm(request.POST or None)
    if form.is_valid():
        instance = form.save(commit=False)
        instance.save()
    context = {'title': title, 'form': form}
    return render(request, 'home.html', context)

from django.shortcuts import render

# Create your views here.
from .forms import AddForm
def home(request):
	title ='Add/Edit'
	
	#add a form
	form = AddForm(request.POST or None)

	if form.is_valid():
		instance = form.save(commit=False)
		instance.save()

	context = {
		"title": title,
		"form" : form
	}

	return render(request,"home.html",context)