SpringCamp project for Green Team #MaliZeleni
Learn.com is an elearning web application with implemented courses to help you learn better and faster.
-
Install requirements
$ sudo apt-get update
$ sudo apt-get install python-pip python-dev mysql-server libmysqlclient-dev -
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; -
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'] -
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 -
Run Django App
$ python manage.py runserver
address http://localhost:8000/
Python 2.7
Django 1.11