Jim's
Tutorials

Spring 2018
course
site

UGH ok I fiddled around with this react component for a while, could not get the fields to take inputs properly.

render() {
    return (
      <form onSubmit={this.handleSubmit}>

        <label>
          Name:
          <input type="text" name= "name" value={this.state.name} onChange={this.handleChange} />
        </label>
        <label>
          Email:
          <input type="text" name= "email" value={this.state.email} onChange={this.handleChange} />

..so I made a bunch of fields like that, email, city, etc (anything to take personal information) because I’m trying to add a “signup” form for this react app I already made… so that when people sign up to participate I can track them. Anyway, turns out I was missing a “name” value in all of them. Interesting it would have that side-effect- initially the thing wasn’t letting strings be entered into fields.

I learned about tools I might use to expose my project’s models via a restful API. http://flask.pocoo.org/docs/0.12/tutorial/templates/

..some debugging : https://stackoverflow.com/questions/25964312/not-null-constraint-failed-after-adding-to-models-py

…was trying to pass in different configuration settings in flask.. http://flask.pocoo.org/snippets/20/

..more info working with flask templates : http://flask.pocoo.org/docs/0.12/tutorial/templates/

…yeah this is super, super hard. I’m getting really mixed up with all the different parts of this, already overwhelmed.