Skip to content

rosiejeays/django-project-she-codes-news

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rosie Maguire - She Codes News Project

About This Project

This project uses HTML, CSS and the Django framework. It is a news website that allows users to read news stories, and authors to create them.

Prerequisites

  • python
  • pip
  • unrestricted execution policy (Windows requirement)

How To Run This Code

  • Clone a copy of this repo to your local machine. This can be done in the command line by navigating to the desired directory, then running:

      git clone https://github.com/rosiemaguire/django-project-she-codes-news.git
    
  • Once you have a local version of this repository, you'll need to set up your virtual environment:

    • navigate to the folder that contains the requirements.txt file

    • If you're on a windows machine, run the command

        . venv/Scripts/activate
      
    • If you're on a mac, run the command

        source venv/bin/activate
      
    • Install the Django library:

        python -m pip install -r requirements.txt
      
    • Check installation was successful:

        python -m pip freeze
      
    • Change directory to where manage.py is located:

        cd she_codes_news
      
    • Make the inital migrations:

        python manage.py migrate
      
    • Load the template data for the news articles by running these two commands:

        python manage.py loaddata users
        python manage.py loaddata news
      
    • Now with everything set up, you'll just need to run the server!

        python manage.py runserver
      
    • Open http://localhost:8000/news to view and interact with the website

    • When you're finished press CTRL+C to quit the server

    • Deactivate the virtual environment by either using the command deactivate or terminate your terminal session.

Database Schema

My ERD

Project Features

  • Order stories by date Latest stories ordered by publication date
  • Styled "new story" form Add Story Form
  • Story images Correct Image attached to full story view
  • Log-in/log-out Log In Screen Reset Password Screen
  • "Account view" page Account View
  • "Create Account" page Create Account Page
  • View stories by author Search articles by author
  • "Log-in" button only visible when no user is logged in/"Log-out" button only visible when a user is logged in Log in button visible when no one logged in
  • "Create Story" functionality only available when user is logged in Write New Story in Nav bar when logged in

Additional Features:

  • Add categories to the stories and allow the user to search for stories by category.

  • Add the ability to update and delete stories (consider permissions - whos hould be allowed to update or and/or delete stories).

  • Add the ability to “favourite” stories and see a page with your favourite stories.

  • Our form for creating stories requires you to add the publication date, update this to automatically save the publication date as the day the story was first published. Add Story Form

  • Gracefully handle the error where someone tries to create a new story when they are not logged in.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published