Skip to content

Final code for the django-learning-log project in the PYTHON CRASH COURSE 3rd Ed. Book

License

Notifications You must be signed in to change notification settings

Shreehar-KE/pcc-django-learning-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Final code for the project blog of Chapters 18-20 from the book: PYTHON CRASH COURSE 3rd EDITION: A Hands-On, Project-Based Introduction to Programming by Eric Matthes.

Link to the book's solutions repo

Screenshot: Homepage

Note:

  • This code is only for local use and has no configurations for a cloud deployment.
  • This has few additional features(refer below) which are not mentioned in the book.

Additional Features

  • Added visibility attribute to the Topic model for public & private topics (similar to the blog project)
  • Removed help text in the Registration page.
  • Restriction of register, login & logout pages as per the user's authentication.
    • This is to prevent a scenario like: Logged-in user trying the access the register or login url.
    • This is implemented using custom middleware in the accounts app.
  • New edit-topic feature to edit a blog's title & visibility.
  • Conditional Display of create-entry, edit-entry & edit-topic links in topic page based on the user's authentication.
  • Recent Entries section in the Home page.

How to run this project:

  1. Create a new virtual environment with the packages mentioned in requirements.txt and activate it.
  2. Run python manage.py migrate to create a new db.sqlite3.
  3. Run python manage.py createsuperuser to create a new admin user.
    1. Enter username, email & password(won't be displayed)
  4. Run python manage.py runserver to run the project.
  5. Visit the url shown in the terminal
    1. For Ex. https://127.0.0.1:8000/
  6. To access the admin dashboard, visit the /admin subpage.
    1. For Ex. https://127.0.0.1:8000/admin

Learning Outcomes:

  • Basic MVT architecture of Django
  • Function based Views
  • Forms in Django
  • Basic Auth Functionality using Django
  • Template Inheritance in Django
  • Applying Bootstrap5 styling in Django
  • Custom Middlewares in Django

  • Languages used : python3,html
  • Frameworks used : django
  • Libraries used : django-bootstrap5
  • Tech Domain : Full-Stack-Development

About

Final code for the django-learning-log project in the PYTHON CRASH COURSE 3rd Ed. Book

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published