This is the backend component of the News Hub project. It provides APIs for managing news articles and related data.
- Python 3.12
- Pipenv
-
Clone the repository:
git clone https://github.com/your-username/your-repo.git
-
Navigate to the project directory:
cd your-repo
-
Install dependencies:
pipenv install
This guide will help you set up and run your Django server using the debugger in Visual Studio Code.
- Visual Studio Code installed on your system.
- Python and Django installed.
- Virtual environment created for your Django project.
-
Open Visual Studio Code: Open your project directory in Visual Studio Code.
-
Activate the virtual environment:
- In your terminal, navigate to the project directory.
- Run
pipenv shell
to activate the virtual environment.
-
Ensure interpreter is set to the virtual environment:
- CMD + Shift + P and select Python: Select Interpreter
- Select the interpreter that corresponds to your virtual environment in your terminal (e.g.,
/.local/share/virtualenvs/jv-capstone-news-api-L1uKDuQa/bin/activate
).
-
Start the debugger:
- Press
F5
or click on the green play button in the Debug view.
- Press
-
Verify server is running:
-
Open your terminal in VS code to verify that your Django server is running.
(e.g., `Watching for file changes with StatReloader Performing system checks...
System check identified no issues (0 silenced).
May 17, 2024 - 16:42:54
Django version 5.0.6, using settings 'newsproject.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.`).
-
By following these steps, you can start your Django server using the debugger in Visual Studio Code.