A common scenario is that you have a model with a foreignkey to other model that is the main of your view so you want to pass the main model as parameter to a crud views to filter and create using it as main reference, and always save the foreignkey with the main model object.
For example
In models
class Author(models.Model):
name=models.CharField(max_length=150)
class Book(models.Model):
author = models.ForeignKey(Author):
name=models.CharField(max_length=150)
In views
from cruds_adminlte.crud import CRUDView
class Myclass(CRUDView):
model = Book
related_fields = ['autor']
So with this you now have management of author's book.
Warning: We provide all internal references but you need to create the first author to book list|create|update|detail|delete reference.
Related fields
A common scenario is that you have a model with a foreignkey to other model that is the main of your view so you want to pass the main model as parameter to a crud views to filter and create using it as main reference, and always save the foreignkey with the main model object.
For example In models
In views
So with this you now have management of author's book.
Warning: We provide all internal references but you need to create the first author to book list|create|update|detail|delete reference.