Data Initialization - cyliang/covart-web GitHub Wiki
Data Initialization
This page describes what to do when the website is just deployed.
For Meeting Functionality
Add Members
Go to admin page and add members (website/members).
Set Present Rotations
Go to admin page and set the rotation (meeting/present rotations). A presenter is scheduled after presenters with lower order, and the presenter with smallest order is scheduled after the one with largest order.
Add at least One Meeting History
Go to admin page and add meeting history (meeting/meeting historys).
Add Present Histories (Optional)
Go to admin page and optionally add present histories (meeting/present historys).
Configure the Auto-updater
Go to admin page and add a scheduled task (django q/scheduled tasks) with the following configuration:
- Func:
meeting.tasks.weekly_update
- Schedule Type: Weekly
- Next Run: The time holding the meeting
Configure the Automatic Email Notification
Go to admin page and add a scheduled task (django q/scheduled tasks) with the following configuration:
- Func:
meeting.tasks.meeting_notification
- Schedule Type: Weekly
- Next Run: The time holding the meeting
Configure the Rollcall Email Notification
To send an email to notify presenters to perform the rollcall, go to admin page and add a scheduled task (django q/scdheduled tasks) with the following configuration:
- Func:
meeting.tasks.rollcall_notification
- Schedule Type: Weekly
- Next Run: The time slightly before the meeting starts
For User Auth
Create Users for each Member and Connect
This can be simply done with the admin page. However, to create users with no password, doing this from shell is more convenient.
$ source venv/bin/activate
$ python manage.py shell
>>> from django.contrib.auth.models import User
>>> User.objects.create(username='his-username')
After users created, go to the admin page for members and connect the user of each member.
Connect each User to the Social Account (Google and Slack)
For each user to allow login with Google or Slack account, create an User social auth record like this:
- User: the user to connect
- Provider:
google-oauth2
orslack
- Uid: the email of the Google account, or the user ID of the Slack account the user connect to
- Extra data: keep the default