Giter VIP home page Giter VIP logo

schedule_planner's Introduction

schedule planner

screenshot

Work in progress

App for viewing current schedule of a student, handling classes that are moved permanently, happen every N weeks, are moved occasionally and so on.

Running

python manage.py makemigrations
python manage.py migrate
python manage.py runserver

Summary

Done

  • setup the Django project
  • create and connect to the database
  • create basic models
  • display calendar properly
  • add username/password authentication
  • create fixture containing realistic data
  • add admin panel for managing change requests
  • split models into separate files
  • handle accept/decline buttons
  • use CSRF protection
  • handle one-time exceptions
  • show events happening every two weeks only when they should be visible
  • add user change report page
  • split views into separate files
  • split JS and some CSS in static files
  • add icon pack

Mini-docs

Application features:

Models

  • Event
  • Student
  • Teacher
  • Subject
  • ChangeRequest
  • SingularChange

Views

  • homepage with calendar
  • summary of user's reports
  • new report form
  • reports admin panel

Database

NOTE: migrations are not version controlled since development is dynamic and they would break too often. Auto generate them when needed.

In case you are missing some of those:

sudo apt-get update
sudo apt-get install python-pip python-dev libpq-dev postgresql postgresql-contrib

Now you can create the database:

# Login into PostgreSQL shell
sudo su - postgres
psql

# Create the database and user
CREATE DATABASE schedule_planner;
CREATE USER schedule_planner_user WITH PASSWORD 'schedule_planner_password';

# Setup user
ALTER ROLE schedule_planner_user SET client_encoding TO 'utf8';
ALTER ROLE schedule_planner_user SET default_transaction_isolation TO 'read committed';
ALTER ROLE schedule_planner_user SET timezone TO 'UTC';

# Give the user all privileges
GRANT ALL PRIVILEGES ON DATABASE schedule_planner TO schedule_planner_user;

# Quit
\q
exit

Make sure you've installed both Django and psycop2 (the latter is not installed by default and is required to connect to the PostgreSQL database)

pip install django psycopg2

Utilities

Show git stats (i.e. number of lines added/removed per file and global summary) from the initial commit until now:

git diff --stat d28d9970 HEAD

Create Django superuser:

python3 manage.py createsuperuser

schedule_planner's People

Contributors

tchayen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fschachi

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.