from django.db import models from django.contrib import admin class Sets(models.Model): name = models.CharField(max_length=100) hash = models.SlugField() keys = models.SlugField() values = models.SlugField() def __unicode__(self): return self.name class QueryParameters(models.Model): key = models.CharField(max_length=100) value = models.CharField(max_length=100) class StoredQuery(models.Model): set = models.CharField(max_length=100) parameters = models.ManytoManyField(QueryParameters) def __unicode__(self): return self.set admin.site.register(StoredQuery)