First of all you'll need to download all the code to your local machine. For this there are two ways: noob and pro.
Download the zip file and extract it to the folder of your choice.
-
Install
git
-
Go to the folder and open terminal here.
-
Type command :
git clone https://github.com/GurpreetSarangal/Project-Allotment-Software.git
-
Once all the code is downloaded, open it in VSCode (coz I use it).
-
Make sure the folder
Project-Allotment-Software
is open in terminal. -
Here we are gonna require virtual environment of python. If you don't know how to create a virtual environment refer to this heading
-
After activating venv we'll install all the requirements by typing following command
pip install -r requirements.txt
-
After all the requirements installed we are ready to start our project
Always make sure to activate venv before starting the project
-
If your terminal is on
Project-Allotment-Software
then cd toProjectAllotment
cd ProjectAllotment/
-
Once you are on
ProjectAllotment
folder, typels
to check if the folder containsmanage.py
file.$ ls collegeAdmin college.db login manage.py ProjectAllotment staff
-
Now you can start the django server by typing following command:
python manage.py runserver
-
After starting the server your website will be live on
localhost:8000//
-
To Quit the server press Ctrl + C
If you accidentally close the terminal without quitting the server, and again try to run the server, it'll show an error that
this port is already in use
. To remove this error refer this
In this project we have two types of users: Staff and the Admin. And you will need to contact me for usernames and passwords ; )
Now you will need to understand internal working of the project so refer to this guide
-
Firstly install the
virtualenv
library on your local computer. -
Then open the folder and invoke the terminal here.
-
Type in the command :
$ virtualenv <my_env_name> $ source <my_env_name>/bin/activate
-
For example:
virtualenv venv source venv/bin/activate
-
These commands will create and activate the virtual environment for python. Now you'll have to install all the requirements of the project explained here
Note that all these commands are for linux or unix based operating systems for windows refer here
-
Install
virtualenv
pip install virtualenv
-
Type this to create the virtual environment
virtualenv <my_env_name>
-
Now activate the virtual environment
<my_env_name>\Scripts\activate
-
It can be deactivated by this command :
deactivate
This error can be resolved by explicitly closing the port :
sudo fuser -k 8000/tcp