The main repository for the development of SWD website of BITS Goa. It is hosted at swd.bits-goa.ac.in
Assuming you have python 3.4 (or above) already installed, go to the desired folder on your machine and follow these commands to clone the repository and install dependencies in a virtual environment:
It's possible to skip this step, but it's highly recommended to keep your coding environment tidy.
On Linux:
$ python3 -m venv swd
$ cd swd
$ source bin/activate
On Windows:
$ python -m venv swd
$ cd swd
$ swd\Scripts\activate
Fork the repository and clone it.
$ git clone https://github.com/YOUR_USERNAME/swd_django src
$ cd src/swd
$ pip install -r requirements.txt
- db.sqlite3 is the database for this repository, you can delete that if you want to start with a fresh database and follow: (But not required and can skip this step)
- Go to swd/config.py and change
PRODUCTION
andEMAIL_PROD
toFalse
- While committing any changes, make sure to change
PRODUCTION
andEMAIL_PROD
variable toTrue
again
Note: When setting up the environment make sure you run $ python manage.py setup_keys
, this will create dev_info.py
.
This needs to be done once only. This creates secret key and other important variables for the project. This will overwrite and previous file with same name and render
any previous database and session invalid.
$ python manage.py setup_keys
$ python manage.py migrate
- Create a superuser for admin controls (accessible at localhost:8000/admin)
$ python manage.py createsuperuser
- To generate dummy data for the website, use the following script
$ python populate_data.py
- this will create a super user with username as
admim
and password aspassword
- Run the server and access at localhost:8000
$ python manage.py runserver
- To login as a student use the format as username: f20180001 or p20180001 and password: passoword
- To login as admin, username: admin and password: password
Important: This requires the dev_info.py
to be present in tools
folder. Please contact the maintainers if you don't have it.
If you face any problem using the site, you can create an issue here or solve one if you are a developer. TIA :)
This project is licensed under MIT license.