-
Notifications
You must be signed in to change notification settings - Fork 48
Rendering error when displaying an agora #45
Comments
Hi Xavi: I'm not sure what's the problem, but you shouldn't use sqlite. BTW, I recommend you to try with this deployment script: https://github.com/agoravoting/agora-ciudadana-box |
Thanks Edulix. I'll try with the agora box. |
After having several problems with the deployment script, I have changed the database to PostgreSQL. The site works much faster than SQL Lite, but the error still appears. I think is a security issue, regarding at the line if request.META.get('HTTP_AUTHORIZATION') ...
else:
username = request.GET.get('username') or request.POST.get('username')
api_key = request.GET.get('api_key') or request.POST.get('api_key')
... Neither the headers or GET/POST data contain API Key. In debug mode I have set the The request is generated in var ajax_data = {
'tallied_elections': {% rest request '/agora/' agora.id '/tallied_elections/?limit=3' %},
'agora': {% rest request '/agora/' agora.id '/' %},
'user_permissions': {% custom_rest request "POST" '{"action":"get_permissions"}' '/agora/' agora.id '/action/' %}
}; The custom rest request in POST to obtain user permissions must be authenticated in order to succeed. Searching about the AttributeError 'str' object has no attribute 'get', it seems that the response returned to Django is a string instead of HttpResponse, but debugging the code becomes too complex to find out the exact place. Could you look |
Last commit solved the issue, thanks @danigm ! |
Hello, I have a fresh development installation with SQL Lite and the last repository version (last commit "Allow anonymous authorization for login and register").
After creating an agora via web UI, the agora page generates the following error:
Could someone have a look ? Thanks!
The text was updated successfully, but these errors were encountered: