Hi, exists any way apply one formset in the admin.py for example
forms.py
number_fresh = Models.objects.all().count()
ProducFormset = formset_factory(ProductFresh, extra=number_fresh)
MyFormSet = ProducFormset(initial=[{'name': u'product1','pub_date': datetime.date.today(),}])
admin.py
class FreschInline(admin.TabularInline):
model = ProductFresch
formset = MyFormSet #apply here my formset but i have a error :(
extra = number_fresh
any idea ???
Cheers,
On Thu, Dec 27, 2012 at 9:52 PM, carlos <crocha09.09@gmail.com> wrote:
bad inglish version XDhi i have a questionis there any way to populate a combobox inline with everyone from a list of products I use an extra parameter automatically to the amount of products but do not know how to fill them with the products look the picture please
spanish versionhola, yo necesito hacer el llenado del combobox automaticamente cuando se habra el form para introducir datos tiene alguna idea de como hacerlo, si ven la foto yo hago el conteo del numero de productos y se lo paso al parametro extra=unaCantidad pero no se como automaticamentelos combo esten cargado ese formulario es un inlinesaludos
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.
No comments:
Post a Comment