|
@@ -9,9 +9,17 @@ from rapid import rapidfields
|
|
|
class AltData1(models.Model):
|
|
|
name = models.CharField(max_length=30)
|
|
|
|
|
|
+ def __unicode__(self):
|
|
|
+ return 'name: ' + self.name
|
|
|
+
|
|
|
+
|
|
|
class AltData2(models.Model):
|
|
|
upd_date = models.DateField(auto_now=True)
|
|
|
|
|
|
+ def __unicode__(self):
|
|
|
+ return 'upd_date: ' + self.upd_date
|
|
|
+
|
|
|
+
|
|
|
class Test1(models.Model):
|
|
|
some_text = models.CharField(max_length=30)
|
|
|
some_int = models.IntegerField()
|
|
@@ -21,5 +29,3 @@ class Test1(models.Model):
|
|
|
alt_data_type = rapidfields.AlternativeDataTables((AltData1, AltData2))
|
|
|
alt_data_id = models.PositiveIntegerField()
|
|
|
alt_data = rapidfields.AlternativeData('alt_data_type', 'alt_data_id')
|
|
|
-
|
|
|
-
|