Skip to content
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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

WIP: Update to Python 3 and modern Django #22

wants to merge 10 commits into from

Conversation

garw
Copy link
Member

@garw garw commented Apr 5, 2021

Update to Python3

garw added 6 commits April 3, 2021 22:55
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.
Copy link
Member

@towo towo left a 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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?",
Copy link
Member

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"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
models.URLField(blank=True, verbose_name="Project homepage url"),
models.URLField(blank=True, verbose_name="Project homepage URL"),

garw and others added 4 commits May 10, 2021 21:24
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants