Re: Error configuring Django to run customized comments framework

2010-10-02 Thread Phil Gyford
A bit late, so you may have solved this or given up on it, but still... I just had the same error message and eventually solved it by changing the order of my INSTALLED_APPS. So maybe you have slightly different settings on your local and live servers, and the apps are ordered differently on each?

Customising comment framework and keeping moderation working

2010-10-05 Thread Phil Gyford
Hi, I can't get my extended version of django.contrib.comments to take notice of moderation. If I use the standard comments framework, then my subclass of CommentModerator does the job - I've just used it to define enable_field, and this allows or prohibits comments as expected. But if I switch

Re: Customising comment framework and keeping moderation working

2010-10-05 Thread Phil Gyford
ng over it, but it's got personal, and I just want to understand the solution now! Any help very much appreciated. On Tue, Oct 5, 2010 at 11:27 AM, Phil Gyford wrote: > Hi, > > I can't get my extended version of django.contrib.comments to take > notice of moder

Re: Customising comment framework and keeping moderation working

2010-10-05 Thread Phil Gyford
ntry" to either customcomments/forms.py or customcomments/models.py then comments are *always* allowed through. Any idea why? Thanks. On Tue, Oct 5, 2010 at 2:46 PM, Phil Gyford wrote: > I've investigated further and... it's very strange. > > I've got a v

Re: Customising comment framework and keeping moderation working

2010-10-06 Thread Phil Gyford
ad/thread/22875fd287d0aa81/d6cf04a857424678?show_docid=d6cf04a857424678 > > and here: > http://groups.google.com/group/django-developers/browse_thread/thread/363fc7f3ca107f94/25a85be6cce875ed?hide_quotes=no > > no time for a full reply here but if it's gotten personal this might > help yo

Re: What does an ideal django workflow setup look like?

2010-10-22 Thread Phil Gyford
After reading a few articles on this kind of thing, I tried to figure out a good, repeatable way to do some of this, and wrote up the whole process here: http://www.gyford.com/phil/writing/2010/09/29/django-environment.php It doesn't (yet) cover the best ways of integrating dev/production servers

Unit test failing when testing post of a comment

2010-11-11 Thread Phil Gyford
Hi, I have a unit test that tests that a comment can be posted on an entry in a Django blog. Posting a comment myself in the browser works fine, but the test always fails with this error: "TemplateSyntaxError: Caught VariableDoesNotExist while rendering: Failed lookup for key [request] in u'[{}]'

Re: Unit test failing when testing post of a comment

2010-11-14 Thread Phil Gyford
for the presence of these, and using empty strings if they're not present, has got things working again. On Thu, Nov 11, 2010 at 5:30 PM, Phil Gyford wrote: > Hi, > > I have a unit test that tests that a comment can be posted on an entry > in a Django blog. Posting a comment myself i

Having LiveServerTestCase use same database as tests

2012-08-21 Thread Phil Gyford
I'm writing integration tests using LiveServerTestCase/Selenium in v1.4.1. By default the process that's started by LiveServerTestCase uses a different database to the test database used by the tests. This is a pain because I can't use factories (I'm using FactoryBoy at the moment) to create data t

django.contrib.markup deprecated in 1.5 - what's the alternative?

2012-09-15 Thread Phil Gyford
I noticed that django.contrib.markup is marked as deprecated in Django 1.5 . If I'm starting a new project now, what alternative should I be using, to avoid running into problems with future versions of Django? I could write my own Markdown

Re: django.contrib.markup deprecated in 1.5 - what's the alternative?

2012-09-16 Thread Phil Gyford
Thanks for the pointer Jirka - I hadn't managed to find that ticket. Makes sense and, like you, I only have a few trusted users entering text that will be filtered. On 15 September 2012 19:37, Jirka Vejrazka wrote: > Hi Phil, > > incidentally, I was looking at this just recently. The > contrib.

Re: Having LiveServerTestCase use same database as tests

2012-10-21 Thread Phil Gyford
-- Forwarded message -- From: Дмитрий Белавенцев Date: 21 October 2012 09:43 Subject: Re: Having LiveServerTestCase use same database as tests To: django-users@googlegroups.com Cc: p...@gyford.com Hi, Phil! I faced the same problem. Do you find the solution? вторник, 21 августа 2012 г., 22:24:59 UTC

How best to cache a queryset of Comments?

2013-03-14 Thread Phil Gyford
I have a site that uses the standard Django Comments app (well, a subclass of it, with not many changes) for comments on different content types. I'd like to be able to cache a list of comments, as fetching the comments is one of the most frequent and slowest queries that's happening at the moment

Displaying single-line progress while a management command runs

2016-05-09 Thread Phil Gyford
I have a custom management command which calls a method in another class, which fetches lots of data from a third-party API. Fetching the data could take a few seconds or it could take over an hour, depending on the quantity. I'd like to display progress on the command line, so the user knows the

Re: Displaying single-line progress while a management command runs

2016-05-23 Thread Phil Gyford
l. 14.23 skrev Phil Gyford : > > > > I have a custom management command which calls a method in another > class, which fetches lots of data from a third-party API. Fetching the data > could take a few seconds or it could take over an hour, depending on the > quantity. > &g