2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

Upversioned packages. Also now Dj4.0 capable.

This commit is contained in:
Philip Sargent 2022-03-04 14:54:49 +00:00
parent dc4374cb9e
commit 1b9fccc2a4
3 changed files with 25 additions and 15 deletions

View File

@ -1,10 +1,10 @@
asgiref==3.3.4 asgiref==3.5.0
confusable-homoglyphs==3.2.0 confusable-homoglyphs==3.2.0
coverage==5.5 coverage==6.3.2
Django==2.2.25 Django==3.2.12
docutils==0.14 docutils==0.18.1
gunicorn==20.1.0 gunicorn==20.1.0
pytz==2019.1 pytz==2021.3
sqlparse==0.2.4 sqlparse==0.4.2
typing-extensions==3.7.4.3 typing-extensions==4.1.1
Unidecode==1.0.23 Unidecode==1.3.3

View File

@ -1,5 +1,5 @@
from django.conf import settings from django.conf import settings
from django.conf.urls import url, include, re_path from django.urls import include, re_path
from django.views.generic.base import RedirectView from django.views.generic.base import RedirectView
from django.views.generic.edit import UpdateView from django.views.generic.edit import UpdateView
from django.views.generic.list import ListView from django.views.generic.list import ListView
@ -61,7 +61,7 @@ else:
# see https://docs.djangoproject.com/en/dev/topics/auth/default/ # see https://docs.djangoproject.com/en/dev/topics/auth/default/
# The URLs provided by include('django.contrib.auth.urls') are: # The URLs provided by include('django.contrib.auth.urls') are:
#
# accounts/login/ [name='login'] # accounts/login/ [name='login']
# accounts/logout/ [name='logout'] # accounts/logout/ [name='logout']
# accounts/password_change/ [name='password_change'] # accounts/password_change/ [name='password_change']
@ -71,8 +71,6 @@ else:
# accounts/reset/<uidb64>/<token>/ [name='password_reset_confirm'] # accounts/reset/<uidb64>/<token>/ [name='password_reset_confirm']
# accounts/reset/done/ [name='password_reset_complete'] # accounts/reset/done/ [name='password_reset_complete']
# these worked in Django 2.2.24 but failed in .25 even though we include django.contrib.auth
trogglepatterns = [ trogglepatterns = [
path('expofiles/', include(expofilesurls)), # intercepted by Apache, if it is running. path('expofiles/', include(expofilesurls)), # intercepted by Apache, if it is running.
path('expofiles', include(expofilesurls)), # curious interaction with the include() here, not just a slash problem. path('expofiles', include(expofilesurls)), # curious interaction with the include() here, not just a slash problem.

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
# Run this in a terminal in the troggle directory: 'bash venv-trog.sh' # Run this in a terminal in the troggle directory: 'bash venv-trog.sh'
echo 'Run this in a terminal in the troggle directory: "bash venv-trog.sh"'
# Expects an Ubuntu 20.04 relatively clean install. # Expects an Ubuntu 20.04 relatively clean install.
# Running using SQLite 3.31.1 2020-01-27 19:55:54 # Running using SQLite 3.31.1 2020-01-27 19:55:54
@ -10,11 +11,18 @@
# sudo apt install python3-pip # sudo apt install python3-pip
# sudo apt install python3.9 # sudo apt install python3.9
# On a clean debian 11 (bullseye) installation with Xfce & ssh,
# as debian does not install everything that ubuntu does, you need:
# sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
# sudo apt install python3-pip
# sudo apt piinstall python3-venv
# copy this file and requirements.txt into the directory above where you want to install the VENV # copy this file and requirements.txt into the directory above where you want to install the VENV
VENAME=p39 # python3.9 and django 2.22.25 VENAME=d4 # python3.9 and django 4
if [ -d requirements.txt ]; then if [ -d requirements.txt ]; then
echo "No requirements.txt found. Copy it here from your most recent installation." echo "No requirements.txt found. Copy it from your most recent installation."
exit 1 exit 1
fi fi
@ -31,7 +39,11 @@ fi
echo "### Activating $VENAME" echo "### Activating $VENAME"
cd $VENAME cd $VENAME
source bin/activate source bin/activate
PIP=bin/pip # update local version of pip, more recent than OS version
# debian bullseye installs pip 20.3.4 which barfs, we want >22.0.3
python -m pip install --upgrade pip
PIP=pip
$PIP list > original-pip.list $PIP list > original-pip.list
$PIP freeze >original.txt $PIP freeze >original.txt