Selecting field value for different tables in Admin Site
Hi,
I have a field named "deger". I want to bind deger value from 3 or 4
source tables via foreignkey, find&select mechanism or what ever ??.
(ajax, jquery, customform ... etc)
After the user choice "object_id" (source tables id) and releated
field "field_id" (source table field name), user can select value from
these.
Which way/mechanism can I use?
Please help? I new on django but not python.
Best regards
Mustafa YILDIRIM
class kapi_rules(models.Model):
kapi_rule_id = models.AutoField("Kural ID", primary_key=True,
editable=False)
created_user = models.ForeignKey(User, db_column='created_user',
related_name='created_user', blank=True, null=True, editable=False,
verbose_name='Kuralı Oluşturan')
changed_user = models.ForeignKey(User, db_column='changed_user',
related_name='changed_user', blank=True, null=True, editable=False,
verbose_name='Kuralı Değiştiren')
rule_adi = models.CharField("Kural Tanımı", max_length=255,
null=False)
birim_id = models.ForeignKey(birimler, db_column='birim_id',
verbose_name='Birim ID')
kapi_id = ChainedForeignKey(kapilar, chained_field='birim_id',
chained_model_field = 'birim_id', db_column = 'kapi_id',
show_all=False, auto_choose=True, verbose_name='Kapı ID')
object_id = models.ForeignKey(kapi_object_list, db_column =
'object_id',verbose_name='Tablo');
field_id = ChainedForeignKey(kapi_object_field_list,
chained_field='object_id', chained_model_field = 'object_id',
db_column = 'field_id', show_all=False, auto_choose=True,
verbose_name='Alan')
deger = models.CharField("Alan Değeri", max_length=255,
null=False)
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home