UBUNTU DJANGO-MYSQL

sudo pip3 install django
sudo pip3 install djangorestframework
sudo apt install mariadb-client
sudo apt install mariadb-server
sudo apt install libmariadbclient-dev
sudo pip3 install mysqlclient
sudo apt install libldap2-dev libsasl2-dev
sudo pip3 install django-auth-ldap

sudo mysql_secure_installation
(all default)

sudo mysql -u root
USE mysql;
CREATE USER 'pbarriat'@'localhost' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON *.* TO 'pbarriat'@'localhost';
UPDATE user SET plugin='auth_socket' WHERE User='pbarriat';
UPDATE user SET plugin='unix_socket' WHERE User='pbarriat';
FLUSH PRIVILEGES;
exit;

sudo service mysql restart
mysql -u pbarriat

USE mysql;
create database testdb;
exit;

ECLIPSE
Create Django Project With PyDev Django Wizard

settings.py
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', 
        'NAME': 'testdb',
        'USER': 'pbarriat',
        'PASSWORD': '',
        'HOST': 'localhost',   
        'PORT': '3306',
    }
}
Next, add 'rest_framework' to the INSTALLED_APPS array

cd ${ECLIPSEWorkspace}/MyApp
python3 manage.py migrate
python3 manage.py createsuperuser

python3 manage.py startapp testapp
Next, add 'testapp' to the INSTALLED_APPS array
Now refresh the Django project folder in eclipse

settings.py
TEMPLATES = [
    {
        'DIRS': ['/home/pbarriat/Eclipse/workspace_parallel/MyApp/'],

urls.py
from django.contrib import admin
from django.urls import path,include
from django.conf.urls import url

urlpatterns = [
    path('admin/', admin.site.urls),
    url('^testapp/', include(('testapp.urls','testapp'), namespace='testapp')),
]

testapp/urls.py
from django.contrib import admin
from django.urls import path
from django.conf.urls import url
from . import views
import testapp

urlpatterns = [
    path('admin/', admin.site.urls),
    path('testapp', views.testapp, name='testapp'),
]

firstApp/views.py
def firstApp(request):
    # The html file path relative to TEMPLATE DIRS directory defined in DjangoProjectExample / settings.py file..
    firstApp_file_path = 'firstApp/pages/index.html'
    # The context object will send back to client, it is a dictionary object contains a Message.
    context = {'Message' : 'Welcome to Django world.'}
    return render(request, firstApp_file_path, context)


Create directory 'pages' in firstApp folder
Create index.html file in pages directory
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Python Django firstApp</title>
</head>
<body>
{{Message}}
</body>
</html>

ECLIPSE Runs as PyDev:Django
http://localhost:8000/firstApp/hello

python3 manage.py makemigrations
python3 manage.py migrate