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):

Re: How/where to call setlocale

2014-09-19 Thread James Hargreaves
On 18 September 2014 22:08, James Hargreaves <james.hargrea...@gmail.com> 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

Re: How/where to call setlocale

2014-09-18 Thread James Hargreaves
ppreciated please. Thanks Jay On 17 September 2014 07:38, James Hargreaves <james.hargrea...@gmail.com> wrote: > Thanks Ulrich. > > No I think I've misread the documentation with regards it affecting the > whole environment rather than the program. > > I'll try your

Re: How/where to call setlocale

2014-09-17 Thread James Hargreaves
> > 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 property ". This means that there will

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

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"

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 <james.harg

Re: 404 Issues

2012-05-04 Thread James Hargreaves
ist: Tried *application.views.handler404*. Error was: 'module' object has no attribute 'handler404' On 4 May 2012 12:28, Tom Evans <tevans...@googlemail.com> wrote: > On Thu, May 3, 2012 at 10:54 AM, James Hargreaves > <james.hargrea...@gmail.com> wrote: > > Hello,

Re: 404 errors reported as 500 errors

2012-05-03 Thread James Hargreaves
hu, May 3, 2012 at 10:03 AM, James Hargreaves < > james.hargrea...@gmail.com> wrote: > >> Hello, >> >> I have created a website using Django CMS: >> >> http://www.trailer-traders.co.**uk <http://www.trailer-traders.co.uk/> >> >> When

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

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

Re: Django model manager "live" object issues

2011-05-30 Thread James Hargreaves
Cheers Jay On May 30, 1:57 pm, James Hargreaves <james.hargrea...@gmail.com> 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 th

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):