'How instances of Django's generic view classes created?
I am trying to understand how Django works and here is one question. Say we have this simple CreateView:
class ListCreate(CreateView):
model = ToDoList
fields = ['title']
def get_context_data(self, **kwargs):
context = super(ListCreate, self).get_context_data()
context['title'] = 'Add a new list'
return context
Now, as far as I know, you create an instance of a class by my_instance = MyClass(). Untill then the code that describes the MyClass is just a code. So my question is, at what point in time the instance of ListCreate() is created and what is the name of that instance?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
