Using Memcached on Heroku

2011-11-16 Thread GuyBowden
Hi, I have a django app running on Heroku - I've just added memcached to the app and have got a server location plus username and password for the memcached server. How do I put the username / password into the cache settings in my settings.py file? I can only see the ability to put IP and Port i

date range issue

2009-09-07 Thread GuyBowden
Hi, I'm trying to use __range=(then, now) to filter my queryset However the SQL that is being generated is missing the quotes around the dates - it looks like this: .. x BETWEEN 2009-09-01 and 2009-09-07 but it should look like this: .. x BETWEEN '2009-09-01' and '2009-09-

Re: with statements

2009-08-16 Thread GuyBowden
Alex, It's a Tag, so will give the filter route a go - shouldn't take too much to swap it over.. at the moment this is the only place I'm using the tag/filter.. Guy On Aug 16, 1:37 pm, Alexander Dutton wrote: > On 16/08/09 09:50, GuyBowden wrote: > > > > >

with statements

2009-08-16 Thread GuyBowden
Hi All, Just wondering what the best way to do this sort of thing is: {% with last_tweet_sent this_user as sent_at %} {{ sent_at|naturalday:_("MONTH_DAY_FORMAT")|capfirst}} {% endwith %} I've got a function "last_tweet_sent" in a templatetags module that takes a user and spits back the

dynamic / updating foreign key choices

2009-01-12 Thread GuyBowden
Hi, I am writing a resource booking system in django using the admin functionality. I have a "Booking" model, a "ResourceType" model, and a "Resource" model. The booking model has date from and to fields, a foreign key field to select the ResourceType, and a ManyToManyField to link to the Reso

Re: referencing the current instance inside limit_choices_to

2008-12-10 Thread GuyBowden
Thankyou - saves me searching down this dead end... Cheers, Guy On Dec 10, 7:54 am, "Alex Koshelev" <[EMAIL PROTECTED]> wrote: > There is no way to have per-instance limit_choices_to. > > On Wed, Dec 10, 2008 at 03:56, GuyBowden <[EMAIL PROTECTED]> wrote: > &

referencing the current instance inside limit_choices_to

2008-12-09 Thread GuyBowden
Hi, I've looked about but can't find the answer to this. I'd like to set the limit_choices_to value of a ForeignKey field based on another selection in the current instance. i.e. - filter the choices based on another field of the same instance. something like this: my_fk.limit_choices_to = my

permissions and inline editing

2008-01-05 Thread GuyBowden
Hi, I'm just on my first Django project (not counting the tutorial!) so forgive me if this is a dumb question Anyways I'm implementing a web publishing system - whereby registered users can login and post articles. However I don't want those articles to be "published" until they've been approve