Commit 04b7f896 authored by Giorgos Kazelidis's avatar Giorgos Kazelidis

- Added the copyright to README.md as well as to the templates (along with the...

- Added the copyright to README.md as well as to the templates (along with the relative Git repository URL) via base.html
- Created LICENSE.txt that contains the GNU General Public License version 2 and referenced the latter in README.md
- Added the "Local settings file" section to settings.py and inserted local_settings.py to .gitignore
- Set DATABASES["default"]["OPTIONS"]["init_command"]#collation_connection to utf8mb4_unicode_520_ci in settings.py
- Changed the argument of the Apache ServerAlias directive from "userbase.softlab.ntua.gr" to "slub.softlab.ntua.gr slub.softlab.ece.ntua.gr" as shown in the "INSTALLING AND CONFIGURING THE APACHE WEB SERVER TO DEPLOY THE PROJECT" section of README.md
parent b232cd45
......@@ -10,3 +10,7 @@ venv/
# folder that contains the log files created in production - see the "Logging" section of settings.py
production_logs/
# file that contains the settings needed for the remotely fetched project/application to work
# properly in the local environment - see the "Local settings file" section of settings.py
slub/slub/local_settings.py
This diff is collapsed.
## PROJECT OVERVIEW
* Type: Diploma thesis
* Subject: Development of the SoftLab UserBase (SLUB) web tool
* Subject: Development of the SoftLab UserBase (SLUB) web application
* Author: Georgios Kazelidis \<giorgkazelidis@gmail.com>
* Supervisor: Nikolaos Papaspyrou \<nickie@softlab.ntua.gr>
* Copyright: -
* License: -
* Copyright: © 2019 Georgios A. Kazelidis for SoftLab
* License: GNU General Public License, version 2 or (at your option) any later version [https://www.gnu.org/licenses/old-licenses/gpl-2.0.html]
## ENVIRONMENT SPECIFICATIONS
* Working OS: Ubuntu 16.04 LTS [https://www.ubuntu.com/]
......@@ -17,7 +17,7 @@
* concurrent-log-handler version: 0.9.12 [https://pypi.org/project/concurrent-log-handler/]
* mod_wsgi version: 4.6.5 [https://pypi.org/project/mod_wsgi/]
* mysqlclient version: 1.3.12 [https://pypi.org/project/mysqlclient/]
* MySQL server version: 5.7.24 [https://dev.mysql.com/]
* MySQL (community) server version: 5.7.24 [https://dev.mysql.com/]
* Apache web server version: 2.4.18 [https://httpd.apache.org/]
## DOWNLOADING THE PROJECT & SETTING UP THE ENVIRONMENT
......@@ -230,7 +230,7 @@ with the following content (make sure to replace SERVER_IP, PROCESSES_NUMBER, TH
<VirtualHost *:80>
ServerName SERVER_IP
ServerAlias userbase.softlab.ntua.gr
ServerAlias slub.softlab.ntua.gr slub.softlab.ece.ntua.gr
ServerAdmin webmaster@courses.softlab.ntua.gr
DocumentRoot /var/www/html/softlab_userbase/public_docs
......
......@@ -258,7 +258,7 @@ DATABASES = {
'sql_mode': 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,'
'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION',
'init_command': 'SET default_storage_engine = InnoDB;' if SET_DEFAULT_STORAGE_ENGINE_TO_INNODB else ''
'SET collation_connection = SET_COLLATION_CONNECTION_HERE;', # see README.md
'SET collation_connection = utf8mb4_unicode_520_ci;', # see README.md
},
},
}
......@@ -302,3 +302,11 @@ USE_TZ = True
STATIC_URL = '/static/'
# Local settings file
# As seen in README.md, when the present settings.py file is fetched/downloaded locally from the remote Git repository, some general settings, e.g. SECRET_KEY, DEBUG, ALLOWED_HOSTS and DATABASES['default']['PASSWORD'], need to be changed manually for the project/application to work properly in the local environment, e.g. the server (in production). To facilitate this procedure and avoid the manual changes in the present file on a regular basis, an auxilliary local_settings.py file can be used. This file should then reside in the same directory as the present file and contain the appropriate local values for the general settings that need to be changed. If the local_settings.py file exists, the local settings are imported to the present file, thus overriding the respective general ones. Otherwise (an ImportError exception is raised), no import occurs and the general settings of the present file are normally used - in this case, some manual changes need to be made. It is worth mentioning that if a local_settings.py file is used, it should never be pushed/stored to the remote Git repository for security reasons. Therefore, it should be deleted altogether, be omitted from the Git adding/staging step or be inserted to the .gitignore file of the local Git repository before any project/application changes are pushed to the remote one. For more information, see the "CHECKLIST AND TIPS FOR PROJECT DEPLOYMENT" section of README.md (specifically https://www.agileleaf.com/blog/a-better-way-to-manage-settings-py-in-your-django-projects/ and https://simpleisbetterthancomplex.com/tips/2017/07/03/django-tip-20-working-with-multiple-settings-modules.html).
try:
from .local_settings import *
except ImportError:
pass
......@@ -87,9 +87,15 @@
<table>
<tbody>
<tr>
<td style="width:250px;">&#xA9; {% now 'Y' %} SoftLab</td>
<td style="width:250px;"><a href="mailto:webmaster@courses.softlab.ntua.gr">Επικοινωνία με Webmaster</a></td>
<td style="width:250px; padding-left:30px;">
<td style="width:260px;">
<a href="https://git.softlab.ntua.gr/giorgkazelidis/userbase">
&#xA9; {% now 'Y' %} Γεώργιος Α. Καζελίδης για λογαριασμό του SoftLab
</a>
</td>
<td style="width:240px; padding-left:20px;">
<a href="mailto:webmaster@courses.softlab.ntua.gr">Επικοινωνία με Webmaster</a>
</td>
<td style="width:240px; padding-left:20px;">
Θερμές Ευχαριστίες σε <br />
<a href="https://www.djangoproject.com/" target="_blank">Django</a>,
<a href="https://www.mysql.com/" target="_blank">MySQL</a> και
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment