Re: Django 1.2.1, Postgres 8.3 - Cast (text to int) Issue

2010-07-15 Thread rd-london
se this to enable my Djapian-based on-site search to be able to search comments that people had left. Again, seems to work. Thanks, R On Jul 14, 8:45 pm, rd-london wrote: > Hi, > Wonder if someone can help. > I have a piece of code (filtched from elsewhere) that retrieves the > co

Django 1.2.1, Postgres 8.3 - Cast (text to int) Issue

2010-07-14 Thread rd-london
Hi, Wonder if someone can help. I have a piece of code (filtched from elsewhere) that retrieves the comments for a particular Entry (blog post): Comment.objects.filter(content_type=ContentType.objects.get_for_model(Entry), object_pk__in=Entry.objects.filter(title=self.title)) Problem is, that wit

Re: has_delete_permission not called in an admin template?

2009-11-23 Thread rd-london
OK, so my conclusion having examined the code listed at http://bit.ly/7ZrKHl is that my solution is thread-safe. There's no if...else... type logic happening in my solution so should be fine. R On Nov 20, 5:22 pm, rd-london wrote: > And ... yes there does seem to be a better way. &g

Re: has_delete_permission not called in an admin template?

2009-11-20 Thread rd-london
yCommentsAdmin, self).changelist_view(request, extra_context) However - as this post suggests - http://bit.ly/7ZrKHl - is this thread safe? Thanks for any thoughts anyone. R On Nov 20, 5:02 pm, rd-london wrote: > Right, I've worked out why this is: > > django/contrib/admin/options.py -

Re: has_delete_permission not called in an admin template?

2009-11-20 Thread rd-london
n(request), <- added here 'root_path': self.admin_site.root_path, 'app_label': app_label, 'action_form': action_form, 'actions_on_top': self.actions_on_top, 'actions_on_bottom':

has_delete_permission not called in an admin template?

2009-11-20 Thread rd-london
Hi, Wonder if anyone can help. Have following chunk in my own change_list.html template: {% block object-tools %} {% if has_add_permission %} {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}

Re: Template processing/pre-processing

2009-11-02 Thread rd-london
Not worry, found work-a-round using MEDIA_URL. On Oct 30, 4:39 pm, rd-london wrote: > Hi, > > I'd like to write some code, probably middleware, that look at various > types of HTML in templates and prepends a setting from settings.py. > > For example, I'd like t

Template processing/pre-processing

2009-10-30 Thread rd-london
Hi, I'd like to write some code, probably middleware, that look at various types of HTML in templates and prepends a setting from settings.py. For example, I'd like to pickup all .js, .css, .jpg, .png, .gif - and stick a custom setting from settings.py on the front - effectively a path. Ideally

Re: nginx, apache, and odd admin error

2009-10-24 Thread rd-london
Sorry meant to add. Key sources of information: - http://wiki.nginx.org/NginxHttpProxyModule#proxy_redirect - http://forum.slicehost.com/comments.php?DiscussionID=3065 R On Oct 24, 8:58 pm, rd-london wrote: > Looks like I nailed the reverse proxy arrangement, apologies to all on >

Re: nginx, apache, and odd admin error

2009-10-24 Thread rd-london
ult Django webserver for debugging, then switch a config setting in nginx, restart nginx and be using Apache. Tom - re: the admin on a separate port - thanks - sounds good. R On Oct 24, 12:46 pm, Tom Evans wrote: > On Fri, 2009-10-23 at 10:05 -0700, rd-london wrote: > > > On a

Re: nginx, apache, and odd admin error

2009-10-23 Thread rd-london
rate note - forgetting the reverse proxy arrangment for a moment, how would one serve admin on a separate port? Thanks for any help, R On Oct 21, 10:25 pm, rd-london wrote: > Hi, > Wonder if someone can help.This issue is all with a local dev > situation, so this isn't live. >

nginx, apache, and odd admin error

2009-10-21 Thread rd-london
Hi, Wonder if someone can help.This issue is all with a local dev situation, so this isn't live. I have nginx running on port 81 e.g. http://127.0.0.1:81/ and serving static media - which in turn proxies through to Apache running on port 96. All works fine (apart from the issue I outline below) -