I've not set anything up...
On Dec 8, 1:48 am, "Alex Koshelev" <[EMAIL PROTECTED]> wrote:
> Do you use caching?
>
> On Mon, Dec 8, 2008 at 07:34, garagefan <[EMAIL PROTECTED]> wrote:
>
> > ok... i've been able to figure out how long it takes based on the time
> > stamp... an hour and a half for a new object to have come in. It
> > appears that the item is not readable by the two templates, one of
> > which using {%for object in latest $} and then another template that
> > doesn't use it at all.
>
> > the code that reads the objects instantly is:
>
> > {% for obj in recent_posts %}
> > <li>
> > <a href="/mysite/blog
> > {{ obj.get_absolute_url }}" title="Permanent Link to {{ obj.title}}">
> > {{ obj.title}}</a>
> > </li>
> > {% endfor %}
>
> > which is getting the info from:
>
> > from django.template import Library, Node
> > from django.db.models import get_model
>
> > register = Library()
>
> > class LatestContentNode(Node):
> > def __init__(self, model, num, varname):
> > self.num, self.varname = num, varname
> > self.model = get_model(*model.split('.'))
>
> > def render(self, context):
> > context[self.varname] = self.model._default_manager.filter
> > (status=1)[:self.num]
> > return ''
>
> > def get_latest(parser, token):
> > bits = token.contents.split()
> > if len(bits) != 5:
> > raise TemplateSyntaxError, "get_latest tag takes exactly four
> > arguments"
> > if bits[3] != 'as':
> > raise TemplateSyntaxError, "third argument to get_latest tag
> > must be 'as'"
> > return LatestContentNode(bits[1], bits[2], bits[4])
>
> > get_latest = register.tag(get_latest)
>
> > an hour and a half is a bit much... i could deal with 5-10 minutes,
> > but at the same time, if the "Recent entries" list reads
> > immediately... so should the rest of the site
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---