Micro souci avec la WEBAPP
L'URL http://127.0.0.1:8000/qcmonge/construct/
me renvoie le message suivant dans le terminal :
> python3 manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
May 19, 2018 - 18:39:07
Django version 2.0.5, using settings 'mainapp.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[19/May/2018 18:39:10] "GET /qcmonge/ HTTP/1.1" 200 855
[19/May/2018 18:39:10] "GET /static/css/qcmonge.css HTTP/1.1" 304 0
Internal Server Error: /qcmonge/construct/
Traceback (most recent call last):
File "/Users/projetmbc/anaconda3/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/Users/projetmbc/anaconda3/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/projetmbc/anaconda3/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/projetmbc/OneDrive - ac-grenoble.fr/git/python/pedagogy/QCMonge/qcmonge/webapp/qcmonge/views.py", line 66, in construction_qcm
contexte = {'matiere': matieres, 'theme': themes, 'niveau': niveaux, 'prefmat':prefmat }
UnboundLocalError: local variable 'prefmat' referenced before assignment
[19/May/2018 18:39:12] "GET /qcmonge/construct/ HTTP/1.1" 500 63007
Le message est clair. J'attends tes ordres, oups tes conseils... Y a pas urgence...
Edited by Christophe BAL