Git Product home page Git Product logo

django_views_urls_templates's Introduction

Django_Views_URLs_Templates

Task#1

Update your Movie website to have a splash page that welcomes users and lets them know what site they are on.

These steps will help you complete your task:

  • In your index view, render the base.html template.
  • Update the base.html template to contain the welcome message. It should be in both the tag in <head> and in a new <h1> tag in the body.

Task#2

A useful feature for a site like Movies is the ability to search through the data to find something on the site quickly. You need to implement movie searching, to allow users to find a particular movie by part of its title. While we don't have any movies to find yet, we can still implement a page that shows the text the user searched for. The user enters the search string as part of the URL parameters.

These steps will help you complete your task:

  • Create a search result HTML template. It should include a variable placeholder to show the search word(s) that were passed in through the render context. Show the passed-in variable in the and <h1> tags. Use an <em> tag around the search text in the body to make it italic.
  • Add a search view function in views.py. The view should read a search string from the URL parameters (in the request's GET attribute). It should then render the template you created in the previous step, passing in the search value to be substituted, using the context dictionary.
  • Add a URL mapping to your new view to urls.py. The URL can be something like /movies-search.

django_views_urls_templates's People

Contributors

wafa-alrizqi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.