Skip to content

sofiiasavkova/py-taxi-service-authentication

This branch is 2 commits ahead of mate-academy/py-taxi-service-authentication:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

24529bb · Nov 21, 2024

History

45 Commits
Oct 11, 2022
Apr 12, 2022
Nov 20, 2024
Nov 20, 2024
Nov 21, 2024
Jan 3, 2023
Sep 12, 2024
Sep 12, 2024
Jan 3, 2023
Dec 7, 2022
Apr 12, 2022
Oct 11, 2022
Sep 8, 2022

Repository files navigation

Taxi service authentication

Read the guideline before starting.

  • Use the following command to load prepared data from fixture to test and debug your code: python manage.py loaddata taxi_service_db_data.json.
  • After loading data from fixture you can use following superuser (or create another one by yourself):
    • Login: admin.user
    • Password: 1qazcde3
  • Make sure that you change the settings for html-files.

Feel free to add more data using admin panel, if needed.

In this task, you will implement a visit counter, login/logout functionality, and make your site available only authenticated users.

  1. Implement a visit counter on the home screen (use the num_visits variable name). It should show how many times a user visited the home page before.

  2. Create login/logout screens. Provide authentication to your project using built-in Django authentication.

  3. Display the username on the top of the sidebar and login/logout button depending on if the user is authenticated. If the driver clicks on username - the corresponding Driver detail page must open.

  4. Protect all your views from unauthenticated users.

  5. In Driver's list view add (Me), if this is a current user:

Example:

- Admin User (Me)
- Joyce Byers
- Jim Hopper

NOTE: Attach screenshots of all created or modified pages to pull request. It's important to attach images not links to them. See example:

image

Note: we use the - hyphen in URLs names in our Django course, whilst we use the _ underscore in our DRF course.

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 82.2%
  • HTML 17.7%
  • CSS 0.1%