Example #1
0
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
Example #2
0
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')
Example #3
0
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
Example #4
0
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)
Example #5
0
class Person(models.Model):
    data = jsonstore.JSONField()
    name = jsonstore.CharField(max_length=250)
    address = jsonstore.CharField(max_length=250, blank=True)
Example #6
0
class VIPClient(Client):
    approved = jsonstore.BooleanField()
    personal_phone = jsonstore.CharField(max_length=250)

    class Meta:
        proxy = True
Example #7
0
class Client(Person):
    birthdate = jsonstore.DateField()
    business_phone = jsonstore.CharField(max_length=250)