Re: How to use an optional ForeignKey to sites.Site and admin's "View on site"?

2012-05-30 Thread Dirk van Oosterbosch, IR labs
Indeed, I'm using optional (and nullable) ForeignKeys in other places as well. The problem with an optional ForeignKey to Django's contrib sites.Site model, is that it breaks the "View on site" button in the admin section. near line 60 in /django/contrib/contenttypes/views.py: object_domain =

How to use an optional ForeignKey to sites.Site and admin's "View on site"?

2012-05-29 Thread Dirk van Oosterbosch, IR labs
Hi, I have a model which has a ForeignKey to the Django contrib sites.Site model. This field should be optional. class MyModel(models.Model): optional_domain = models.ForeignKey('sites.Site', related_name='optional_site', null=True, blank=True) ... However, I'm running into a

Re: upload progress bar (ticket #4165)

2007-07-24 Thread Dirk van Oosterbosch, IR labs
age? Best regards dirk On 23-jul-2007, at 19:11, Dirk van Oosterbosch, IR labs wrote: > ... > uncaught exception: [Exception... "Component returned failure code: > 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" > nsresult: "0xc1f30001 (NS_ERROR_NOT_INIT

Re: upload progress bar (ticket #4165)

2007-07-23 Thread Dirk van Oosterbosch, IR labs
t occur every one second by default. For IE, use > fiddler to debug. > > Regards > > Chatchai > > On Jul 22, 10:25 pm, "Dirk van Oosterbosch, IR labs" > <[EMAIL PROTECTED]> wrote: >> Hi, >> >> About a progress bar for uploading files. >&

upload progress bar (ticket #4165)

2007-07-23 Thread Dirk van Oosterbosch, IR labs
Hi, About a progress bar for uploading files. I think the standard upload progress bar should be javascript not Flash. Something like http://ajaxian.com/archives/dojo-file-upload-progress- bar-widget How to do this with Django? I applied the patches and followed all the steps mentioned in ticket

Re: installation issues

2007-07-13 Thread Dirk van Oosterbosch, IR labs
On 13-jul-2007, at 5:42, surfwizz wrote: > I installed python from www.python.org, so the command prompt opens it > into 2.5.1. That's what I tried to install django into. Can you confirm that django is installed at this location? /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/

Re: FastCGI spawns unnecessary processes on large POST's

2007-07-04 Thread Dirk van Oosterbosch, IR labs
Aha, of course you guys also have troubles with uploading large POST's. I found the ticket: #2070 Say, which of those patches could I run over version 0.96? And can I still use the same code as I have here http://dpaste.com/ hold/13578/ ? dirk On 4-jul-2007, at 17:03, Dirk van Ooster

Re: FastCGI spawns unnecessary processes on large POST's

2007-07-04 Thread Dirk van Oosterbosch, IR labs
On 1-jul-2007, at 21:24, Dirk van Oosterbosch, IR labs wrote: > > I narrowed down the moment the extra processes are spawned by > FastCGI to be here: > > if request.method == 'POST': > if not (('poster' in request.FILES) or ('m

Re: newforms, unicode and umlauts

2007-07-04 Thread Dirk van Oosterbosch, IR labs
Thanks, that did it. d On 2-jul-2007, at 3:35, Malcolm Tredinnick wrote: > So change > it to compare: > > unicode(default_movies[i].name, 'utf-8') == self.clean_data > [...] --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: FastCGI spawns renegade processes [Follow up]

2007-07-01 Thread Dirk van Oosterbosch, IR labs
On 1-jul-2007, at 16:14, Dirk van Oosterbosch, IR labs wrote: > This is the code I am using: > http://dpaste.com/hold/13336/ > I narrowed down the moment the extra processes are spawned by FastCGI to be here: form = UploadForm({'name1': slots[0]['name'

Re: newforms, unicode and umlauts

2007-07-01 Thread Dirk van Oosterbosch, IR labs
Hello, I think I might have a similar problem. Or at least it seems to be a Unicode thing. Unfortunately, however, I cannot switch to the unicode-branch, because I'm stuck to the ports (version 0.96 ATM). I am comparing the value stored in the model (database) with the value coming in from

FastCGI spawns renegade processes (and makes the server give up eventually)

2007-07-01 Thread Dirk van Oosterbosch, IR labs
Hi All, I am struggling with this problem for a while now. I have a form (newforms) to allow users to upload images and movie files. All the code runs fine on my test-development machine, but when I deploy it on a server with FastCGI, it slowly breaks. This is the code I am using: http://dp

Re: 500 Errors when uploading files (with FastCGI)

2007-06-26 Thread Dirk van Oosterbosch, IR labs
s memory a bit more economically? And is there a way to have the files in the requested post data streamed into files on disk directly? Thanks, dirk On 26-jun-2007, at 17:36, Dirk van Oosterbosch, IR labs wrote: > Hi All, > > I deployed an app with uploading funct

Strange Errors with FastCGI when uploading files

2007-06-26 Thread Dirk van Oosterbosch, IR labs
Hi All, I deployed an app with uploading functionality to a server running FastCGI. When I had it tested by my users, the site became completely unresponsive, returning nothing but Error 500's. In the log I find a lot of these: Unhandled exception in thread started by > Traceback (most recent

Re: Newbie Question - How do I get my burger and fries from BK and not Mickey D's?

2007-06-22 Thread Dirk van Oosterbosch, IR labs
Hi Wiley, I would say your data model -as you describe it- makes more sense if Dishes has a foreign key to Restaurants. Because it seems a typical dish (say mc_burger) can only be ordered in one restaurant (mcD). Then you don't need the foreign key Restaurants in IndividualMeals. ... Howeve

Re: Ticket #3297 & Newforms Image Uploading

2007-06-22 Thread Dirk van Oosterbosch, IR labs
On 22-jun-2007, at 6:22, Nimrod A. Abing wrote: > I have managed to do > so either by processing in the view or extending the form. As of now, > all processing of all forms occur in the view and validation for file > and image fields in a method of the form. > > This is what I did for the field v

Re: newforms and File (image) upload

2007-06-21 Thread Dirk van Oosterbosch, IR labs
On 20-jun-2007, at 22:19, SanPy wrote: > File and image uploading for newforms, AFAIK, is not implemented in > 0.96. There is a ticket for this (#3297). If you look in the django- > developers newsgroup and search for #3297, you will find more > information. It is possible to have it working with

Re: Problems with running Django on a remote machine

2007-06-20 Thread Dirk van Oosterbosch, IR labs
On 21-jun-2007, at 2:06, Malcolm Tredinnick wrote: > On Wed, 2007-06-20 at 18:34 +0200, Dirk van Oosterbosch, IR labs > wrote: >> Should I make this into a ticket? >> > > You could open a ticket, but it's likely not to be "fixed" very > q

Re: Problems with running Django on a remote machine

2007-06-20 Thread Dirk van Oosterbosch, IR labs
On 19-jun-2007, at 13:42, Dirk van Oosterbosch, IR labs wrote: >>> It runs untill I try to load a page (from another ssh >>> shell). And I just get the prompt back: >>> > > This is as far as I am getting: > > in /core/servers/basehttp.py, line 272 (Serv

newforms and File (image) upload

2007-06-20 Thread Dirk van Oosterbosch, IR labs
Hello, I'm starting with Django, so I was adviced to use the newforms. But I can't just figure out how to correctly upload images (or other files for that matter). I heard that there was already much discussion on this list, but on groups.google.com I couldn't find any pointers. I tried out

Re: Problems with running Django on a remote machine

2007-06-19 Thread Dirk van Oosterbosch, IR labs
On 19-jun-2007, at 0:59, Malcolm Tredinnick wrote: It runs untill I try to load a page (from another ssh shell). And I just get the prompt back: >> >> The server hangs on the next line, 272: >> self.result = application(self.environ, self.start_response) >> and just exits, without

Re: Problems with running Django on a remote machine

2007-06-18 Thread Dirk van Oosterbosch, IR labs
On 15-jun-2007, at 0:18, Malcolm Tredinnick wrote: > > On Thu, 2007-06-14 at 16:37 +0200, Dirk van Oosterbosch, IR labs > wrote: > [...] >> >> Exactly. It runs untill I try to load a page (from another ssh >> shell). >> And I just get the prompt back: &

Re: Survey: FileBrowser and FancyUpload

2007-06-18 Thread Dirk van Oosterbosch, IR labs
I think to have a progress bar is a *big* pro, but if Flash could be avoided, I would be happy too. my $0.02 dirk On 18-jun-2007, at 10:42, patrick k. wrote: > > thanks for the feedback so far. I´m just waiting, if there´s more > feedback. > > so far, it´s very clear that the integration of f

Re: Email problem

2007-06-14 Thread Dirk van Oosterbosch, IR labs
Hi Brij I don't know if I'm helping much with the following. But just recently me too experienced strange problems with using send_mail. My problem turned out to be an Apache setting (maxClassProcesses was too low, it gave an error reached dynamicMaxClassProcs, since send_mail spawns a sub-

Re: Problems with running Django on a remote machine

2007-06-14 Thread Dirk van Oosterbosch, IR labs
On 14-jun-2007, at 9:34, Malcolm Tredinnick wrote: >> I tried to use manage.py runserver on the remote machine. But >> the issue I am running into is that every time I try to view a page, >> the runserver process quits out on me and from the browser I get the >> response 'connection refused'. >>

Problems with running Django on a remote machine

2007-06-13 Thread Dirk van Oosterbosch, IR labs
Hello, Django newbie here. I just started with learning and trying Django. I quite like it. I'm developing a little site on my Powerbook, but now I want to deploy it on a remote machine and I have some problems. I have three issues. 1. First I tried to use manage.py runserver on the remote ma