ctrl-alt-d / django-aula

Gestió de presencia, incidències i més en centres educatius i acadèmies.
Other
18 stars 28 forks source link

Problema al fer la actualització #83

Closed jaumeteixidor closed 5 years ago

jaumeteixidor commented 5 years ago

Descripció el problema Tinc problemes per a fer la actualització de la versió per a incorporar la funcionalitat de les fotos.

Passes per reproduir-ho En el meu cas he fet : cd /opt/djau2019 git pull source venv/bin/activate python manage.py migrate

  1. L'error que he obtingut és: djau2019@freser:~$ cd /opt/djau2019/ djau2019@freser:/opt/djau2019$ git pull remote: Enumerating objects: 306, done. remote: Counting objects: 100% (306/306), done. remote: Compressing objects: 100% (16/16), done. remote: Total 447 (delta 295), reused 292 (delta 290), pack-reused 141 S'estan rebent objectes: 100% (447/447), 1.86 MiB | 1.59 MiB/s, fet. S'estan resolent les diferències: 100% (360/360), s'ha completat amb 104 objectes locals. De https://github.com/ctrl-alt-d/django-aula 4103d06..f6544e7 master -> origin/master 0aaddb2..199db00 develop -> origin/develop
    • [branca nova] feature/docQuimSaurina -> origin/feature/docQuimSaurina be8e3d6..1df13bf feature/fotos -> origin/feature/fotos
    • [branca nova] feature/nomalumne -> origin/feature/nomalumne
    • [branca nova] feature/toniAlsCredits -> origin/feature/toniAlsCredits
    • [branca nova] hackoctoberfest -> origin/hackoctoberfest
    • [etiqueta nova] 2019-09-001 -> 2019-09-001 S'estan actualitzant 4103d06..f6544e7 Fast-forward LICENSE | 12 +- README.md | 2 + aula/apps/alumnes/abstract_models.py | 24 +- aula/apps/alumnes/gestioGrups.py | 78 +++ aula/apps/alumnes/migrations/0010_alumne_foto.py | 20 + aula/apps/alumnes/migrations/0011_auto_20191002_1753.py | 20 + aula/apps/alumnes/templates/mostraInfoAlumneCercat.html | 4 + aula/apps/alumnes/templates/sincronitzaSaga.html | 6 +- aula/apps/alumnes/urls.py | 5 + aula/apps/alumnes/views.py | 102 +++- aula/apps/assignatures/abstract_models.py | 4 +- aula/apps/assignatures/business_rules/assignatura.py | 4 +- aula/apps/assignatures/migrations/0004_auto_20190922_2001.py | 18 + aula/apps/avaluacioQualitativa/reports.py | 4 +- aula/apps/baixes/rpt_carpeta.py | 5 +- aula/apps/extEsfera/sincronitzaEsfera.py | 4 +- aula/apps/extSaga/sincronitzaSaga.py | 4 + aula/apps/extUntis/init.py | 0 aula/apps/extUntis/admin.py | 6 + aula/apps/extUntis/forms.py | 4 + aula/apps/extUntis/migrations/0001_initial.py | 29 ++ aula/apps/extUntis/migrations/0002_auto_20191014_1118.py | 17 + aula/apps/extUntis/migrations/init.py | 0 aula/apps/extUntis/models.py | 13 + aula/apps/extUntis/sincronitzaUntis.py | 766 ++++++++++++++++++++++++++++ aula/apps/extUntis/templates/sincronitzaUntis.html | 9 + aula/apps/extUntis/urls.py | 8 + aula/apps/extUntis/views.py | 48 ++ aula/apps/horaris/abstract_models.py | 32 +- aula/apps/horaris/migrations/0005_auto_20191009_1056.py | 31 ++ aula/apps/incidencies/views.py | 9 +- aula/apps/missatgeria/views.py | 13 +- aula/apps/presencia/forms.py | 3 +- aula/apps/presencia/migrations/0007_auto_20191013_1307.py | 19 + aula/apps/presencia/migrations/0008_auto_20191020_0114.py | 19 + aula/apps/presencia/regeneraImpartir.py | 2 +- aula/apps/presencia/reports.py | 34 +- aula/apps/presencia/rpt_faltesAssistenciaEntreDatesGrup.py | 14 +- aula/apps/presencia/rpt_faltesAssistenciaEntreDatesProfessor.py | 15 +- aula/apps/presencia/templates/passaLlistaGrup.html | 2 +- aula/apps/presencia/views.py | 8 +- aula/apps/presenciaSetmanal/views.py | 2 +- aula/apps/relacioFamilies/forms.py | 44 +- aula/apps/relacioFamilies/templates/configuraConnexio.html | 17 + aula/apps/relacioFamilies/templates/report_detall_families.html | 2 +- aula/apps/relacioFamilies/views.py | 26 +- aula/apps/sortides/business_rules/sortida.py | 10 +- aula/apps/sortides/migrations/0014_auto_20191027_1228.py | 18 + aula/apps/sortides/templates/autoritzacio2.odt | Bin 216437 -> 216750 bytes aula/apps/sortides/views.py | 73 ++- aula/apps/tutoria/reports.py | 7 +- aula/apps/tutoria/rpt_elsMeusAlumnesTutorats.py | 6 +- aula/apps/tutoria/rpt_gestioCartes.py | 5 +- aula/apps/tutoria/views.py | 4 +- aula/apps/usuaris/abstract_usuaris.py | 4 +- aula/apps/usuaris/migrations/0004_auto_20190924_1045.py | 18 + aula/apps/usuaris/migrations/0004_dadesadicionalsprofessor.py | 23 + aula/apps/usuaris/migrations/0005_auto_20190922_2001.py | 18 + aula/apps/usuaris/migrations/0006_auto_20191013_1050.py | 18 + aula/apps/usuaris/migrations/0007_merge_20191023_1150.py | 14 + aula/apps/usuaris/migrations/0008_auto_20191027_1228.py | 18 + aula/apps/usuaris/models.py | 17 +- aula/apps/usuaris/templates/integraCalendari.html | 58 +++ aula/apps/usuaris/urls.py | 8 +- aula/apps/usuaris/views.py | 115 ++++- aula/settings.py | 8 +- aula/settings_dir/common.py | 4 +- aula/settings_local.sample | 4 +- aula/site-css/nofoto.png | Bin 0 -> 2389 bytes aula/templates/form.html | 2 +- aula/templates/reportTabs.html | 2 + aula/urls.py | 6 + aula/utils/menu.py | 12 +- aula/utils/templates/carregaInicial.html | 41 +- aula/utils/tools.py | 6 +- aula/utils/views.py | 43 +- demo/helpers/carrega.py | 3 +- demo/templates/base.html | 3 + demo/tmp/exportKrono.txt | 546 ++++++++++---------- demo/tmp/exportSaga.txt | 390 +++++++------- docs/Wiki/.gitbook/assets/export.png | Bin 0 -> 9769 bytes docs/Wiki/instalacion-2/instalacion.md | 9 +- docs/Wiki/manual-de-uso/README.md | 4 +- docs/Wiki/manual-de-uso/carga-inicial-de-datos/README.md | 166 ++++-- .../carga-de-horarios-aulas-y-asignaturas.md | 6 +- .../carga-profesores-y-franjas-horarias.md | 2 + .../configurar-estados-de-asistencia-y-tipos-de-asignatura.md | 2 +- .../creacion-de-niveles-cursos-y-grupos.md | 4 +- docs/Wiki/manual-de-uso/carga-inicial-de-datos/untitled.md | 3 +- docs/Wiki/manual-de-uso/primer-inicio.md | 5 +- docs/manuals/parametritzacions.txt | 22 +- "docs/presentaci\303\263-djau-2019.pdf" | Bin 0 -> 2378793 bytes requirements.txt | 3 +- 93 files changed, 2544 insertions(+), 694 deletions(-) create mode 100644 aula/apps/alumnes/gestioGrups.py create mode 100644 aula/apps/alumnes/migrations/0010_alumne_foto.py create mode 100644 aula/apps/alumnes/migrations/0011_auto_20191002_1753.py create mode 100644 aula/apps/assignatures/migrations/0004_auto_20190922_2001.py create mode 100644 aula/apps/extUntis/init.py create mode 100644 aula/apps/extUntis/admin.py create mode 100644 aula/apps/extUntis/forms.py create mode 100644 aula/apps/extUntis/migrations/0001_initial.py create mode 100644 aula/apps/extUntis/migrations/0002_auto_20191014_1118.py create mode 100644 aula/apps/extUntis/migrations/init.py create mode 100644 aula/apps/extUntis/models.py create mode 100644 aula/apps/extUntis/sincronitzaUntis.py create mode 100644 aula/apps/extUntis/templates/sincronitzaUntis.html create mode 100644 aula/apps/extUntis/urls.py create mode 100644 aula/apps/extUntis/views.py create mode 100644 aula/apps/horaris/migrations/0005_auto_20191009_1056.py create mode 100644 aula/apps/presencia/migrations/0007_auto_20191013_1307.py create mode 100644 aula/apps/presencia/migrations/0008_auto_20191020_0114.py create mode 100644 aula/apps/relacioFamilies/templates/configuraConnexio.html create mode 100644 aula/apps/sortides/migrations/0014_auto_20191027_1228.py create mode 100644 aula/apps/usuaris/migrations/0004_auto_20190924_1045.py create mode 100644 aula/apps/usuaris/migrations/0004_dadesadicionalsprofessor.py create mode 100644 aula/apps/usuaris/migrations/0005_auto_20190922_2001.py create mode 100644 aula/apps/usuaris/migrations/0006_auto_20191013_1050.py create mode 100644 aula/apps/usuaris/migrations/0007_merge_20191023_1150.py create mode 100644 aula/apps/usuaris/migrations/0008_auto_20191027_1228.py create mode 100644 aula/apps/usuaris/templates/integraCalendari.html create mode 100644 aula/site-css/nofoto.png create mode 100755 docs/Wiki/.gitbook/assets/export.png create mode 100644 "docs/presentaci\303\263-djau-2019.pdf" djau2019@freser:/opt/djau2019$ source venv/bin/activate (venv) djau2019@freser:/opt/djau2019$ python manage.py migrate Traceback (most recent call last): File "manage.py", line 15, in execute_from_command_line(sys.argv) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line utility.execute() File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/management/init.py", line 357, in execute django.setup() File "/opt/djau2019/venv/lib/python3.6/site-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/apps/config.py", line 90, in create module = import_module(entry) File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'private_storage'
