Setting variable in custom template

2017-04-04 Thread valerio orfano
Hi there is there any chance to set the value of variable in django custom template? I am looking for something like {set variable = "test"} But i Cannot make it to work! Any clue? rgds valerio -- You received this message because you are subscribed to the Google Groups "Django users" group

Ajax Call is sending empty request.POST or request.body

2017-03-30 Thread valerio orfano
Hi i am still not clear when using request.POST or request.body. Anyway this ajax call is sending emprty request.POST, or empty request.body: $(document).ready(function(){ $(".captcha_form").submit(function(event){ var check = $('#id_check').val(); aler

Re: Django Captcha Ajax call not working

2017-03-28 Thread valerio orfano
e ios with ajax call! Please help out! rgds valerio On Monday, March 27, 2017 at 5:44:34 PM UTC+2, valerio orfano wrote: > > Hi Melvyn > > thanx a lot . I will try tomorrow early morning and will let u know. > Thanx. valerio > > On Monday, March 27, 2017 at 3:31:38 PM

Re: Django Captcha Ajax call not working

2017-03-27 Thread valerio orfano
; However, when debugging a problem, always reduce to the simplest case, so > try with this template code: > > > > method="post">{%csrf_token%} > > {{ form }} > > value="Invio"/> > > > > > > On Monday 27 March 2017 05:43:53 vale

Re: Django Captcha Ajax call not working

2017-03-27 Thread valerio orfano
testfield is where i type my captcha, sorry On Monday, March 27, 2017 at 2:38:15 PM UTC+2, valerio orfano wrote: > > Hi Melvyn thanx for ur reply, > > this is my form. > > class AjaxForm(forms.ModelForm): > captcha = CaptchaField() > class Meta: >

Re: Django Captcha Ajax call not working

2017-03-27 Thread valerio orfano
et an error, so testfield is just a dummy field, just to avoid error. valerio On Monday, March 27, 2017 at 2:22:44 PM UTC+2, Melvyn Sopacua wrote: > > On Monday 27 March 2017 04:46:06 valerio orfano wrote: > > > {% if field.name = 'captcha' %} > > > > It

Re: Django Captcha Ajax call not working

2017-03-27 Thread valerio orfano
{{ field }} {% endfor %} On Monday, March 27, 2017 at 1:44:49 PM UTC+2, valerio orfano wrote: > > Hi Andreas thak you very much. > > I've changed my html with the following: > > > $(document).ready(function(){ > $.ajaxSetup({ >

Re: Django Captcha Ajax call not working

2017-03-27 Thread valerio orfano
r form in the data part of the jquery request. Check this for > more information: https://api.jquery.com/serialize/. > > Secondly - you should also include the CSRF token - otherwise you will get > other errors with that eventually - check this for information on how to do

Re: Django Captcha Ajax call not working

2017-03-27 Thread valerio orfano
Hi, I managed to make an ajax call. But the form is always invalid. IT is like the captcha field passed to the view is always empty. valerio On Monday, March 27, 2017 at 8:48:17 AM UTC+2, valerio orfano wrote: > > I have the following class view taken from documentation: > > class

Django Captcha Ajax call not working

2017-03-26 Thread valerio orfano
I have the following class view taken from documentation: class CaptchaView(CreateView): template_name = "captcha.html" form_class = MyForm def form_invalid(self, form): if self.request.is_ajax(): to_json_response = dict() to_json_response['status']

Ajax call with class-based view

2017-03-23 Thread valerio orfano
I have the following template: $(document).ready(function(){ function captcha() { $.ajax({ type: "POST", url: "../captcha", data:{}, contentType: "application/json", dataType: "json",

Re: Django Captcha or MathCaptcha application

2017-03-23 Thread valerio orfano
mple to setup and use and works very well > > 2017-03-22 11:20 GMT-03:00 valerio orfano >: > >> Hi >> >> i am trying to apply captcha process to my web site. I could find any >> clear documentation out there (at least clear to me). Do you know any >> s

Django Captcha or MathCaptcha application

2017-03-22 Thread valerio orfano
Hi i am trying to apply captcha process to my web site. I could find any clear documentation out there (at least clear to me). Do you know any simple step by step tutorial or captcha application source code you have already created and that works fine? I am looking for code regarding view, ur

Re: After machine reboot "unix:/socket/uwsgi.sock failed (13: Permission denied) while connecting to upstream"

2017-03-21 Thread valerio orfano
cessary manually create uwsgi.sock. > > Good luck! > Jan > > On Tue, Mar 21, 2017 at 9:16 AM, valerio orfano > wrote: > >> BTW i ve created the uwsgi.sock manually gave permission 777 and changes >> the owner from root to nginx:nginx >> >> >> On Tuesd

Re: After machine reboot "unix:/socket/uwsgi.sock failed (13: Permission denied) while connecting to upstream"

2017-03-21 Thread valerio orfano
BTW i ve created the uwsgi.sock manually gave permission 777 and changes the owner from root to nginx:nginx On Tuesday, March 21, 2017 at 1:10:22 PM UTC+1, valerio orfano wrote: > > Hi folks i have django 1.9 application integrated to nginx via uwsgi > application on Centos7. > It

After machine reboot "unix:/socket/uwsgi.sock failed (13: Permission denied) while connecting to upstream"

2017-03-21 Thread valerio orfano
Hi folks i have django 1.9 application integrated to nginx via uwsgi application on Centos7. It was working fine, but then i had to reboot my machine. Now i am having the follwoing issue: unix:/socket/uwsgi.sock failed (13: Permission denied) while connecting to upstream, client: 10.184.160.9,

Re: Django and Nginx through uwsgi is not working

2017-03-17 Thread valerio orfano
te: > > On Thursday 16 March 2017 11:04:53 valerio orfano wrote: > > > http://uwsgi-docs.readthedocs.io/en/latest/Nginx.htm > > *sigh* > > > > http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass > > > > unix:/path/to > > > &g

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread valerio orfano
I got it here "http://uwsgi-docs.readthedocs.io/en/latest/Nginx.html"; and others actually On Thursday, March 16, 2017 at 4:51:35 PM UTC+1, Melvyn Sopacua wrote: > > On Thursday 16 March 2017 05:25:32 valerio orfano wrote: > > > > > Here my configurat

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread valerio orfano
Hi Tom if i dont create the file i get the error: unix:///tmp/uwsgi.sock failed (2: No such file or directory) On Thursday, March 16, 2017 at 1:47:12 PM UTC+1, Tom Evans wrote: > > On Thu, Mar 16, 2017 at 12:25 PM, valerio orfano > wrote: > > Hi All > > > > i ve c

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread valerio orfano
Ya it was a typo when writing On Thursday, March 16, 2017 at 1:30:21 PM UTC+1, Vijay Khemlani wrote: > > Not sure if a typo on your email, but your command says > > "chown nginx:nginx -R /sockect/uwsgi.sock" > > sockect ? > > On 3/16/17, valerio orfano &

Django and Nginx through uwsgi is not working

2017-03-16 Thread valerio orfano
Hi All i ve created a django application not using virtual environment. I ve installed nginx and trying to integrate them via uwsgi application. Here my configurations files. [uwsgi] chdir = /home/elastic/workspace/ES_Brevetti wsgi-file = ES_Brevetti/wsgi.py master = true pro

Re: Full domain url subfolder redirected my django application with apache with mod_wsgi

2017-03-13 Thread valerio orfano
onday, March 13, 2017 at 12:51:07 PM UTC+1, valerio orfano wrote: > > Hi the problem is that i want to mount django app on a subfolder of my > root url that is www.mydomain.com. Pratically > www.mydomain.com/nuovopatentdb (nuovopatentdb is not really existing , it > is used for na

Re: Full domain url subfolder redirected my django application with apache with mod_wsgi

2017-03-13 Thread valerio orfano
s not clear. You have one server, 10.184.2.231, that has > both your django app and your static files? www.uibm.gov.it seems to be > another server, 88.49.250.43. www.mydomain.com is a placeholder you are > using for www.uibm.gov.it? > > Antonis Christofideshttp://djangodeployment.com > &

Re: Full domain url subfolder redirected my django application with apache with mod_wsgi

2017-03-09 Thread valerio orfano
Hi, i want to claim that www.mydomain.com is not the FQDN of my server where django app is installed, but it's another server that redirect to my django app. thanx valerio On Thursday, March 9, 2017 at 3:35:26 PM UTC+1, valerio orfano wrote: > > Yes, http//10.184.2.231/st

Re: Full domain url subfolder redirected my django application with apache with mod_wsgi

2017-03-09 Thread valerio orfano
gt; If not, why are you saying that "static files are served properly"? > > Regards, > > Antonis > > Antonis Christofideshttp://djangodeployment.com > > > On 03/08/2017 04:12 PM, valerio orfano wrote: > > > I've been facing the following prob

Full domain url subfolder redirected my django application with apache with mod_wsgi

2017-03-08 Thread valerio orfano
I've been facing the following problem. I got django 1.9 integrated with apache 2.4+ via mod_wsgi application. I run manage.py collectstatic and everything is fine when i use the root url. http//10.184.2.231 it is ok and static files are served properly. Actually i will be redirected to my d

Not Root Url for my djano app integrated with apache with mod_swgi

2017-03-08 Thread valerio orfano
Hello guys i've been facing the following problem. I got django 1.9 integrated with apache 2.4+ via mod_wsgi application. i run manage.py collect and everythiong is fine when i use the root url. http//10.184.2.231 it is ok and static files are served properly. Actually i will be redirected to