开发者

django label tag on apache

开发者 https://www.devze.com 2023-03-25 15:49 出处:网络
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.

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

精彩评论

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

关注公众号