Skip to content

Latest commit

 

History

History
136 lines (111 loc) · 3.35 KB

README.md

File metadata and controls

136 lines (111 loc) · 3.35 KB

schedulecu

Build Status

Link to project site: https://schedulecu.pythonanywhere.com

NOTE: Also deployed on Heroku at http://schedulecu.herokuapp.com/ Our database was too large for Heroku's free tier, so this deployment will likely not work very well (if at all)

ScheduleCU is a course scheduler for CU students. Students can search for classes, view details about each class (time, professor, section number, locations) as well as suggestions for alternate sections. Once a class is found, a student can add it to their schedule for planning (Schedule CU does NOT actually sign you up for classes, it is intended for planning ONLY). Students can also view FCQ data on their professors as well.

Local Installation/Development Server

Clone the schedulecu repository into a suitable directory. Create a virtual environment in this directory by using the following command:
Windows:

python -m venv <venv_name>

Linux/Mac:

python3 -m venv <venv_name>

Activate your virtual environment:
Windows:

./<venv_name>/Scripts/activate

Linux/Mac:

source <venv_name>/bin/activate

Install requirements:
Windows:

pip install -r requirements/base.txt

Linux/Mac:

pip3 install -r requirements/base.txt

Database Setup

Ensure you have a database management software installed. We recommend PostgreSQL. We also recommend a PostgreSQL GUI, such as pgAdmin 4

After your database manager of choice is installed, create a database named "schedulecu".

If not using pgAdmin 4,

postgres=# CREATE DATABASE schedulecu;

Set your database password:

postgres=# ALTER USER postgres PASSWORD 'myPassword';

Create a "keys.py" file in the config folder. Secret keys can be generated here

Populate it as follows:

secret_key = 'your_secret_key'
db_password = "your_password"
email_password = "email_password"

Udate your database settings in config/settings/development.py if necessary:

# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "NAME": "schedulecu",
        "USER": "postgres",
        "PASSWORD": db_password,
        "HOST": "localhost",
        "PORT": "5432",
    }
}

Usage

Make Database Migrations:
Windows:

python manage.py makemigrations

Linux/Mac:

python3 manage.py makemigrations

Migrate changes to Database:
Windows:

python manage.py migrate

Linux/Mac:

python3 manage.py migrate

Initialize the database:
This step will populate the database with all of our collected data. This will take a while, please be patient
Windows:

python manage.py initdb

Linux/Mac:

python3 manage.py initdb

Start Django Server:
Windows:

python manage.py runserver

Linux/Mac:

python3 manage.py runserver

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT