Skip to content

Latest commit

 

History

History
48 lines (42 loc) · 1.71 KB

README.md

File metadata and controls

48 lines (42 loc) · 1.71 KB

Introduction

SpringCamp project for Green Team #MaliZeleni
Learn.com is an elearning web application with implemented courses to help you learn better and faster.
myimage-alt-tag

Installation

  1. Install requirements
    $ sudo apt-get update
    $ sudo apt-get install python-pip python-dev mysql-server libmysqlclient-dev

  2. Create Database and User
    $ mysql -u root -p
    mysql> CREATE DATABASE my_database CHARACTER SET UTF8;
    mysql> CREATE USER user@localhost IDENTIFIED BY 'password';
    mysql> GRANT ALL PRIVILEGES ON my_database.* TO user@localhost;
    mysql> FLUSH PRIVILEGES;

  3. Clone project and create settings.py and private_settings.py files in sc-project-green/djangoelearning/
    $ git clone https://github.com/ExtensionEngine/sc-project-green.git

    private.py format:
    [client]
    database = my_database
    user = user
    password = password
    host = localhost
    port =
    default-character-set = utf8

    private_settings.py format:
    LOCAL_SETTINGS = True
    from settings import *
    SECRET_KEY = 'some generated secret key'
    ALLOWED_HOSTS = ['localhost', '127.0.0.1']

  4. Install Virtual Environment in sc-project-green, activate it, install REQUIREMENTS and apply migrations to the database
    $ cd sc-project-green
    $ sudo pip install virtualenv
    $ virtualenv djangoenv
    $ source djangoenv/bin/activate
    $ pip install -r REQUIREMENTS
    $ python manage.py migrate

  5. Run Django App
    $ python manage.py runserver
    address http://localhost:8000/

Compatibility

Python 2.7
Django 1.11