Django model object initialization

If I do

obj = Object()
obj.att1 = 'test'
obj.att2 = 'test' --> works fine

But if I do


Doing --> obj seems to be Nonetype at this stage

Is this the case?


I don't know the exact framework you are using, but I am going to take a guess as to the problem:


The save() function doesn't appear to return the Object instance, it returns None. So you would normally:


Then check

Need Your Help

Migration From Datatable to Linq to Sql linq-to-sql datatable

In past I use dynamic sql and datatable to get data from database.

Social logins and retaining access without having to authenticate every time…is it possible?

twitter facebook oauth

I am about to start a new project building a web UI with a lot of different functionality. Part of the functions however include the ability to update and access certain social media sites - Facebo...