This repository contains the backend code for a RESTful APIs that provides access to assignments resources for teachers in the Competency Based Curriculum.
The README file provides the instructions on how to set up and run a Django application. It covers installing pip, setting up a virtual environment, installing dependencies from requirements.txt, and running the Django app.
Ensure you have the following installed on your system:
Python 3.10.12pip(Python package installer)
-
Open a terminal.
-
Run the following command to update package lists:
sudo apt update -
Install
pipusing the following command:sudo apt install python3-pip
-
Open the terminal.
-
Navigate to the directory where you want to create your Django project.
cd directory-name -
Run the following command to create a virtual environment:
python -m venv myenv -
Activate the virtual environment:
source myenv/bin/activate -
Install packages using pip:
$ pip install django -
Check installed packages:
$ pip freeze
-
Save installed packages to a requirements file:
$ pip freeze > requirements.txt -
Create a new Django project:
django-admin startproject myprojectThis will create a directory named
myprojectcontaining the initial project files. -
Navigate into the project directory:
cd myproject -
Run database migrations:
python manage.py migrate -
Create a superuser to access the Django admin dashboard:
python manage.py createsuperuser -
Start the development server:
python manage.py runserverThe server starts, navigate to
http://127.0.0.1:8000/in your browser.