summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIla2019-05-18 11:01:33 +0000
committerIla2019-05-18 11:01:33 +0000
commitd3c4ae62d858cc07678d3e34a05d84f843efb34f (patch)
tree2320aa24bd4b673e3ddcd89f2c16fa4cc7b85e79
parent9a36abc696d2ceb62021225a9b26d933a29f18c5 (diff)
minor changes, updated readme, added report
-rw-r--r--report.md37
-rw-r--r--web/apps/users/admin.py2
-rw-r--r--web/apps/users/jwt_handler.py2
-rw-r--r--web/pgperffarm/settings.py2
-rw-r--r--web/requirements.txt4
5 files changed, 42 insertions, 5 deletions
diff --git a/report.md b/report.md
new file mode 100644
index 0000000..553530b
--- /dev/null
+++ b/report.md
@@ -0,0 +1,37 @@
+# Google Summer of Code 2019 - report
+
+Introduction - todo
+
+
+
+
+
+## Community bonding
+
+#### Migrating from Python2.7 to Python3
+
+Since Python2.7 is no longer going to be maintained in 2020, the community agrees that migrating is necessary. The latest stable version of Python is Python3.6, and Python3.7 has had some issues with older versions of Django, hence I am going to use the first.
+
+The major changes encountered are:
+
+* `import` syntax;
+* Manually compiled requirements with pip3;
+* Upgraded the Django version (see below);
+* General syntax changes (WIP);
+* Error while installing psycopg2:
+ * `env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install psycopg2` on Mac, with Xcode developer tools and openssl;
+
+Changes have been added to `requirements.txt`.
+
+TODO: continue making migrations using Python3.6, debugging and fixing the code.
+
+
+
+#### Django version
+
+Using Django1.11 is recommended because the authentication module is on a Django application, so there might be incompatibilies. The version has nonetheless being updated from 1.11.10 to 1.11.17, because the older one has bugs concerning Python3.
+
+
+
+##
+
diff --git a/web/apps/users/admin.py b/web/apps/users/admin.py
index 2c31eef..c7ef0fa 100644
--- a/web/apps/users/admin.py
+++ b/web/apps/users/admin.py
@@ -5,7 +5,7 @@ from django.contrib import admin
from asynchronous_send_mail import send_mail
from django.conf import settings
# Register your models here.
-from serializer import UserMachineSerializer
+from .serializer import UserMachineSerializer
from .models import UserMachine, UserProfile
class UserProfileAdmin(admin.ModelAdmin):
diff --git a/web/apps/users/jwt_handler.py b/web/apps/users/jwt_handler.py
index 7dfdb94..ff8fdaa 100644
--- a/web/apps/users/jwt_handler.py
+++ b/web/apps/users/jwt_handler.py
@@ -1,4 +1,4 @@
-from serializer import JWTUserProfileSerializer
+from .serializer import JWTUserProfileSerializer
# user jwt handler
def jwt_response_payload_handler(token, user=None, request=None):
diff --git a/web/pgperffarm/settings.py b/web/pgperffarm/settings.py
index 52c1987..226a29b 100644
--- a/web/pgperffarm/settings.py
+++ b/web/pgperffarm/settings.py
@@ -4,7 +4,7 @@ import os
import sys
# Load local settings overrides
-from settings_local import *
+from pgperffarm.settings_local import *
"""
Django settings for pgperfarm project.
diff --git a/web/requirements.txt b/web/requirements.txt
index 9b8d591..1744f0e 100644
--- a/web/requirements.txt
+++ b/web/requirements.txt
@@ -6,7 +6,7 @@ coreschema==0.0.4
data==0.4
decorator==4.3.0
diff-match-patch==20121119
-Django==1.11.10
+Django==1.11.17
django-cors-headers==2.2.0
django-crispy-forms==1.7.2
django-filter==1.1.0
@@ -28,7 +28,6 @@ Markdown==2.6.11
MarkupSafe==1.0
odfpy==1.3.6
openpyxl==2.5.4
-psycopg2==2.7.4
pycrypto==2.6.1
PyJWT==1.6.4
pytz==2018.3
@@ -42,3 +41,4 @@ uritemplate==3.0.0
urllib3==1.22
xlrd==1.1.0
xlwt==1.3.0
+psycopg2==2.8.2