Not displaying the data after space
Hi, I am using jvascript, python and django for my web page with Sqllite3 at database. When i enter some data in a textfield, for example "this is an instrument" it is getting saved accurately into the database, the problem is when i try to view the data in the database , the data that is getting displayed in the frontend textfield is only "this" and the remaining data "is an instrument" is not getting displayed . I have declared that variable in models.py as description = models.TextField('Description', max_length=256) can anyone help me out where i went wrong? Thanks and Regards, Nalini --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
How to solve value error
Hi, I am getting this value error in my report. i am using pagination fro my report. I have only 2 records in my database. so in order to check whether my pagination works i gave { % autopaginate Data 1 % } so that each record will get displayed in two different pages. when i generate my report the record in the 1st page is getting generated but when i click on the 2nd page link it displays me this error. can any one help me what might be the reason and solution for this. Error Message === ValueError at /ReportIMH/ The view Lab_Tools.ims.views.ReportIMH didn't return an HttpResponse object. Request Method: GET Request URL: http://127.0.0.1:8000/ReportIMH/ Exception Type: ValueError Exception Value: The view Lab_Tools.ims.views.ReportIMH didn't return an HttpResponse object. Exception Location: C:\Python26\lib\site-packages\django\core\handlers\base.py in get_response, line 104 Python Executable: C:\Python26\python.exe Python Version: 2.6.1 Python Path: ['C:\\Lab_Tools', 'C:\\Python26\\python26.zip', 'C:\\Python26\\DLLs', 'C:\\Python26\\lib', 'C:\\Python26\\lib\\plat-win', 'C:\\Python26\\lib\ \lib-tk', 'C:\\Python26', 'C:\\Python26\\lib\\site-packages'] Server time: Fri, 8 May 2009 18:39:40 +0530 Traceback Switch to copy-and-paste view C:\Python26\lib\site-packages\django\core\handlers\base.py in get_response 104. raise ValueError, "The view %s.%s didn't return an HttpResponse object." % (callback.__module__, view_name) ... ▶ Local vars Views.py === def IRSerNum(request,Part_No): ReportData="" ReportHeader = HTML.Table() ReportData = HTML.Table() ReportHeader.rows.append(['Serial Number','Status of the Instrument']) Sernos = Part.objects.filter(part_number=Part_No) for field in Sernos: SerNoList= "%s" % field.serial_number testhistorystatus = TestHistory.objects.filter(SerNo = field) for state in testhistorystatus: teststat = "%s" % state.test_status ReportData.rows.append([SerNoList,teststat]) DateTime=current_datetime() return render_to_response('Reports/IR/SerNo.html', {'SNos': ReportData , 'Part' : Part_No, 'Header' : ReportHeader.rows , 'Data' : ReportData.rows,'Time' : DateTime},context_instance=RequestContext (request)) SerNo.html == {% extends 'Main_Template.html' %} {% load pagination_tags %} {% block menu %} {% endblock %} {% block content %} Serial Numbers for the Part Number {{Part}} {{Time}} {% autopaginate Data 1%} {% for row in Header %} {% for value in row %} {{ value }} {% endfor %} {% endfor %} {% for row in Data %} {% for value in row %} {{ value }} {% endfor %} {% endfor %} {% paginate %} {% endblock %} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
export the html data in table format to CSV or excel file format using javascript
Hi, Does any one give me the source to export the html data in table format to CSV or excel file format using javascript. Regards, Nalini --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: how to make the first row in the table (table header) bold
Thanks alan.. On Apr 22, 5:00 pm, zayatzz wrote: > You can remove this if at all and use css based formatting if you want > to. > > but otherwise : > {% ifequal athlete.name coach.name %} > ... > {% endifequal %} > > Taken from http://docs.djangoproject.com/en/dev/topics/templates/ > > Alan. > > On Apr 22, 2:48 pm, Nalini wrote: > > > > {% autopaginate rows 5%} > > > > {% forrowin rows %} > > > > > > {% for value inrow%} > > > val=this.rowindex > > > {% if (val == 0) %} > > > {{ value }} > > > > {% else %} > > > > >{{ value }} > > > {% endif %} > > > > {% endfor %} > > > > > > > {% endfor %} > > > > {% paginate %} > > > When i try executing this script i get this error > > > 'if' statement improperly formatted > > > Can anyone help me.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Export to excel sheet in djanogo using pagination
Hi, I have many pages to be exported to the excel sheet. I use django and javascript. i use pagination. Can any one help me out ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
how to make the first row in the table (table header) bold
> {% autopaginate rows 5%} > > {% for row in rows %} > > {% for value in row %} > val=this.rowindex > {% if (val == 0) %} >{{ value }} > > {% else %} > > >{{ value }} > {% endif %} > > {% endfor %} > > > {% endfor %} > > {% paginate %} When i try executing this script i get this error 'if' statement improperly formatted Can anyone help me.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
how to make the first row in the table (table header) bold
{% autopaginate rows 5%} {% for row in rows %} {% for value in row %} val=this.rowindex {% if (val == 0) %} {{ value }} {% else %} >{{ value }} {% endif %} {% endfor %} {% endfor %} {% paginate %} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: SQL Between query in sqlite3
Thank you Alex On Apr 11, 11:47 am, Alex Gaynor wrote: > On Sat, Apr 11, 2009 at 2:44 AM, Kenneth Gonsalves > wrote: > > > > > On Saturday 11 April 2009 11:16:52 Nalini wrote: > > > select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31' > > > Can any one help me? > > > Model.objects.filter(mydate__gte='2009-01-01' > > ).filter(mydate__lte='2009-01-31') > > -- > > regards > > kg > >http://lawgon.livejournal.com > > You can also do mydate__range=(datetime_obj1, datetime_obj2). > > Alex > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." --Voltaire > "The people's good is the highest law."--Cicero --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: SQL Between query in sqlite3
Hi Kg, Thank you very much On Apr 11, 11:44 am, Kenneth Gonsalves wrote: > On Saturday 11 April 2009 11:16:52 Nalini wrote: > > > select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31' > > Can any one help me? > > Model.objects.filter(mydate__gte='2009-01-01' > ).filter(mydate__lte='2009-01-31') > -- > regards > kghttp://lawgon.livejournal.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
SQL Between query in sqlite3
Hi, I am using django, python and sqlite3 for my web page. I want the datas from the database between two dates. how do i handle it in django. i want the query for this select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31' Can any one help me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Django
While inputting an invalid username and password it should throw an alert message saying "invalid user". How to get this in django? Do i need to add something in views.py? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---