Return 2 values

2013-07-05 Thread Hélio Miranda
Hi My doubt is that I am not getting an image and its caption. I'll explain, I have my application to enter the picture and the caption GridFS on mongo. I get the image and returns or fetch the caption and just return everything ok. But I wanted to return the picture and the caption together ...

Re: Return 2 values

2013-07-05 Thread Sergiy Khohlov
try to use dict with 2 items Many thanks, Serge +380 636150445 skype: skhohlov On Fri, Jul 5, 2013 at 12:38 PM, Hélio Miranda wrote: > Hi > My doubt is that I am not getting an image and its caption. > I'll explain, I have my application to enter the picture and the

Re: Return 2 values

2013-07-05 Thread Nick Apostolakis
You can always return a container object with the values you want as it's instance variables Στις 05 Ιουλ 2013 12:39 ΜΜ, ο χρήστης "Hélio Miranda" έγραψε: Hi My doubt is that I am not getting an image and its caption. I'll explain, I have my application to enter the picture

Re: Return 2 values

2013-07-05 Thread Hélio Miranda
can you give me an example? -- 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

Multiple Choices in a CharField

2013-07-05 Thread Nafiul Islam
Hi! I am trying to make a model that is a resource, for example a video file, or a PDF document, which has a category, for example Math or Science or Computer Science. What I want to ask is how do I have multiple categores to a single item, using charfield and choice. Here is an example of

Re: Return 2 values

2013-07-05 Thread Nick Apostolakis
I am not in front of a computer right now in order to offer a full fledged examle, but you can insert your values in a dictionary or a list and return that Στις 05 Ιουλ 2013 12:54 ΜΜ, ο χρήστης "Hélio Miranda" έγραψε: can you give me an example? -- You received this

Re: Return 2 values

2013-07-05 Thread Hélio Miranda
My problem is that I am returning an image (content_type = 'image / jpeg') and the legend is not an image but text -- 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

Re: Django date format issue

2013-07-05 Thread Sivaram R
All 1.My application consist of two part.Part I - Settings page //just like settings selection in iphone or mobile phone Part II - Event creation page So,in settings page ,in my app a page called datetime_format.html is for selecting

login successfully takes to account/profle

2013-07-05 Thread Sivaram R
I am developing an django app,now the problem is after successfull login,it takes me to account/profile which is no longer available in django urls.But after removing that account/profile and hit enter it is taking inside the application.Do i need to frame a method and page for that or how to

Error in Autoamation

2013-07-05 Thread Harjot Mann
While generating bill an error is coming in automation software. TypeError at /tcc/jobok/ unsupported operand type(s) for +: 'int' and 'unicode' -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Django

Re: Error in Autoamation

2013-07-05 Thread Nigel Legg
You can't combine int and unicode. Seems you are trying to. Regards, Nigel Legg 07914 740972 http://www.treavnianlegg.co.uk http://twitter.com/nigellegg http://uk.linkedin.com/in/nigellegg On 5 July 2013 12:08, Harjot Mann wrote: > While generating bill an error is

Re: Return 2 values

2013-07-05 Thread Nick Apostolakis
You should be fine everything is an object so you can hold different datatypes in a list Στις 05 Ιουλ 2013 1:26 ΜΜ, ο χρήστης "Hélio Miranda" έγραψε: My problem is that I am returning an image (content_type = 'image / jpeg') and the legend is not an image but text -- You

Re: login successfully takes to account/profle

2013-07-05 Thread Sandro Dutra
You already try to put this option in settings.py? LOGIN_REDIRECT_URL = "/" 2013/7/5 Sivaram R > I am developing an django app,now the problem is after successfull > login,it takes me to account/profile which is no longer available in > django urls.But after removing

Re: Django date format issue

2013-07-05 Thread Drew Ferguson
Hi Your date settings seem to only affect dates when they are being rendered. When a date is input and later pushed into the database - a date like 02/03/2013 is ambiguous as the database cannot determine whether you mean 2nd Mar or 3rd Feb; dates like 02/26/2013 are not ambiguous. So you get

Re: testing

2013-07-05 Thread Ramiro Morales
On Thu, Jul 4, 2013 at 8:42 PM, Larry Martell wrote: > > I'm just getting involved with setting up testing using the django > testing facilities, and I have a couple of questions. > > If I do this from the django shell: > > $ python manage.py shell > Python 2.7.2

Re: login successfully takes to account/profle

