Re: Filter (AND excluding empty values)

2014-08-21 Thread Osiaq
request.GET.get(p)) for p in params if > request.GET.get(p)]) # use just the request params whose value is not > empty string > Property.objects.filter(**kwargs) > > On Dec 16, 12:40 pm, Osiaq <osiaq.net...@gmail.com> wrote: > > Well, still the same: > > >

Re: Looking for IDE + FTP

2011-02-11 Thread Osiaq
Aptana Studio On Feb 10, 11:09 pm, "Cal Leeming [Simplicity Media Ltd]" wrote: > Looks interesting, but the interface is ugly :/ I'll try it out tho :) > > On Thu, Feb 10, 2011 at 8:39 PM, Mike Ramirez wrote: > >  On Wednesday, February

Re: Modifying form values before redirect

2011-02-03 Thread Osiaq
My bad, sorry! That was simple form['customer']='modified_customer_name' On Feb 3, 1:23 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Thursday, February 3, 2011 2:09:56 AM UTC, Osiaq wrote: > > > Hi all! > > I'm receiving the form from index.html and redirec

Re: Modifying form values before redirect

2011-02-03 Thread Osiaq
Thank you :) On Feb 3, 1:41 pm, Tom Evans <tevans...@googlemail.com> wrote: > On Thu, Feb 3, 2011 at 2:09 AM, Osiaq <osiaq.net...@gmail.com> wrote: > > Hi all! > > I'm receiving the form from index.html and redirecting to order.html > > I would like to change &q

Modifying form values before redirect

2011-02-02 Thread Osiaq
Hi all! I'm receiving the form from index.html and redirecting to order.html I would like to change "customer" value before redirection. When I try to modify it, Im getting "object does not support item assignment" How can I change "customer" value posted from index.html ? Thank you!

Re: "CSRF verification failed" when sending simple GET request using curl

2011-01-21 Thread Osiaq
Maybe decorate the view with @csrf_extempt and test it like this: ---views.py--- from django.core.context_processors import csrf from django.views.decorators.csrf import csrf_exempt @csrf_exempt def contact(request): form = ContactForm() ...some wicked logic here ... return

Re: 4 different domains on single apache/mod_wsgi

2011-01-21 Thread Osiaq
other process > level settings across sub interpreters doesn't occur. > > Graham > > On Thursday, January 20, 2011 11:20:36 AM UTC+11, Osiaq wrote: > > > Hi all! > > I have 2 separate projects, with 2 separate domains > > > The problem: first website, E

Re: Django + CSS

2011-01-21 Thread Osiaq
No Vovk, it is not :) Official Django docs are missing some vital stuff :) On Jan 20, 5:56 am, Vovk Donets <donets.vladi...@gmail.com> wrote: > Man, this is just a quote from Django Documentation. > > 2011/1/20 Osiaq <osiaq.net...@gmail.com> > > > Same problem here.

Re: 4 different domains on single apache/mod_wsgi

2011-01-19 Thread Osiaq
len(output)))] start_response(status, response_headers) return [output] On Jan 20, 2:46 am, Kenneth Gonsalves <law...@thenilgiris.com> wrote: > On Wed, 2011-01-19 at 16:20 -0800, Osiaq wrote: > > It doesnt seems as easy as I thought it will be. > > it is as easy as falling of

Re: Django + CSS

2011-01-19 Thread Osiaq
Same problem here. Follow those rules, is simple and is working perfect. http://twigstechtips.blogspot.com/2009/08/django-how-to-serve-media-files-css.html On Jan 20, 1:58 am, "brian.mus...@ff.com" wrote: > Is it me or does it blow your mind that there is not one

4 different domains on single apache/mod_wsgi

2011-01-19 Thread Osiaq
Hi all! I have 2 separate projects, with 2 separate domains The problem: first website, ELG, is working OK. Another, cc4h, cannot find template index.html, but is working perfect on localhost with Django development server. Do you know any good tutorial regarding multiple domains on single

INCLUDE with parameters

2010-02-05 Thread Osiaq
Hello! Is there any way to pass parameters into INCLUDE implemented within django template? Something like this: {% include 'test.html' x='10' %} or similar? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: sorl.thumbnail on apache2

