2

I've a problem with form rendering on a form which inherits from my own User model. When the rendering is made in dev, everything is OK. But in prod, with apache and mod_python, the form is not generated!

Here is my model and model form:

class ClientUser(models.Model):
    company = models.CharField(_("Société"), max_length=255)
    email = models.EmailField(_("Email"), max_length=255, unique=True)
    phone = models.CharField(_("Numéro de téléphone"),max_length=255,
                             null=True, blank=True)
    country = CountryField(_('Pays'))

class ClientAccountForm(forms.ModelForm):
    class Meta:
        model = ClientUser

In my template, I render the form as a table :

<form name="contact_form" method="post" id="contact_form">
<table>
    {{form.as_table}}
</table>
<input type="submit" value="{% trans "Envoyer" %}">
</form>

Thanks for your help

renard
  • 1,368
  • 6
  • 20
  • 40
  • Finally resolved. Thanks to this [link](http://menudoproblema.es/blog/entries/2011/01/07/django-y-los-formularios-typeerror-lazy-object-ret/). The problem seems to come from the ugettext_lazy... – renard Aug 05 '11 at 10:06
  • 1
    Then please close the question. – sergzach Sep 16 '11 at 20:01

0 Answers0