UBUNTU DJANGO-website https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django ```bash sudo apt install mariadb-client mariadb-server libmariadbclient-dev sudo pip3 install mysqlclient sudo mysql_secure_installation sudo mysql -u root ``` ```mysql 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; ``` ```bash sudo service mysql restart mysql -u pbarriat ``` ```mysql USE mysql; create database testdb; FLUSH PRIVILEGES; exit; ``` ```bash pip3 install django pip3 install djangorestframework ``` ECLIPSE Create Django Project With PyDev Django Wizard - django-admin startproject easydata - python3 manage.py startapp catalog Files: M easydata/easydata/settings.py M easydata/easydata/urls.py A easydata/catalog/urls.py ECLIPSE python3 manage.py makemigrations python3 manage.py migrate sudo apt install libldap2-dev libsasl2-dev sudo pip3 install django-auth-ldap 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