yes, that was that I copy and didn't select de ', so when I pasted I saw only the missing bracket.
On 31 mayo, 04:07, [email protected] wrote: > First, you did enclose doc properly. You wrote 'doc instead of 'doc'. > Sort that first. I'm however not suggesting that is the solution. > Regards. > Sent from my BlackBerry wireless device from MTN > > > > > > > > -----Original Message----- > From: podio <[email protected]> > > Sender: [email protected] > Date: Mon, 30 May 2011 16:24:10 > To: Django users<[email protected]> > Reply-To: [email protected] > Subject: admin site search field > > Hi, I'm new and I'm trying to make an app that have a field, pointing > to a record of the same object class. How can a make django has a > search form and show the record of the class on a popup window > likehttp://demoweb.cibernatural.com/admin/gestion/presupuesto/add/(user > and password demo:demo) but pointing to the same class > > class afiliado(models.Model): > def __unicode__(self): > return self.nombre > nombre = models.CharField("Nombre",max_length=200) > fecha_nac = models.DateField("Fecha Nacimiento") > doc = models.CharField("Documento",max_length=20,blank =True) > obra_social = models.ForeignKey(obra_sociale) > caracter = models.ForeignKey(caractere) > tipo = models.ForeignKey(tipo) > titular = models.CharField(max_length=200) ------------> this > field > > class AfiliadoAdmin(admin.ModelAdmin): > fieldsets = [ > (None ,{'fields': > ['nombre','fecha_nac','DOCN','Nacionalidad']}), > ('Datos Generales' ,{'fields': > ['obra_social','caracter','tipo',"titular",'Matricula','fecha_ing']}), > ('Datos de contacto',{'fields': > ['Direccion',"CP","Ciudad","Provincia","Tel1","Tel2","Email"]}), > ] > list_display = ('nombre',"tipo") > list_filter = ['Ciudad'] > search_fields = ['nombre','doc] > > Thansk! > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

