Giter VIP home page Giter VIP logo

schedule's Introduction

Build Status

Create schedule templates and make Google Calendar Events from them

This file explains how to set up and run the project by hand. See the DEPLOY file for a suggested way of doing this on a remote server.

For licensing (BSD 3-clause), see COPYING.

Setup

# Create settings.py for Django:
cd schedulesite/schedulesite
cp settings_dev.py.template settings.py
# Set the SECRET_KEY in settings.py to some random string.
# Set CALENDAR_DOMAIN and TEST_CALENDAR_ID to the calendar to make events on.
cd -

npm install
PATH=./node_modules/.bin:$PATH bower install --config.interactive=false

Choose your Database by editing settings.py. If you choose PostgreSQL then run createdb futuschedule.

Make a Python virtual environment however you prefer, then:

pip install -r req.txt
./schedulesite/manage.py migrate

You need a project in the Google Developers Console. Download its client-secrets.json from there.

The first time the code needs Google OAuth, it looks for client-secrets.json in your current directory, prints a URL for you to authorize the app and get an access token in the URL fragment at the end. Credentials are stored in a_credentials_file in your current dir. Trigger this e.g. by running the unit tests (see below).

Populate your DB with FUM users

Get a JSON dump of FUM users (you need an API token for FUM)

go run dump-fum-users.go -o users.json «AccessToken»

Create Django users from this dump:

./schedulesite/manage.py shell
import futuschedule.util
futuschedule.util.updateUsers('users.json')

Populate your DB with Meeting Rooms

./schedulesite/manage.py shell
import futuschedule.util
futuschedule.util.updateMeetingRooms()

Test

PATH=./node_modules/.bin:$PATH jsx --no-cache-dir schedulesite/futuschedule/static/futuschedule/js/src schedulesite/futuschedule/static/futuschedule/js/build
./schedulesite/manage.py test futuschedule

Running

./schedulesite/manage.py migrate

# compile JSX files to plain JavaScript; JS files are copied unchanged
PATH=./node_modules/.bin:$PATH jsx --watch schedulesite/futuschedule/static/futuschedule/js/src schedulesite/futuschedule/static/futuschedule/js/build

# Start the webserver:
REMOTE_USER=myusername ./schedulesite/manage.py runserver

# Start the task-processor (kill with Ctrl+C (SIGINT) or SIGTERM):
./schedulesite/manage.py shell < task-processor.py

http://localhost:8000/futuschedule/

schedule's People

Contributors

mixman avatar ojarva avatar vtainio avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.