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.
python
pip
- unrestricted execution policy (Windows requirement)
-
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.
-
- Order stories by date
- Styled "new story" form
- Story images
- Log-in/log-out
- "Account view" page
- "Create Account" page
- View stories by author
- "Log-in" button only visible when no user is logged in/"Log-out" button only visible when a user is logged in
- "Create Story" functionality only available when user is logged in
-
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.
-
Gracefully handle the error where someone tries to create a new story when they are not logged in.