Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextField has been renamed to StringField #15

Merged
merged 3 commits into from Sep 1, 2012

Conversation

lucasvo
Copy link
Contributor

@lucasvo lucasvo commented Aug 31, 2012

@travisbot
Copy link

This pull request passes (merged ad49805 into 41943d2).

@travisbot
Copy link

This pull request passes (merged e55bf96 into 41943d2).

@travisbot
Copy link

This pull request passes (merged 7ff1d8f into 41943d2).

thomasst added a commit that referenced this pull request Sep 1, 2012
Fixing EmailField behavior in forms generated using model_form(Model)
@thomasst thomasst merged commit 86b52c3 into MongoEngine:master Sep 1, 2012
thomasst added a commit that referenced this pull request Sep 1, 2012
@benmezger
Copy link

Not sure if this is the reason I am having trouble.
I am creating a registration form, so for first name and last name (many other fields too) I am using StringField.

db = MongoEngine(app)

class Registration(db.Document):
    first_name = db.StringField(required=True)
    last_name = db.StringField(required=True)
    email = db.EmailField(required=True)

Later on..

RegistrationForm = model_form(Registration)

Call in my route;

@app.route("/")
def index():
    form = RegistrationForm()
    ....

But when rendering the HTML, apparently StringField formats as a text box, see this

@benmezger
Copy link

Seems that first_name renders as <textarea>

<textarea id="first_name" name="first_name"></textarea>```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants