-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Update to Python 3 and modern Django #22
base: master
Are you sure you want to change the base?
Conversation
This is the first draft version with update to Python 3, Django 3.1 and the new django registration module. Basic login and item registration functionality seems functional. Known broken: - Everything RT related - Probably everything invoice rendering related
Reformat the whole codebase with python-black to obtain a modern python code formatting.
Fix ODT and PDF offer and invoice creation
Fix usage of MEDIA_ROOT as it is now a pathlib Path and not a string anymore.
Replace the (with Python 3 still incompatible) python-rtkit module with rt and adapt all RT functionality to work again.
Due to refactoring the old site-local config is now obsolete the new config is in local_settings.py.example. The settings.py is now static for all installations and should not be touched anymore. Moreover, add the local_settings.py to the example symlink to the ignorelist, so others can remove this when needed for their development environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of language adjustments I noticed while doing a drive-by review.
@@ -1,4 +1,8 @@ | |||
The complete software part and website templates is licensed under the MIT License (see below). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The complete software part and website templates is licensed under the MIT License (see below). | |
The software as well as the website templates are licensed under the MIT License (see below). |
@@ -1,4 +1,8 @@ | |||
The complete software part and website templates is licensed under the MIT License (see below). | |||
However, we use the python rt module that is licensed und GPLv3. As a consequence, this whole | |||
project is distributed under the terms of the GPLv3 even though all SaBot code itself is lisenced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project is distributed under the terms of the GPLv3 even though all SaBot code itself is lisenced | |
project is distributed under the terms of the GPLv3, even though all SaBot code itself is licensed |
@@ -1,4 +1,8 @@ | |||
The complete software part and website templates is licensed under the MIT License (see below). | |||
However, we use the python rt module that is licensed und GPLv3. As a consequence, this whole | |||
project is distributed under the terms of the GPLv3 even though all SaBot code itself is lisenced | |||
under the terms of the MIT License. If you want to use it under these terms, either disable the RT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
under the terms of the MIT License. If you want to use it under these terms, either disable the RT | |
under the terms of the MIT License. If you want to use it under those terms, either disable the RT |
"plannedProgram", | ||
models.TextField( | ||
blank=True, | ||
verbose_name="Give a short description of the program you plan for the Devroom. We will choose the projects based on this description. If you have special requirements, please note this also here.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verbose_name="Give a short description of the program you plan for the Devroom. We will choose the projects based on this description. If you have special requirements, please note this also here.", | |
verbose_name="Give a short description of the program you plan for the Devroom. We will choose the projects based on this description. If you have special requirements, please note those here as well.", |
"schedule", | ||
models.TextField( | ||
blank=True, | ||
verbose_name="How long do you want to use the dev room? (e.g. one day/both days/only one afternoom) If you don't want the complete time, do you have a preferred day/time?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably try to figure out if the wording should be "dev room", "devroom" or similar and pick a unified choice.
logo = models.ImageField( | ||
blank=True, upload_to="exhibitors/logos", verbose_name=_("Project logo") | ||
) | ||
homepage = models.URLField(blank=True, verbose_name=_("Project homepage url")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
homepage = models.URLField(blank=True, verbose_name=_("Project homepage url")) | |
homepage = models.URLField(blank=True, verbose_name=_("Project homepage URL")) |
model_name="invoice", | ||
name="payed", | ||
field=models.BooleanField( | ||
default=False, verbose_name="This invoice is payed." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default=False, verbose_name="This invoice is payed." | |
default=False, verbose_name="This invoice has been paid." |
) | ||
dueDate = models.DateField(verbose_name=_("Due date")) | ||
payed = models.BooleanField( | ||
default=False, editable=False, verbose_name=_("This invoice is payed.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default=False, editable=False, verbose_name=_("This invoice is payed.") | |
default=False, editable=False, verbose_name=_("This invoice has been paid.") |
model_name="invoice", | ||
name="payed", | ||
field=models.BooleanField( | ||
default=False, verbose_name="This invoice is payed.", editable=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default=False, verbose_name="This invoice is payed.", editable=False | |
default=False, verbose_name="This invoice has been paid.", editable=False |
), | ||
( | ||
"homepage", | ||
models.URLField(blank=True, verbose_name="Project homepage url"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
models.URLField(blank=True, verbose_name="Project homepage url"), | |
models.URLField(blank=True, verbose_name="Project homepage URL"), |
Django changed the signature of authenticate() on the caller end on and for the authentication backends to always include the request. Adapt this and add the TokenAuthenticationBackend to the default backends. Additional backends can be added by a local configuration by just appending to AUTHENTICATION_BACKENDS.
If debug mode is off, a cached template loader is should be used. However, due to wrong case, the option could not be applied, which lead to a startup failure if not run in debug mode.
Missing character has been added
Update to Python3