ctrl-alt-d commented 5 years ago

ModuleNotFoundError: No module named 'private_storage'

Es fa servir private_storage per a les fotos. Has d'instal·lar requeriments:

pip3 install -r requirements.txt

Recorda activar el virtualenv (si el fas servir) amaba de fer el pop ( source venv/bin/activate )

Recirda també que hi ha migracions:

python3 manager.py migrate

Feu backups de codi i dades abans de res.

jaumeteixidor commented 5 years ago

Ok. He fet tot el que comentes però encara em dona error. gràcies per l'ajuda

(venv) djau2019@freser:/opt/djau2019$ python manage.py migrate Traceback (most recent call last): File "manage.py", line 15, in execute_from_command_line(sys.argv) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line utility.execute() File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv self.execute(*args, cmd_options) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/management/base.py", line 361, in execute self.check() File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/management/base.py", line 390, in check include_deployment_checks=include_deployment_checks, File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 65, in _run_checks issues.extend(super()._run_checks(kwargs)) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/management/base.py", line 377, in _run_checks return checks.run_checks(**kwargs) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/checks/registry.py", line 72, in run_checks new_errors = check(app_configs=app_configs) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique all_namespaces = _load_all_namespaces(resolver) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces url_patterns = getattr(resolver, 'url_patterns', []) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/utils/functional.py", line 80, in get res = instance.dict[self.name] = self.func(instance) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/urls/resolvers.py", line 579, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/utils/functional.py", line 80, in get res = instance.dict[self.name] = self.func(instance) File "/opt/djau2019/venv/lib/python3.6/site-packages/django/urls/resolvers.py", line 572, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module

