class PageFieldDefinitions(models.Model):
field_name = models.CharField(max_length=100, blank=True, default='', null=True)
class Pages(models.Model):
name = models.CharField(max_length=100, blank=True, default='', null=True)
class PageFieldContent(models.Model):
content = models.CharField(max_length=100, blank=True, default='', null=True)
page_field = models.ForeignKey(PageFieldDefinitions)
page = models.ForeignKey(Pages)
For Django: You can use the model above. I am using this kind of model to populate my model. You cannot dynamically expand your model if you use "big" model. Because it is not easy to predict your model's size. It is possible to use this on your admin site.
Also I am using Django with PostgreSQL and this DB does not support full text search if you don't modify the DB. (http://www.postgresql.org/docs/9.3/static/textsearch.html)
For Meteor: As you know or do not know MeteorJS is a full stack framework uses MongoDB. Mongo is a fast NoSQL DB as far as I use and supports full text search. If you don't create your DB well, you will see lack of data integrity because of NoSQL. If you are an experienced JS developer it will take less time to develop CMS system with Meteor when I compare to Django.
In my project I need a fast search engine and data integrity. I defined two DBs to Django. I use Mongo for searching engine and PostgreSQL for keeping my data.
Read these sources below:
Mongo in Django: http://django-mongodb-engine.readthedocs.org/en/latest/topics/setup.html
Multiple DBs in Django: https://docs.djangoproject.com/en/1.9/topics/db/multi-db/
Multi DBs and MultiModels in Django: multiple databases and multiple models in django
settings.py
DATABASES = {
'default': {
'NAME': 'app_data',
'ENGINE': 'django.db.backends.postgresql',
'USER': 'postgres_user',
'PASSWORD': 's3krit'
},
'search': {
'ENGINE' : 'django_mongodb_engine',
'NAME' : 'my_database',
...
'OPTIONS' : {
'socketTimeoutMS' : 500,
...
}
}
}
models.py
class SearchContent(models.Model):
content = models.CharField(max_length=100, blank=True, default='', null=True)
class Meta:
app_label = 'my_database'