Error since added SSL certificate

2016-12-26 Thread James Hargreaves
Merry Christmas everyone! I eel recently added an SSL certificate to my domain where the application is hosted with Django. Since I setup the SSL certificate I've been receiving a lot of errors like this: SuspiciousOperation: Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS): AAA.BB

Re: How/where to call setlocale

2014-09-19 Thread James Hargreaves
ed :) Jay On 18 September 2014 22:08, James Hargreaves wrote: > Hi Ulrich et al, > > Thanks again for your help. > > I'm having issues with your solution. It works when making a literal call > to locale but Django is not using the correct locale for some reason. > &

Re: How/where to call setlocale

2014-09-18 Thread James Hargreaves
y settings.py instead but that had no effect either. Any ideas appreciated please. Thanks Jay On 17 September 2014 07:38, James Hargreaves wrote: > Thanks Ulrich. > > No I think I've misread the documentation with regards it affecting the > whole environment rather than the program

Re: How/where to call setlocale

2014-09-16 Thread James Hargreaves
calls to my Django application. > > I just realized that in your first post you mentioned that "this affects > the entire environment". I just read through the locale module > documentation, which states that "The C standard defines the locale as a > program-wide pro

Re: How/where to call setlocale

2014-09-16 Thread James Hargreaves
Thanks for your reply Ulrich. If I set the locale in WSGI would that persist for all connections? If so that sounds like the best option. Thanks Jay On Tuesday, September 16, 2014, wrote: > Hi, > I ran into a similar problem yesterday while programming a web shop with > Django (Version 1.6, Py

How/where to call setlocale

2014-09-16 Thread James Hargreaves
Hello, I am running Django/python on Ubuntu. I am finding that my locale is not setup correctly. Running locale from the command line shows this: LANG=en_GB.UTF-8 LANGUAGE=en_GB:en LC_CTYPE="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_COLLATE="en_GB.UTF-8" LC_MONETARY="en_GB.U

Re: 404 errors reported as 500 errors

2012-05-04 Thread James Hargreaves
This is a double post, sorry. The below issue has now been resolved - I defined a custom 404 handler some time ago. I removed this previously but forgot to remove the definition from urls.py! handler404 = application.views.handler404 On 3 May 2012 22:58, James Hargreaves wrote: > Thanks

Re: 404 Issues

2012-05-04 Thread James Hargreaves
ViewDoesNotExist: Tried *application.views.handler404*. Error was: 'module' object has no attribute 'handler404' On 4 May 2012 12:28, Tom Evans wrote: > On Thu, May 3, 2012 at 10:54 AM, James Hargreaves > wrote: > > Hello, > > > > I have created a we

Re: 404 errors reported as 500 errors

2012-05-03 Thread James Hargreaves
It might be worth seeing if that's part of the problem > (although doubtful that it would be). > If that's not the problem, does Django-CMS have its own specialized 404 > handling? I've never used it but it's a couple of ideas to try out. > > > On Thu,

404 errors reported as 500 errors

2012-05-03 Thread James Hargreaves
Hello, I have created a website using Django CMS: http://www.trailer-traders.co.uk When I visit a URL on this site that does not exist in Django CMS I get a 500 error - eg: http://www.trailer-traders.co.uk/xxx I was expecting a 404 error. Before you say it I don't think this is caused by Dja

404 Issues

2012-05-03 Thread James Hargreaves
Hello, I have created a website using Django CMS: http://www.trailer-traders.co.uk When I visit a URL on this site that does not exist in Django CMS I get a 500 error - eg: http://www.trailer-traders.co.uk/xxx I was expecting a 404 error. Before you say it I don't think this is caused by Dja

Re: Django model manager "live" object issues

2011-05-30 Thread James Hargreaves
the "live" query. Cheers Jay On May 30, 1:57 pm, James Hargreaves wrote: > Hi Kirill, > > Thanks for your response and sorry for my tardiness in replying! > > I think you are right - my queryset is cached in the view, as my > urls.py looks like this: > &g

Re: Django model manager "live" object issues

2011-05-30 Thread James Hargreaves
Hi Kirill, Thanks for your response and sorry for my tardiness in replying! I think you are right - my queryset is cached in the view, as my urls.py looks like this: from django.conf.urls.defaults import * from django.views.generic.simple import redirect_to from django.views.generic.list_detail

Django model manager "live" object issues

2011-05-19 Thread James Hargreaves
Hello, I am using Django. I am having a few issues with caching of QuerySets for news/category models: class Category(models.Model): title = models.CharField(max_length=60) slug = models.SlugField(unique=True) class PublishedArticlesManager(models.Manager): def get_query_set(self):