Answer the question
In order to leave comments, you need to log in
What is what? What sources can I turn to to understand?
Create a view CreateModelA(LoginRequiredMixin, CreateView). The user using this view must be able to create an instance of Model A and store it in the database. You must add all the elements required for this view type. Change this view, or add new views, or do whatever is necessary to create a relationship between A and some models B. The result should be that when the user creates a new instance of model A in the database, a relationship will be created between instance A and some number of instances of model B . Additional requirements: • The user does not create instances of model B • Each instance of model A created must have a default relation to some instances of B • The user cannot manually visit another part of the site to add a new relationship between A and B. Create an UpdateDefaultB view. Using this view, the user should be able to specify which instances of model B are used for the default relation (Additional requirement 2. From the previous view) when no relation to B has been selected by the user. Using this view, the user should be able to select or deselect some of the default instances of Model B. By "B by default" it means that when user creates or some other service instantiates model A and stores it in the database,
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question