GithubHelp home page GithubHelp logo

task_10's Introduction

  1. Setup a virtual environment.
  2. Fork the repository for Django Task 10, in JoinCODED’s Github and Clone it.
  3. Install the packages from the requirements file.
  4. Create a field called owner for the Restaurant model.
    • ForeignKey to the User model.
    • set a default value or delete the database.
  5. Create a model called Item with the following fields:
    • name
    • description
    • price
    • restaurant: ForeignKey to the Restaurant model.
  6. Adjust the restaurant_create view so that when a user who is logged in creates a Restaurant object, they get assigned as the owner.
  7. The item_create view has been partially written for you, complete it:
    • The user should only input the name, description, and price.
    • The restaurant should be assigned automatically.
    • After creating an Item you should be redirected to the restaurant_detail page.
    • Display a Create Item button in the restaurant detail page.
  8. The URL for item_create has been partially written for you, complete it.
  9. Display a list of items belonging to the restaurant in the restaurant detail page.
  10. Pass the tests.
  11. Push your code.

task_10's People

Contributors

s-bader avatar darthhamza avatar samyabdelaal avatar lailalelouch avatar

Watchers

James Cloos avatar

Forkers

balmeshaan

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.