0👍
✅
The right way to do what I was trying to do is don’t handle the querystring with the URL dispatcher. Instead of, I’ve done this:
url(r'^detalhes\.php/$', 'core.views.anuncio_antigo',name='anuncio-antigo'),
Any of those php files now will call my anuncio_antigo
view. Then in view I handled the querystring using request.GET
, like this:
tipo = request.GET.get('tipo')
residuo_id = request.GET.get('residuo_id')
I think it’s not possible to have a question mark in a url.
1👍
The solution that worked for me in the same situation was to configure the web server to route requests on different engines. Config we used with nginx was something like this:
location ~ ^/(django\/adm|someurl|)/.*$ {
uwsgi_pass unix:/var/www/path/to/uwsgi.sock;
include uwsgi_params;
}
location ~ ^/(_.*\.php)$ {
fastcgi_pass php_fastcgi;
fastcgi_param SCRIPT_FILENAME /var/www/path/to/index/php/$1;
fastcgi_param DOCUMENT_ROOT /var/www/path/to/index/php/$1;
include fastcgi_params;
}
- [Answer]-Django form for 2 related model
- [Answer]-Configure Nginx To Accept Domain Name
- [Answer]-Image upload through Django admin panel not working
- [Answer]-Django project to Azure Cloud Services without Visual Studio
- [Answer]-How to avoid Cross-Origin Resource Sharing error when hitting a Django API from another server process?
Source:stackexchange.com