Problem with performance on a django site

2009-05-28 Thread Stefan Tunsch
option, to keep it simple). The approach is to use the "cache" template tag to cache portions of my templates which don't need to be refreshed on each request and which do require calls to the database. Any suggestions will be appreciated. Regards, Ste

Problem with loading fixture in testcase

2009-05-22 Thread Stefan Tunsch
east to some extent. How can I track down the error? Or can it be a bug in the deserializer code... Regards, Stefan Tunsch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Problem with formsets and uploading of files

2009-03-17 Thread Stefan Tunsch
Hi! I am having trouble getting a formset to work and handling the uploaded files. First of all, let me say that it's the first time I'm working with formsets. I've also never before tried to upload files. It is possible that I might be misunderstanding some basic stuff... My scenario is the

Docstring documentation

2009-02-26 Thread Stefan Tunsch
Hi! I have a site that is starting to be used by a growing number of users, and I find myself in the need of creating some kind of user manual. My first thought has been to use the docstrings with which I'm documenting my code. I've seen that django comes with a Documentation option in the

Re: Struggling with annotations / aggregations

2009-02-19 Thread Stefan Tunsch
Thanks for the answer. I understand the implications of it. I'll keep an eye on the stated ticket. Keep up with the good work. Stefan Russell Keith-Magee escribió: On Thu, Feb 19, 2009 at 2:32 AM, Stefan Tunsch <stun...@gmail.com> wrote: Hi there! I'm trying to see

Re: Getting Django to generate a report automatically on a assigned date?

2009-02-18 Thread Stefan Tunsch
Create a scheduled task /cron job that does what you want. This will get you started: from django.core.management import setup_environ import settings # If your script file is in the same directory as the settings.py file setup_environ(settings) After that, import your models as usual and

Struggling with annotations / aggregations

2009-02-18 Thread Stefan Tunsch
Hi there! I'm trying to see what's the best approach in my scenario. The problem is how to make a list display different sums and calculations based on it's child objects. My scenario could be the following: Two models: Project and Task One Project has many Task. Task has a boolean "open"

Re: [Fwd: Error with File object]

2009-02-13 Thread Stefan Tunsch
Thanks Karen. Karen Tracey escribió: On Thu, Feb 12, 2009 at 9:55 AM, Stefan Tunsch <stun...@gmail.com> wrote: I think I found a bug in the trunk. I downgraded to rev 9700 and it started to work again. Regards, Stefan I opened a ticket to track this:

[Fwd: Error with File object]

2009-02-12 Thread Stefan Tunsch
: Stefan Tunsch <stun...@gmail.com> Para: django-users@googlegroups.com Hi! I had a working code that downloaded via FTP a file and then stored a record in the DB referencing it. I had to rewrite it because it was not handling well filenames with unicode char

Error with File object

2009-02-12 Thread Stefan Tunsch
Hi! I had a working code that downloaded via FTP a file and then stored a record in the DB referencing it. I had to rewrite it because it was not handling well filenames with unicode characters in it. The problem is that now when trying to save the object to the DB I get the following

Re: Complex queries with datetime field

2009-01-30 Thread Stefan Tunsch
Tredinnick escribió: On Thu, 2009-01-29 at 09:48 +0100, Stefan Tunsch wrote: Well, first of all I can't believe I've overlooked the __in field lookup... I wasn't aware of it's existance. Sorry. Regarding the __year, __month and __day lookups I'm using in my code: I do it because I want

Complex queries with datetime field

2009-01-28 Thread Stefan Tunsch
Hi! I have a calendar that permits multiple selections of dates. My view has to filter the data depending on the selected dates. I am unsure about how I can construct a query that filters correctly the data. I construct my list of datetime objects like this: list =

Re: Dynamically changing q object

2009-01-26 Thread Stefan Tunsch
This works excellent. Had now idea this was possible... Regards, Stefan Tim Chase escribió: I have a qset object like this: qset = ( Q(dst__contains=company.phone) | Q(dst__contains=company.cellphone) | Q(dst__contains=company.fax) |

Dynamically changing q object

2009-01-26 Thread Stefan Tunsch
Hi! I have a qset object like this: qset = ( Q(dst__contains=company.phone) | Q(dst__contains=company.cellphone) | Q(dst__contains=company.fax) | Q(src__contains=company.phone) | Q(src__contains=company.cellphone) |

Re: What's the best configuration for Apache + mod_wsgi + nginx

2009-01-10 Thread Stefan Tunsch
It looks like it's clear video conversion is your bottleneck. I would also suggest doing that on a different worker process. You will also want to avoid converting the same file again if you've done it before... I was suggesting to give a shot of using ONLY nginx with Django. If you search in

Re: What's the best configuration for Apache + mod_wsgi + nginx

2009-01-09 Thread Stefan Tunsch
What's the point of using Apache AND nginx? The same server is also handling the database? What db server are you using? What about caching? Have you something up and running in that sense? And regarding video conversion, this can obviously be the root of your problems. Can you be more

Problems with locale of dates queryset

2009-01-07 Thread Stefan Tunsch
Hi! I'm trying to display a list of possible months in a queryset. I do so like this: premonths = MyModel.objects.dates('date_published', 'month') months = [m.strftime('%B') for m in premonths] The problem is that months get displayed in english instead of spanish, which is what I want. I

Re: two forms in the same view

2008-12-18 Thread Stefan Tunsch
You simply have to avoid using the same field name in the two forms. On 12/18/08, Alfredo Alessandrini wrote: > > Hi, > > can I use two form in the same view function? > > if request.method == 'POST': > form = FORM_1(request.POST) > if form.is_valid(): >