2010-01-02 Thread Osiaq
ango's error page; if not, > create a new view that returns the python path *as seen when launched > from apache* and see if it is correct there. > > 2009/12/30 Osiaq <osiaq.net...@gmail.com>: > > > INDEX.HTML: > > error message: 'thumbnail' is not a valid tag libr

sorl.thumbnail on apache2

2009-12-29 Thread Osiaq
hon manage.py runserver' is working perfect the same machine using apache2 + mod-python fails thumbnail location: /home/osiaq/djangoprojects/myproject/sorl/ thumbnail python path: ['/home/osiaq/djangoprojects/myproject/sorl/', '/home/ osiaq/djangoprojects/', '/home/osiaq/djangoprojects/ myproj

Re: Display images in template using ManyToMany

2009-12-20 Thread Osiaq
Thank you :) That was the only thing I didn't try :) It works flawlessly :) On Dec 20, 8:39 pm, rebus_ wrote: > {% for a in p.gallery.all %} >        <--- TRY THIS > {% endfor %} > > http://docs.djangoproject.com/en/dev/ref/files/file/#django.core.file... -- You received

Display images in template using ManyToMany

2009-12-20 Thread Osiaq
MODEL: class PropertyGallery(models.Model): link = models.ImageField(upload_to="gallery/props/") class Property(models.Model): name = models.CharField(max_length=200) gallery=models.ManyToManyField(PropertyGallery)

Re: very noob : DRY violation in views.py

2009-12-20 Thread Osiaq
u > can even extend a reusable app's "template-ready query library" by defining > your own templatetags that use its models .. it's very powerful and > flexible. > > -Ethan > > On Sat, Dec 19, 2009 at 6:17 PM, Osiaq <osiaq.net...@gmail.com> wrote: > >

Re: very noob : DRY violation in views.py

2009-12-19 Thread Osiaq
@Brian Thank you very much for clear explanation! I gives me much more than enormous pages of manuals. @Itay Thanks for suggestion, but refractoring inside views.py looks more clear to manage. I wasn't also sure, if such simple solution requires middleware involved. I will probably have more than

very noob : DRY violation in views.py

2009-12-19 Thread Osiaq
VIEWS: def services(request): property = Property.objects.all().order_by('name')[:4] city = City.objects.all() category=PropertyCategory.objects.all() status=PropertyStatus.objects.all() return render_to_response('website/services.html',{'property':

Re: Filter (AND excluding empty values)

2009-12-16 Thread Osiaq
@Phui Hock: YES YES YES !!! You are the One, thank you !!! @creecode: Thank you for exclude(**kwargs) manual, will have closer look at it, sounds interesting. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Filter (AND excluding empty values)

2009-12-15 Thread Osiaq
Well, still the same: VIEW: def search(request): t=request.GET['city'] c=request.GET['category'] s=request.GET['status'] properties =Property.objects.filter(Q(city__isnull=True)|Q(city=t), Q(category__isnull=True) | Q(category=c),

Re: Filter (AND excluding empty values)

2009-12-15 Thread Osiaq
Yes, this one is working properly. Actually I can use i.e properties = Property.objects.filter( Q(city=t) & Q(category=c ) & Q (status=s) ) These parameters are working perfect for: city='Tokio', category='House', status='For Rent' But fails for: city='Tokio', category null, status null

Re: Filter (AND excluding empty values)

2009-12-14 Thread Osiaq
Andy, I couldn't manage it. Could you (please) give me some example? It looks like this case is NOT simple at all, googling through multiple websites didn't bring anything even close to required solution. MODEL: class Property(models.Model): name = models.CharField(max_length=200)

Re: Filter (AND excluding empty values)

2009-12-14 Thread Osiaq
Thank you, I'm gonna try this way :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

Re: Filter (AND excluding empty values)

2009-12-14 Thread Osiaq
That post wasn't clear, my bad. Again: t=request.GET['city'] c=request.GET['category'] s=request.GET['status'] properties = Property.objects.filter( Q(city=t) | Q (category=c ) | Q(status=s) ) #example filter On the website I've implemented search engine with 3

Filter (AND excluding empty values)

2009-12-13 Thread Osiaq
I'm trying some "simple" stuff and just can't find out the solution: t=request.GET['city'] c=request.GET['category'] s=request.GET['status'] properties = Property.objects.filter( Q(city=t) | Q(category=c ) | Q (status=s) ) Goal: Find all the properties in 'city'