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

Tim b django lab05 drf movie #183

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
about to start adding users
  • Loading branch information
tooblekane committed Nov 23, 2022
commit d9a7248940f88f80a8d99f2560c59e7d6b2905d2
12 changes: 2 additions & 10 deletions code/tim/Django/lab05_drf_movie/qwikster/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@
<title>Qwikster (but worse!)</title>
</head>
<body>

{% csrf_token %}
<div id="app">
<p>Welcome to Qwikster. I'm sorry.</p><br>

{% comment %} {% for movie in object_list %}
<h2>{{ movie.title }}</h2>
<img src="{{ movie.cover.url}}" alt="{{ movie.title }}">
{% endfor %} {% endcomment %}

<div v-for="movie in movies">
<p>[[movie.title]] - [[movie.genre]] [[movie.year]] </p>
{% comment %} <img src="[[movie.cover.url]]"> {% endcomment %}
Expand All @@ -29,18 +25,14 @@ <h2>{{ movie.title }}</h2>
<input type='text' placeholder="Genre" v-model="newMovie.genre">
<input type='text' placeholder="Year" v-model="newMovie.year">
<input type='text' placeholder="Metacritic Rating" v-model="newMovie.metacritic">

<button @click="createMovie">Add Movie</button>
</div>
</div>

<!-- Import Ajax -->
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<!-- Import Vue.js -->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<!-- Import file.js -->
<script src="{% static '/app.js' %}"></script>
<!-- Mount App -->
<script> const mountApp = app.mount('#app') </script>

</body>
</html>