2013-07-05 Thread Sivaram R
Yes,if i put that in settings.py it will work.Is any other way to override the default urls in django. If its their,kindly share your idea. Thanks On Friday, July 5, 2013 5:24:05 PM UTC+5:30, Odin wrote: > > You already try to put this option in settings.py? > LOGIN_REDIRECT_URL = "/" > > >

Multi-laguage website

2013-07-05 Thread Somnath
Hello, I'm trying to make multilanguage website by .po file but i'm unsuccessful. please give me steps to make multi language django site. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: testing

2013-07-05 Thread Larry Martell
On Fri, Jul 5, 2013 at 6:38 AM, Ramiro Morales wrote: > On Thu, Jul 4, 2013 at 8:42 PM, Larry Martell wrote: >> >> I'm just getting involved with setting up testing using the django >> testing facilities, and I have a couple of questions. >> >> If I do

Re: Multi-laguage website

2013-07-05 Thread Sandro Dutra
https://docs.djangoproject.com/en/1.5/topics/i18n/translation/# 2013/7/5 Somnath > Hello, > > I'm trying to make multilanguage website by .po file > but i'm unsuccessful. > please give me steps to make multi language django site. > > -- > You received this message

Re: Return 2 values

2013-07-05 Thread Nick Apostolakis
On 05/07/2013 02:27 μμ, Nick Apostolakis wrote: You should be fine everything is an object so you can hold different datatypes in a list As a reference, check this out http://zetcode.com/lang/python/datatypes/ in the tuple and lists section and this

Re: model relationship

2013-07-05 Thread Sandro Dutra
https://docs.djangoproject.com/en/1.5/topics/db/models/#relationships 2013/7/5 Kakar Arunachal Service > Hello, > Please guide me in model relationship. When to use many to many, many to > one, one to one relationships??? I'm all confused. > Thank you. > > -- >

model relationship

2013-07-05 Thread Kakar Arunachal Service
Hello, Please guide me in model relationship. When to use many to many, many to one, one to one relationships??? I'm all confused. Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: model relationship

2013-07-05 Thread Larry Martell
On Fri, Jul 5, 2013 at 7:44 AM, Kakar Arunachal Service wrote: > Hello, > Please guide me in model relationship. When to use many to many, many to > one, one to one relationships??? I'm all confused. > Thank you.

menu highlight issue in django

2013-07-05 Thread roopasingh250
Hi, In my django application,I am creating new report using django session,and my application contain 3 tabs namely Reports,Search and New Report.Tab highlight says that the application is in which page.If user clicks New report,the New report tab will be highlighted. User can view all the

Re: Django and Websockets

2013-07-05 Thread Bill Freeman
I have had good results with tornado (does WebSockets out of the box, and I like having only one thread). But socketio's JS side has the advantage (as I understand it) of working on browsers that don't yet do WebSockets, falling back to older push approaches as necessary. So if your market

How to render formset in template django and create vertical table?

2013-07-05 Thread MacVictor
How to create this table used formset and extra=3? Table: | my name first column | second column | third column | fourth column | | formset1.field1.label | formset1.field1 | formset2.field1 | formset3.field1 | | formset1.field2.label | formset1.field2 | formset2.field2 | formset3.field2 | |

value changes after login

2013-07-05 Thread Saied Delshad
hi, I have a django application which uses the authentication system. I have added a field named "project_id" which gets and sets the id from projects table but there is no relation between them. the creation is successful but when I login with that user, the project_id automatically changes

value automatically changes after login

2013-07-05 Thread Saied Delshad
I have added a field called project_id in the user module (auth_user table), and I can set it to any value based on another table (they don't have relations). when I login to the site, it automatically changes it to the first id of the projects table. I must mention that I don't have this

Re: How to render formset in template django and create vertical table?

2013-07-05 Thread Tom Evans
On Fri, Jul 5, 2013 at 4:39 PM, MacVictor wrote: > How to create this table used formset and extra=3? > > Table: > > | my name first column | second column | third column | fourth column | > > | formset1.field1.label | formset1.field1 | formset2.field1 | > formset3.field1 |

Re: django1.5 - url resolver vs i18n_patterns : wrong behaviour

2013-07-05 Thread Ramiro Morales
On Thu, Jun 6, 2013 at 3:24 PM, Ivan Tatarchuk wrote: > Not shure if I understand you correctly, but if I use static linking all > works fine. > Problem appears only with dynamic linking(like in admin templates). > Is this a feature or a kind of bug? > really want to