ctrl-alt-d commented 5 years ago

He provat al meu PC i m'ha passat un error semblant:

(venv) [dani@localhost django-aula]$ python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  ...
  File "/tmp/s/django-aula/aula/urls.py", line 7, in <module>
    from aula.apps.alumnes.views import mostraGrupPromocionar,nouAlumnePromocionar,llistaGrupsPromocionar
  File "/tmp/s/django-aula/aula/apps/alumnes/views.py", line 10, in <module>
    from aula.settings_local import PRIVATE_STORAGE_ROOT
ModuleNotFoundError: No module named 'aula.settings_local'

Crec que he fixat l'error amb el PR #84 . Sembla que ara ja funciona:

image

De totes maneres no tanco la issue, m'espero a que ho provis i a que en @juaky s'ho miri (per si ell veu alguna altra coseta)

Merci per avisar.

jaumeteixidor commented 5 years ago

Perdona per la meva ignorància, però així ja està? que he de fer, una altra vegada el source venv/bin/activate , git pull, pip3 install -r requeriments.txt y python manage.py migrate? Moltes gràcies

ctrl-alt-d commented 5 years ago

Sí, aquests són els petits canvis: #84 Com veus ja està fet el merge amb la branca principal (master):

"Pull request successfully merged and closed"

Per tant ja estan al codi, fes el que dius i ja em diràs.

Recorda sempre fer còpia abans d'una actualització.

juaky commented 5 years ago

Correcte, vaig afegir https://github.com/ctrl-alt-d/django-aula/blob/6ee98a0f96bcee51a3568f412a23cde1949d2748/aula/settings_local.sample#L39 al 'settings_local.sample' i no vaig tenir en compte que potser hi ha centres que no l'utilitzen o en fer pull no afegeixen els canvis al seu 'settings_local.py'

ctrl-alt-d commented 5 years ago

@juaky, crec que aquesta variable hauria de ser aquí:

https://github.com/ctrl-alt-d/django-aula/blob/master/aula/settings.py

i sobrescrita al settings_local.

Què et sembla?

juaky commented 5 years ago

Fet!