Moving a file manually

2012-01-26 Thread Tor Nordam
Hello, I have a model with a FileField, that I use to store some user uploaded files. After a while, I changed my mind about where to store the files, so I was just wondering if there is a way to manually move a file, and then update the location of the file as stored in the database. I'm using a

Re: Error related to googlebot?

2010-07-12 Thread Tor Nordam
Thank you for your reply. I have now tried disabling cookies, javascript and referer, and I was still unable to reproduce any of the errors. Here is a sample errormessage, with everything included: Traceback (most recent call last): File

Error related to googlebot?

2010-07-12 Thread Tor Nordam
I'm currently writing a blog framework in django, and I have it up an running (on www.presskanne.com). During the last 20 hours or so, I have gotten about 60 emails with error 500 messages. They seem to originate from different pages all over the site, but they all have two things in common: The

Re: cleaning html with bleach

2010-07-01 Thread Tor Nordam
Thank you both for your replies. I think I'll go for using bleach to clean on input, and mark as safe on output. I must say, however, that I'm surprised at how hard it is to find information about this topic. I would have thought that allowing some, but not all, html was a relatively common task,

cleaning html with bleach

2010-06-30 Thread Tor Nordam
I'm developing a blog application in django, and I've been looking into ways to clean the input which will allow safe html tags, while removing all the evil stuff. I came across the tool bleach ( http://github.com/jsocol/bleach ), which seems to be easy to use. I was just wondering if anyone has

Re: Problem installing django 1.2 on Mac OS 10.6.3

2010-05-23 Thread Tor Nordam
My bad. Turns out it was a problem with multiple versions of python installed. Fixed it. On May 23, 7:43 pm, Tor Nordam <tor.nor...@gmail.com> wrote: > Hello, > > I run into a problem when installing django 1.2 on my Mac. I follow > the recipe on the web page, i.e. I download

Problem installing django 1.2 on Mac OS 10.6.3

2010-05-23 Thread Tor Nordam
Hello, I run into a problem when installing django 1.2 on my Mac. I follow the recipe on the web page, i.e. I download django-1.2.tar.gz, unpack it, and install by running sudo python setup.py install. After installing, django seems to work fine, but if I delete the directory I installed it

Re: Using markdown to clean html

2010-03-20 Thread Tor Nordam
Thank you, that looks good. But just out of curiosity: Does anyone know exactly what, if anything, the markdown template filter does to text with html? Does it allow everything? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Using markdown to clean html

2010-03-19 Thread Tor Nordam
I'm currently writing a blog application in django, and a part of what I want to do is allow some HTML in posts and comments. I discovered yesterday, more or less by accident, that the markdown filter actually allows some HTML. I've been looking for a list of exactly what markdown allows, but I

Re: Set language on per page basis

2010-02-26 Thread Tor Nordam
. > > Or if you are determining the language based on a url parameter you > can look at request.GET > > Ian > > > > On Thu, Feb 25, 2010 at 8:24 AM, Tor Nordam <tor.nor...@gmail.com> wrote: > > After doing some further research, I have found the following: >

Re: Set language on per page basis

2010-02-24 Thread Tor Nordam
the url. However, when I add the same line as above to process_view(), nothing happens to the language. Is there an easy way to do this? On Feb 24, 9:59 pm, Tor Nordam <tor.nor...@gmail.com> wrote: > Thank you for your reply, > > Using the {% trans %} method is indeed what

Re: Set language on per page basis

2010-02-24 Thread Tor Nordam
e: > I believe you want to use the {% *trans* %} template > method.http://docs.djangoproject.com/en/dev/topics/i18n/internationalization/ > > -Tim > > On Wed, Feb 24, 2010 at 7:18 AM, Tor Nordam <tor.nor...@gmail.com> wrote: > > I'm currently developing a proj

Set language on per page basis

2010-02-24 Thread Tor Nordam
I'm currently developing a project for making course webpages at my university. Essentially, each course would be an instance of the model Course, and each course would then get it's own webpage. However, as some courses are taught in Norwegian, and some in English, I want to use django's