8000 Changed new_form to new_movie by LUS24 · Pull Request #69 · tecladocode/web-dev-bootcamp · GitHub
[go: up one dir, main page]

Skip to content

Changed new_form to new_movie #69

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

Merged
merged 2 commits into from
May 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ For now, the `POST` request does nothing. Let's render our form first, and handl

## How to render a WTForms field

First things first, let's create our `templates/new_form.html` file. This is where our form will live:
First things first, let's create our `templates/new_movie.html` file. This is where our form will live:

```jinja2
{% extends "layout.html" %}
Expand Down Expand Up @@ -131,7 +131,7 @@ Let's create `templates/macros/fields.html` and place this inside it:
{% endmacro %}
```

Now we can just import that from `templates/new_form.html` and use it three times, once per field:
Now we can just import that from `templates/new_movie.html` and use it three times, once per field:

```jinja2
{% from "macros/fields.html" import render_text_field %}
Expand Down Expand Up @@ -386,4 +386,4 @@ Finally, we need to add button styling:

And with that, we're done! Quite a lot of CSS, but not many new properties that you haven't seen before.

As usual, I recommend you code along with me and play around with the CSS properties we're using. Make the design your own by changing certain parts, and truly understand what each property is doing!
As usual, I recommend you code along with me and play around with the CSS properties we're using. Make the design your own by changing certain parts, and truly understand what each property is doing!
0