Giter Club home page Giter Club logo

tpl_hackathon_booking_backend's Introduction

Backend app for digital labs booking

Admin interfaces for managing resources represented as calendars for every library branch.

Event/calendar models and admin code are heavily inspired by https://github.com/llazzaro/django-scheduler

Frontend part can be found at -- https://gitlab.com/gorner/tpl-digital-booking

Requirements: Python 3.5 / Django 1.9 / Postgresql / virtualenvwrapper

Installation

Simple database setup -- using SQLITE3, replace DATABASES stanza in digital_hub/settings.py with this (now default) --

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'mydatabase',
    }
}

If you have database set up use the following

DATABASES = {
     'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'digital_hub',
        'USER': 'alex',
        'PASSWORD': 'alex',
        'HOST': 'localhost',
        'PORT': '5433'
        }
}

See these instructions on setting up postgres on ubuntu -- https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-django-application-on-ubuntu-16-04

Install django

$ mkvirtualenv --python `which python3` digital_hub
(digital_hub)$ pip install -r requirements.txt

Create, run migrations, create admin user, then start the server in development mode

$ workon digital_hub
(digital_hub) $ cd ${PROJECT_ROOT}/digital_hub
(digital_hub) $ python manage.py makemigrations
(digital_hub) $ python manage.py migrate
(digital_hub) $ python manage.py createsuperuser
....

(digital_hub) $ python manage.py runserver
System check identified no issues (0 silenced).
September 18, 2016 - 18:15:29
Django version 1.9.6, using settings 'digital_hub.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Open browser and go to http://127.0.0.1:8000/admin then use username and password set when running createsuperuser command.

Running ember and django

Pass the following options to ember in order to communicate with django site on port 8000

ember server --proxy http://127.0.0.1:8000

API sketch

presentation/API_overview.jpg

tpl_hackathon_booking_backend's People

Contributors

avolkov avatar

Watchers

James Cloos avatar

tpl_hackathon_booking_backend's Issues

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.