Re: What is the ideal web server to use with Django?

2015-05-13 Thread termopro
> No. > > Cheers > > Tom > OK :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: What is the ideal web server to use with Django?

2015-05-13 Thread termopro
> >I have read that > > Apache's performance degrades on high load. > > That is absolute nonsense. > > Cheers > > Tom > Doesn't Apache create new process for each request thus eating memory when serving large amounts of static files during traffic peaks ? -- You received this message bec

Re: django doubt

2015-01-27 Thread termopro
Purpose well, libs clean, u happy. If don't use, don't use - problem no. The diff is some syntx sugr/ abilty do thngs ezly. On Tuesday, January 27, 2015 at 9:15:19 AM UTC+2, Kadhir Mani wrote: > > what pupose using virtualenv ?if don't use what hapend? what is diff bte > virtualwrpper and virtua

Re: Django's query result caching

2014-12-01 Thread termopro
:36:13 PM UTC+2, george wrote: > > You can convert your spatial results to WKT and store them in redis. > > On Mon, Dec 1, 2014 at 2:45 PM, termopro > > wrote: > >> I am creating a website using Django 1.7 and GeoDjango. I've hit the >> point when i need to optimize

Django's query result caching

2014-12-01 Thread termopro
I am creating a website using Django 1.7 and GeoDjango. I've hit the point when i need to optimize website speed. One of the bottlenecks is query execution. There are some queries which run slowly even when optimized. So i'd like to cache query results and store them in Redis. The problem t

Re: Constructing query

2014-12-01 Thread termopro
Thank you Collin ! It works :) On Sunday, November 30, 2014 9:09:46 PM UTC+2, Collin Anderson wrote: > > Hi, > > This might work: > > Tag.objects.filter(name__startswith='A').exclude(company=None).order_by( > 'name').all() > > Collin > > >

Constructing query

2014-11-28 Thread termopro
I have 2 models: Companies and Tags. A company may have several tags associated with it, so Tag contains many-to-many relation to Company. If i'd like to get Tags starting with "A" i'd write: tags = Tag.objects.filter(name__startswith='A').order_by('name').all() But how do i get the list of tag

Re: Advice needed: Adaptive/Responsive Images in Django?

2014-11-20 Thread termopro
You don't need Django for that. The idea behind responsive images is that you can scale them and adapt to users screen using css. On Thursday, November 20, 2014 8:05:45 AM UTC+2, ThomasTheDjangoFan wrote: > > Hi guys, > > do you have a tip for implementing adaptive (responsive) images in django?

Re: Deploying Django project

2014-11-19 Thread termopro
Thank you for your reply Daniel. On Wednesday, November 19, 2014 9:07:31 PM UTC+2, Daniel Roseman wrote: > > On Wednesday, 19 November 2014 10:22:25 UTC, termopro wrote: >> >> I have created a Django 1.7 project and would like to deploy it. I am >> reading about how t

Deploying Django project

2014-11-19 Thread termopro
I have created a Django 1.7 project and would like to deploy it. I am reading about how to do it right and i have some questions. If i understand correctly deployment should contain the following steps: 1) Initial remote machine set up: - a) install os / server / database / cache ... -

Django strange behaviour

2014-11-07 Thread termopro
I have a view in Django which calls external library/class. The problem is that for some reason Django keeps caching results coming from previous calls of that class. Please consider the following simple example: Django view: from some_path import Demodef test_view(request): demo = Demo

Re: Is there a way to supress blank lines in the HTML?

2014-10-23 Thread termopro
May i ask you why do you need that ? If you need this for some performance reasons like html compression, you are doing it wrong. Instead you could use server-side GZIP compression when serving html which will do the job much more efficiently. If you are concerned about the structure of the do

Re: Weird form validation question

2014-10-09 Thread termopro
I am using form.is_valid() On Thursday, October 9, 2014 10:54:56 AM UTC+3, Sergiy Khohlov wrote: > > Are you using form_valid method in view ? > > Many thanks, > > Serge > > > +380 636150445 > skype: skhohlov > > On Thu, Oct 9, 2014 at 10:10 AM, termopro >

Weird form validation question

2014-10-09 Thread termopro
Hi, I am building a user registration page. Page has a form where user can select his current state and city. The problem with that is that i cannot load list of cities into the form when the page is being generated. That's because i show the user only cities from his state, not all of them. S

Correctly passing parameters to raw query

2014-09-24 Thread termopro
Hello, I am constructing raw query which looks like the following: "SELECT * FROM some_table WHERE id IN (1,3,5);" So inside my view i write: entities = Entity.objects.raw(""" SELECT * FROM some_table WHERE id IN (%s); """, [ids_list]) How should i correctly pass the argument ? Because i keep

Does Django detect changes in models Meta ?

2014-08-22 Thread termopro
Hi there, I am using Django 1.7 RC2. I have created models and have run all the migrations so Django created tables in database. Now i decided to change database table names and have added Meta class to models containing table name: class SomeModel(models.Model): ... class Meta: db_