class Client(User): address = jsonstore.CharField(max_length=250) zip_code = jsonstore.CharField(max_length=250) city = jsonstore.CharField(max_length=250) vip = jsonstore.BooleanField() def get_absolute_url(self): return reverse('client_edit', args=[self.pk]) class Meta: proxy = True
class HelloWorldProcess(Process): text = jsonstore.CharField(_('Message'), max_length=50) approved = jsonstore.BooleanField(_('Approved'), default=False) class Meta: proxy = True verbose_name = _("World Request") verbose_name_plural = _('World Requests')
class Employee(User): hire_date = jsonstore.DateField() salary = jsonstore.DecimalField(max_digits=10, decimal_places=2) department = jsonstore.CharField(max_length=200, choices=[ ('Marketing', 'Marketing'), ('Development', 'Development'), ('Sales', 'Sales'), ]) def get_absolute_url(self): return reverse('employee_edit', args=[self.pk]) class Meta: proxy = True
class CharFieldModel(models.Model): data = jsonstore.JSONField(default=dict) char_field = jsonstore.CharField(max_length=250, blank=True) required_char_field = jsonstore.CharField(max_length=250)
class Person(models.Model): data = jsonstore.JSONField() name = jsonstore.CharField(max_length=250) address = jsonstore.CharField(max_length=250, blank=True)
class VIPClient(Client): approved = jsonstore.BooleanField() personal_phone = jsonstore.CharField(max_length=250) class Meta: proxy = True
class Client(Person): birthdate = jsonstore.DateField() business_phone = jsonstore.CharField(max_length=250)