开发者

django label tag on apache

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开发者_JS百科.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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