Re: django: ajax simple loading gif not working/ over-riding render to output page

2016-03-04 Thread aspellip
I'm using nginx + upload_progress module
On the HTML page for progress bar  I'm using iframe + ajax 
u can find a result here http://fex.cc





On Thursday, March 3, 2016 at 9:23:53 PM UTC+2, clarkso...@gmail.com wrote:
>
> Hoping that this network can help me out even though this is not strictly 
> django-related, otherwise can someone recommend a group other than stack 
> overflow that could help here?
>
> I have a functioning upload function implemented in django. The files 
> being handled are large making for a long waiting time and so I would like 
> to provide a "Please Wait/ Loading.../ GIF" on the page while the files are 
> loading.
>
> The HTML/Django that begins the uploading function is as follows:
>
> "showMessage()"/>
>
> The upload button is as follows (accompanied by a hidden div):
>
>  
>
>  
>
> I took some example code and tried to adapt it to the above HTML but it's 
> not showing up on the page at all during the loading time... and I have no 
> errors to follow.
>
> The ajax:
>
> function showMessage() {
> $('.up').show()// document.getElementById("up").innerHTML = "please 
> wait";}
>
> However my ajax code is not having any effect as the hidden div does not 
> appear after clicking "Upload".
>
> I am not at all familiar with Ajax/javascript and so while I understand 
> that I can see that I am able to set a function "showMessage" and then upon 
> clicking "Upload" the function will be called should render the hidden div 
> to the page until the output is complete and rendered to the output page.
>
> I should also mention that before I decided to use a GIF I successfully 
> managed to get a "Please wait" message to appear after clicking the 
> "Upload" button (this code is silenced in the "showMessage" function above.
>
> The problem is that the "Please Wait" message actually over-rides the 
> rendering to the output page and hence the results of the upload do not 
> display when processed.
>
> Hence overall I just want a hidden div to render to the input page until 
> the output is complete and in a way that will not conflict with the more 
> important, subsequent rendering to the output page.
>
> The syntax I'm using is not having any effect on the page so I'm hoping 
> someone can correct my misguided code.
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4c94ba7e-b07a-4cfa-82be-5dff6e5806ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Admin page missing icons

2016-03-04 Thread aspellip
In your browser enable "network inspector" and reload page, you will see 
where is icon must locate. 

For example:

On Friday, March 4, 2016 at 3:16:37 PM UTC+2, David Hou wrote:
>
> Hi all,
>
>
> I'm really new to Django and am just working through the tutorials right 
> now.  I noticed that my admin page is missing some icons (circled in red 
> below).  Inspecting the html at these locations shows that there is no icon 
> being referenced here.  Is there something I'm missing in my installation 
> or something?  I'm using Django 1.9.2
>
>
> Thanks for the help!
>
>
> 
>
>
> 
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a59c4475-b911-4a3a-ac42-e4ade204746c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: count

2016-01-28 Thread aspellip
from django.http import HttpResponse
from django.template import loader, RequestContext

def foreginexchange_view(request):
t = loader.get_template("template.html")
test=ball.objects.filter(request="checked").count() 
c = RequestContext(request, {'test': test})
return HttpResponse(t.render(c))


On Wednesday, January 27, 2016 at 11:12:19 PM UTC+2, suabiut wrote:
>
> Version 1.7
>
> On Wed, Jan 27, 2016 at 10:42 PM,  wrote:
>
>> Which version of Django do you using?
>>
>> вторник, 26 января 2016 г., 23:14:03 UTC+2 пользователь suabiut написал:
>>>
>>> When i did that i got the error:
>>>
>>> 'dict' object has no attribute 'render_context'
>>>
>>>
>>>
>>> On Tue, Jan 26, 2016 at 7:25 PM,  wrote:
>>>
 Try this
 def foreginexchange_view(request):
 t = loader.get_template("template.html")
 test=ball.objects.filter(request="checked").count()
 return HttpResponse(t.render({'test': test}))

 On Tuesday, January 26, 2016 at 4:45:52 AM UTC+2, suabiut wrote:
>
> Thanks James,
> here is my view.py
>
> def foreginexchange_view(request):
> test=ball.objects.filter(request="checked").count()
> return render(request,'template.html',locals())
>
>
>
> Cheers
>
>
>
>
> On Tue, Jan 26, 2016 at 1:30 PM, James Schneider  
> wrote:
>
>>
>> On Jan 25, 2016 6:07 PM, "sum abiut"  wrote:
>> >
>> > Hi,
>> > i am trying to count the number of fields that has request field 
>> begin checked and then display the value of count in a template.html but 
>> i 
>> am not sure how to go about doing that.
>> >
>> > For example i want to do something like
>> >
>> > test=ball.object.filter(request="checked").count()
>> >
>> > then on a template.html i want to out put the value of test
>> >
>> > {{test}}
>> >
>> > i have try that but i am not getting any value from the output.
>> >
>>
>> Can you post your view? You would run that query in your view and 
>> then pass it to your template through the context.
>>
>> -James
>>
>> -- 
>> You received this message because you are subscribed to the Google 
>> Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to django-users...@googlegroups.com.
>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciUgThuMtZvUj3QHxLKFHiRu67oTZuvfoLT3K9EpNt08Dg%40mail.gmail.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
>
> -- 
 You received this message because you are subscribed to the Google 
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to django-users...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/24038981-7076-4287-9a8d-31e3d83ab7d0%40googlegroups.com
  
 
 .

 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/a95743cd-8d68-4f92-91c9-c49ca7dfc329%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at 

Re: count

2016-01-27 Thread aspellip
Which version of Django do you using?

вторник, 26 января 2016 г., 23:14:03 UTC+2 пользователь suabiut написал:
>
> When i did that i got the error:
>
> 'dict' object has no attribute 'render_context'
>
>
>
> On Tue, Jan 26, 2016 at 7:25 PM,  wrote:
>
>> Try this
>> def foreginexchange_view(request):
>> t = loader.get_template("template.html")
>> test=ball.objects.filter(request="checked").count()
>> return HttpResponse(t.render({'test': test}))
>>
>> On Tuesday, January 26, 2016 at 4:45:52 AM UTC+2, suabiut wrote:
>>>
>>> Thanks James,
>>> here is my view.py
>>>
>>> def foreginexchange_view(request):
>>> test=ball.objects.filter(request="checked").count()
>>> return render(request,'template.html',locals())
>>>
>>>
>>>
>>> Cheers
>>>
>>>
>>>
>>>
>>> On Tue, Jan 26, 2016 at 1:30 PM, James Schneider  
>>> wrote:
>>>

 On Jan 25, 2016 6:07 PM, "sum abiut"  wrote:
 >
 > Hi,
 > i am trying to count the number of fields that has request field 
 begin checked and then display the value of count in a template.html but i 
 am not sure how to go about doing that.
 >
 > For example i want to do something like
 >
 > test=ball.object.filter(request="checked").count()
 >
 > then on a template.html i want to out put the value of test
 >
 > {{test}}
 >
 > i have try that but i am not getting any value from the output.
 >

 Can you post your view? You would run that query in your view and then 
 pass it to your template through the context.

 -James

 -- 
 You received this message because you are subscribed to the Google 
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to django-users...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/CA%2Be%2BciUgThuMtZvUj3QHxLKFHiRu67oTZuvfoLT3K9EpNt08Dg%40mail.gmail.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/24038981-7076-4287-9a8d-31e3d83ab7d0%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a95743cd-8d68-4f92-91c9-c49ca7dfc329%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: count

2016-01-26 Thread aspellip
Try this
def foreginexchange_view(request):
t = loader.get_template("template.html")
test=ball.objects.filter(request="checked").count()
return HttpResponse(t.render({'test': test}))

On Tuesday, January 26, 2016 at 4:45:52 AM UTC+2, suabiut wrote:
>
> Thanks James,
> here is my view.py
>
> def foreginexchange_view(request):
> test=ball.objects.filter(request="checked").count()
> return render(request,'template.html',locals())
>
>
>
> Cheers
>
>
>
>
> On Tue, Jan 26, 2016 at 1:30 PM, James Schneider  > wrote:
>
>>
>> On Jan 25, 2016 6:07 PM, "sum abiut"  
>> wrote:
>> >
>> > Hi,
>> > i am trying to count the number of fields that has request field begin 
>> checked and then display the value of count in a template.html but i am not 
>> sure how to go about doing that.
>> >
>> > For example i want to do something like
>> >
>> > test=ball.object.filter(request="checked").count()
>> >
>> > then on a template.html i want to out put the value of test
>> >
>> > {{test}}
>> >
>> > i have try that but i am not getting any value from the output.
>> >
>>
>> Can you post your view? You would run that query in your view and then 
>> pass it to your template through the context.
>>
>> -James
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciUgThuMtZvUj3QHxLKFHiRu67oTZuvfoLT3K9EpNt08Dg%40mail.gmail.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/24038981-7076-4287-9a8d-31e3d83ab7d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.