Code Monkey home page Code Monkey logo

py-taxi-service-startproject's Introduction

Taxi service startproject

In this task, you will start project Taxi service.

  1. Create a virtual environment, activate it, and install django via pip:
pip install django

Remember: everything you will do in this project, do with activated virtual environment.

  1. Start project taxi_service inside the current directory (add . at the end of the command):
django-admin startproject taxi_service .

You should have such structure:

py-taxi-service-startproject
|-> venv
|-> manage.py
|-> README.md
|-> taxi_service
    |-> __init__.py
    |-> settings.py
    ...
  1. Inside py-taxi-service-startproject start application taxi:
python manage.py startapp taxi
  1. Inside taxi/models.py create models according to this diagram:

image

Note: license_number and Manufacturer: name fields should be unique.

  1. You have noticed that Driver inherits from AbstractUser. It means that the standard User model should be replaced with the model Driver. Notice, that Driver has an additional field compared to the standard User.

  2. Edit admin.py:

    • Register all your models in the admin.
    • Make Driver's field license_number displayed as the other fields.
    • Add license_number to the fieldsets as Additional info category, so you can edit this field while updating Driver.
    • Add license_number to the add_fieldset as Additional info category, so you can fill this field while adding a driver.
    • Make it possible to search Car by model.
    • Make it possible to filter Car by manufacturer.
  3. Make migrations and migrate.

  4. Use python manage.py test to run tests.

  5. Check that each of the html-files has a blank line at the end.

  6. Don't forget add .gitignore file before pushing. Don't push a lot of extra files(venv, pycache, .idea, etc.).

Note: Attach screenshots of all created or modified pages to pull request.

  1. Attach screenshots to the comment, NOT in commit.
  2. It's important to attach images not links to them. See example:

image

Note: Check your code using this checklist before pushing your solution.

py-taxi-service-startproject's People

Contributors

masterpieceelbow avatar dmytrosvirsa avatar serhii-leonenko avatar tpolina avatar nattalli avatar abnormaltype avatar ivanramyk avatar djtyrf312 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.