Re: django form inputs

2011-04-30 Thread А . Р .
2011/4/30 Pulkit Mehrotra : >from wishlist.models import wish >from wishlist.forms import wish After a quick glance: you're binding wishlist.forms and wishlist models to the same name. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: fetching data from intermediate many-to-many table

2011-05-01 Thread А . Р .
2011/5/1 Oleg Lomaka <...@gmail.com>: > bs = BookSequence.objects.filter(book__pk=1).select_related() > for s in bs: >        print s.sequence.name, s.number_in_sequence Oh, thanks! Is it possible then to do left/right outer joins, as there may exist books without sequences and sequences without

Re: fetching data from intermediate many-to-many table

2011-05-01 Thread А . Р .
Oleg Lomaka <...@gmail.com> : > Sorry, but your question is too general as for me. Django doesn't support > SQL joins directly. Could you specify with an example what data do you need > to get from database using "joins"? I just wonder if it is possible to get data from those three tables in one

Re: fetching data from intermediate many-to-many table

2011-05-01 Thread А . Р .
Oleg Lomaka <...@gmail.com> : > We don't need the first query for fetching books. All data about book > available from BookSequence too. And all filters you apply to books, you can > apply to BookSequence via book__ filter. Again, from my first example, and > using just one query > bs = > BookSeq

Re: fetching data from intermediate many-to-many table

2011-05-01 Thread А . Р .
Oleg Lomaka <...@gmail.com> : > Hm... Again I think I have answered this question already. > Book.objects.annotate(s_count=Count('sequences')).filter(s_count=0) Right, but if you're trying to get book by id, this is not an option. Again, you will need to query db twice. -- You received this me

Re: fetching data from intermediate many-to-many table

2011-05-01 Thread А . Р .
>  Oleg Lomaka <...@gmail.com> : > >> Hm... Again I think I have answered this question already. >> Book.objects.annotate(s_count=Count('sequences')).filter(s_count=0) > > Right, but if you're trying to get book by id, this is not an option. > Again, you will need to query db twice. > Besides, sep

Re: Upload image using GET

2011-05-01 Thread А . Р .
2011/5/2 msdark <...@gmail.com>: > The service is written in C++ and use thrift to create a Client with > python.. so i write a simple django application like and interface to > the C++ service. What is "thrift"? Do you really mean it? > > Now i need to upload an image to the django application

Re: Upload image using GET

2011-05-01 Thread А . Р .
2011/5/2 Matias Hernandez Arellano <...@archlinux.cl>: > > And if it's not possible use GET to pass the image data to the django > application.. > how can i pass de data from a mobile application (without user actions like a > web form) to the django application, and upload, or copy de data into

Re: 500 message with POST

2011-05-02 Thread А . Р .
> @csrf_exempt > Any ideas what I'm doing wrong? Try importing csrf_exempt at the top of your views.py: from django.views.decorators.csrf import csrf_exempt -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Problem uploading images and videos with filenames containing not ascii characters

2011-05-03 Thread А . Р .
2011/5/3 Ariel <...@gmail.com>: > In my apache enviroment settings I have already set that: > > export LANG='en_US.UTF-8' > export LC_ALL='en_US.UTF-8' > > But I still get the same error. Bedsides I am using wsgi no modpython. > > Please, could somebody help me ??? > Regards > Thanks in advance. >

Re: Question about GenericRelation

2011-05-05 Thread А . Р .
If you want an one-to-one relationship, here you go: http://docs.djangoproject.com/en/1.3/ref/models/fields/#django.db.models.OneToOneField -- 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@googleg

Re: SystemError from django.conf.settings

2011-05-29 Thread А . Р .
2011/5/29 Cameron > >from django.conf import settings > SystemError: ../Objects/tupleobject.c:118: bad argument to internal > function > > Seems to me as a Python bug, not something wrong in Django, so upgrading to newer Python version may help. -- You received this message because you are