Re: Saving data from HTML form into the database

2018-10-04 Thread Roshan Jha
You can do it by with the help of form.save(). For example, from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from .forms import EmpDetailForm def addEmp(request): if request.method == 'POST': empform = EmpDetailForm(request.POST) if empform.is_valid():

Unable to migrate changes of model in database.

2018-08-21 Thread Roshan Jha
Hi All, I had created a class based model with attributes. The first migration went well and I could see the table in database (postgres). However, when I modified the model, the migration is unable to pick the changes. Any inputs would be highly appreciated. Thanks, Roshan | zaaroshan0...@gm