I'm not sure whether this could be the cause of the error, when I
start Apache on the server, I get the message:
Failed to enable the 'httpready' Accept Filter
Could this somehow be causing the problem? My host won't fix it on
the shared production server, unless it's a "life and death issue".
So I need to prove that this is the cause before they'll consider
touching it.
I don't understand what's going on. It's annoyingly intermittent. It
will render perfectly when I refresh the page a few times, and then
the error appears again, remaining for many more refreshes. Sometimes
it will switch from rendering correctly to rendering the error in a
very short period, sometimes it will take hours. There is no
consistency with the behaviour from what I can gather.
And I can't replicate the problem on our development server which is
running OSX.
Suggestions?
On 15/05/2007, at 9:42 AM, Mark Jarecki wrote:
> Just to let you know, the code below works fine on the development
> server.
>
> I've now tried all the patches and the error still persists. Are
> there any suggestions?
>
> Cheers
>
> Mark
>
> On 14/05/2007, at 1:33 PM, Mark Jarecki wrote:
>
>> Hi,
>>
>> Im currently at a loss about how to fix this issue.
>>
>> I have tried the modpython.patch in #1796.
>>
>> What is weird is that the doesn't consistently appear - it is
>> intermittent. When I refresh the page it sometimes appears as it
>> should, and other times with the error. I'm running the latest
>> Django SVN version, and latest versions of Postgres, Psycopg,
>> mod_python, python. The system is being hosted on Freebsd 6.1.
>>
>> Getting 2 errors:
>> 1)Cannot resolve keyword 'products' into field. Choices are: id,
>> osIconName, osIconImage, altText, isPublished
>> 2)Cannot resolve keyword 'products' into field. Choices are: id,
>> osIconName, osIconImage, altText, isPublished, created_on,
>> created_by, last_modified, modified_by
>> the models.py:
>>
>> class Products(models.Model):
>> productName = models.CharField('Product Name',maxlength=200)
>> productSlug = models.SlugField('Product Slug',prepopulate_from=
>> ('productName',), unique=True)
>> productDrivers = models.ManyToManyField('ProductDrivers',
>> filter_interface=models.HORIZONTAL, blank=True,
>> verbose_name='Product Drivers')
>> productDocuments = models.ManyToManyField('ProductDocuments',
>> filter_interface=models.HORIZONTAL, blank=True,
>> verbose_name='Product Documents', related_name='productDocuments')
>> productOSIcons = models.ManyToManyField
>> ('ProductOSIcons',verbose_name='Product Operating System Icons',
>> filter_interface=models.HORIZONTAL, blank=True)
>> relatedProducts = models.ManyToManyField
>> ('self',verbose_name='Related Products',
>> filter_interface=models.HORIZONTAL, blank=True)
>> class Admin:
>> pass
>>
>> class ProductOSIcons(models.Model):
>> osIconName = models.CharField('Icon Name',maxlength=200)
>> osIconImage = models.ImageField('Icon Image',upload_to='...' )
>> altText = models.CharField('Icon Alt Text',maxlength=200)
>> isPublished = models.BooleanField('Is Icon Published?' )
>> class Admin:
>> pass
>>
>> class ProductDrivers(models.Model):
>> driverName = models.CharField('Driver Name',maxlength=200)
>> driverLink = models.URLField('Driver URL')
>> isPublished = models.BooleanField('Is Driver Published?')
>> class Admin:
>> pass
>>
>> class ProductDocuments(models.Model):
>> documentTitle = models.CharField('Document Title', maxlength=200)
>> documentFile = models.FileField('Document File', upload_to='...')
>> isPublished = models.BooleanField('Is Document Published?')
>> class Admin:
>> pass
>>
>>
>> views.py:
>>
>> VIEW FOR ERROR 1.
>> ...
>> productCategories = ProductCategory.objects.filter
>> (isPublished=True).order_by('categoryName')
>> for category in productCategories:
>> products = Products.objects.filter
>> (productCategory=category, isPublished=True,
>> productDrivers__isPublished=True) or Products.objects.filter
>> (productCategory=category, isPublished=True,
>> productDocuments__isPublished=True)
>> products = products.distinct().order_by('productName')
>> ...
>> if product.productDrivers.filter(isPublished=True) and
>> product.productDocuments.filter(isPublished=True): # <-------
>> ERROR IS HERE
>> ...
>>
>> VIEW FOR ERROR 2.
>>
>> ...
>> product = Products.objects.get(productSlug=product_slug,
>> isPublished=True)
>> relatedDocuments = product.productDocuments.filter
>> (isPublished=True).order_by('documentTitle')
>> osIcons = product.productOSIcons.filter
>> (isPublished=True).order_by('osIconName')
>> drivers = product.productDrivers.filter
>> (isPublished=True).order_by('driverName')
>> ...
>> return render_to_response('ProductPage.html',
>> {'OsIcons':osIcons,'MEDIA_URL':MEDIA_URL}
>>
>>
>>
>> Template Code:
>> ...
>> {% if OsIcons %} # <----- ERROR IS HERE
>> <li>
>> {% for icon in OsIcons %}
>> <img class="logo" src="{{MEDIA_URL}}{{icon.osIconImage}}"
>> alt="{{ icon.altText }}" />
>> {% endfor %}
>> </li>
>> {% endif %}
>> ...
>>
>> settings.py:
>>
>> MIDDLEWARE_CLASSES = (
>> 'django.middleware.common.CommonMiddleware',
>> 'django.contrib.sessions.middleware.SessionMiddleware',
>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>> 'django.middleware.doc.XViewMiddleware',
>> 'appname.middleware.threadlocals.ThreadLocals',
>> )
>>
>>
>>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---