Example model implementationHere is an example of a model that derives from ActsAsList. It also defines the optional scope logic so you can store multiple scoped lists in a single table.
from django.db import models
from acts_as_list import ActsAsList
class Listitem(ActsAsList, models.Model):
#some text
title = models.CharField()
# List scope column
section = models.CharField(max_length=255)
# Defines query logic to add list scope condition
def scope_condition(self):
return Q(section__exact=self.section)
|