Results 1 to 3 of 3

Thread: [python] Django; classe cerca

  1. #1
    Lieutenant Commander Mez's Avatar
    Join Date
    Sep 2003
    Location
    Milano
    Posts
    6.607

    Default [python] Django; classe cerca

    Ho fatto un applicazione "sondaggio" con "domande" "categorie"
    le classi che ho creato sono:
    Code:
    class Categoria(models.Model):
       nome = models.CharField(max_length=100)
       def __unicode__(self):
          return self.nome
       class Meta:
          verbose_name_plural = "Categorie"
    
    
    class Sondaggio(models.Model):
       domanda = models.CharField(max_length=200)
       data_pubblicazione = models.DateTimeField('data di pubblicazione')
       categoria = models.ForeignKey(Categoria)
       def __unicode__(self):
          return self.domanda
       class Meta:
          verbose_name_plural = "Domande"
    Come posso fare un cerca tra le categorie ?

    anyone?

  2. #2
    Lieutenant Commander San Vegeta's Avatar
    Join Date
    Oct 2003
    Location
    Bologna
    Posts
    12.153

    Default

    sorry vecchio, ma non ce la faccio proprio, sono esaurito... cerca un po' sui tutorial, non è per niente difficile, giuro
    I rubinetti a casa di Chuck Norris non perdono, vincono.

    In the beginning there was nothing...then Chuck Norris Roundhouse kicked that nothing in the face and said "Get a job". That is the story of the universe.

    Quote Originally Posted by Wolfo View Post
    Concordo e propongo ban temporanei per chi critica la topa , la topa non si critica , dal trombabile in su non si commenta in modo sgradevole.
    la tua ignoranza in materia e' raccapricciante
    -cit. Estrema, 2022

  3. #3
    Lieutenant Commander Mez's Avatar
    Join Date
    Sep 2003
    Location
    Milano
    Posts
    6.607

    Default

    ho risolti facendo una funziona con un searchfield

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[Output: 45.53 Kb. compressed to 38.51 Kb. by saving 7.02 Kb. (15.41%)]