I'm working with content types in feincms. And I want to make a content type that can store filters in the database. Roughly it would look like this:
from news.models import Entry
class NewsContent(models.Model):
filter = models.CharField()
exclude = models.CharField()
offset = models.IntegerField()
limit = models.IntegerField()
#template = models.CharField()
def get_entries(self):
return Entry.objects.filter(self.filter).exclude(self.exclude)[self.offset:self.limit_upper]
Is this possible?
Now this may or may not be a good idea speed wise, but that's question #2