title: How to pre-select dropdown on Django?
body: <p>I already tried other posts with similar problems but the code I'm dealing with was made by a third party and I'm having some small problems. I simply cannot define one of the forms with the initial value I want. How to proceed?</p>
  
  <p>models.py</p>
  
  <pre><code>class Livro(models.Model):
  codigo = models.AutoField(primary_key=True)
  nome = models.CharField("Nome", max_length=50, unique = True)
  autor = models.CharField("Autor", max_length=50, unique = True)
  edicao = models.CharField("Edição", max_length=30, unique = True)
  disciplina = models.ForeignKey(Disciplina)
  tipo = models.CharField("Tipo", max_length=20, choices = Choices.tipo)
  ano = models.CharField("Ano", max_length=30, choices = Choices.ano)
  situacao = models.CharField("Situação", max_length=30, choices = Choices.situacao, blank = True, null = True)
  def __unicode__(self):
      return self.nome
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>def cadastrar_livro(request):
  form = LivroForm(request.POST or None)
  if form.is_valid():
      salvo = form.save(commit=False)
      salvo.situacao = "Ativado"
      salvo.save()
      return HttpResponseRedirect('/principal')
  return render_to_response('cadastrar_livro.html', locals(),      context_instance = RequestContext(request))
  </code></pre>
  
  <p>and on choices.py</p>
  
  <pre><code>class Choices(models.Model):
      tipo = (
          ('1', 'Seriado'),
          ('2', 'Único'),
      )
  
      ano = (
          ('1', '1º'),
          ('2', '2º'),
          ('3', '3º'),
          ('4', 'Único'),
       )
  
      situacao = (
          ('Ativado', 'Ativado'),
          ('Desativado', 'Desativado'),
      )
  </code></pre>
  
  <p>I just need situacao to pre select Ativado but can't find any solutions to it. Need help thanks.</p>