Installing and running
Clone the repository
Add ALLOWED_HOSTS
in mycalendar/settings.py
for deployment
Install pip first
sudo apt-get install python3-pip
Then install virtualenv using pip3
pip3 install virtualenv
Now create a virtual environment
virtualenv venv
you can use any name insted of venv
Active your virtual environment:
source venv/bin/activate
Run the following commands in project directory.
You might need to delete db.sqlite3 to start afresh.
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate --run-syncdb
python manage.py collectstatic
python manage.py createsuperuser
python manage.py runserver
-
create a Google Cloud Console Project.
-
Go to Credentials, Auth consent, add a new app.
-
Go to http://127.0.0.1:8000/admin and sign in as superuser.
-
Add a new
Site
. -
Add the
Social Applications
and the credentials and the site. -
Copy
.env.sample
to a new file.env
and add above credentials here also. -
You are ready to run the App!
For running the web-app on the server as a background process, use nohup.
nohup python manage.py runserver &
This will output a PID, which can be later used to kill the process.
Note: http urls are no longer supported for non local domains
"python manage.py createsuperuser" should be run separately when in Docker to create the admin
In
/admin
page, setup "Social applications"
users directly sign in using Oauth, only clubs/secretaries can create events so add them to clubs separately from
/admin
page