2👍
OK, in the situation that I was in when first posting this question, it seems all I actually needed to do was touch a wsgi
file under my appname/apache
directory to force the application to be refreshed. Yesterday’s initial answer was a red herring. Basically I should have touched the file myproject/myapp/apache/myapp.wsgi
. Then maybe restart Apache for good measure? But the confusion was caused by the fact that apparently it wasn’t enough either simply to restart Apache or to manually recompile the Python. In order to pick up my changes, seems like I needed to touch that wsgi file. Then all is well.
0👍
I can now post an answer to my own question thanks to the help of my colleague Masud Khokhar, whose brilliant detective work has saved the day. To recap, my application worked fine until I added a ‘load’ statement to one of my template files, to load a ‘custom filters’ module. Masud identified that now I needed to use a full/absolute path to the template file in urls.py instead of a relative one as I had before (and which worked before, until it needed to load the custom filters module). So, in urls.py, I had a section of code as follows:
url(r'^book/(?P<object_id>\d+)/$', 'list_detail.object_detail',
kwargs={
'queryset':Book.objects.all(),
'template_name' : 'mlgb/mlgb_detail.html'
},
name='mlgb_detail'
),
Instead of this:
'template_name' : 'mlgb/mlgb_detail.html'
I needed something like this:
'template_name' : '/THE_FULL_PATH/mlgb/templates/mlgb/mlgb_detail.html'
Made that change – sorted! Thank you once again, Masud.
- [Answered ]-Django Rest Api filter field's select options based on request.user
- [Answered ]-What does passing lambda in urlconf in django mean?
- [Answered ]-Building a webapp to serve multiple HG repositories
- [Answered ]-Dojango with django 1.5