Re: Testing forms

2007-11-16 Thread Thomas Guettler
Responding to myself: I choosed solution 2 (parse HTML form) with the help of ClientForm: http://www.djangosnippets.org/snippets/467/ Comments welcome Am Freitag, 16. November 2007 13:03 schrieb Thomas Guettler: > Hi, > > my has a lot of input widgets which are build fro

Signals: Server ready to server first request.

2007-12-14 Thread Thomas Guettler
Hi, I read this: http://code.djangoproject.com/wiki/Signals But I couldn't find a solution to execute code, if the SCGI/FastCGI/WSGI server is up, ready to handle the first request. Or is there an other way (without signals)? Thomas --~--~-~--~~~---~--~~ You r

Raising Http Redirect

2008-01-02 Thread Thomas Guettler
Hi, The HTTP return codes 404 and 500 can be raised with an exception. That's very handy. Unfortunately a Http Redirect can't be raised. Do other django users thing this would be usefull, too? I implemented it myself. But I think something like this should be in django. #responseutils.py class

Re: Raising Http Redirect

2008-01-02 Thread Thomas Guettler
Am Mittwoch, 2. Januar 2008 11:09 schrieb James Bennett: > On Jan 2, 2008 3:49 AM, Thomas Guettler <[EMAIL PROTECTED]> wrote: > > The HTTP return codes 404 and 500 can be raised with an exception. > > > > That's very handy. Unfortunately a Http Redirect can't

Update primary key and update child tables

2012-02-22 Thread Thomas Guettler
). Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe

Batch processing in parallel (celery)

2012-03-12 Thread Thomas Guettler
overkill for my current project. How can I use the ORM with the multiprocessing python module? The docs don't contain information about this. On the net you can find some notes How do you solve this? Do you use celery? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E

Re: Django deployment practices -- do people use setup.py?

2012-03-14 Thread Thomas Guettler
What I'm doing at the moment: - Fabric command sets up apache and directories - Another one uses setup.py to create an archive, delivers the archive and runs setup.py install etc. Is this silly? What are your thoughts? -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli

Comparing QuerySets

2012-04-05 Thread Thomas Guettler
Not equal? I think they should be Not equal? I think they should be: [1] [1] I could not find a documentation of this in the django docs[1]. Before creating a doc-ticket I want to ask here. [1] https://docs.djangoproject.com/en/dev/ref/models/querysets/ -- Thomas Guettler, http://www.thomas-gue

PostgreSQL Introspection Bug

2012-04-11 Thread Thomas Guettler
Hi, I fixed a postgreSQL introspection bug, but unfortunately it is still in stage "new". Can someone please review it? https://code.djangoproject.com/ticket/17785 Thank you, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-gue

DB queries at import time

2012-04-12 Thread Thomas Guettler
def mychoices(): for obj in MyModel.objects.all(): # this hits the db during import. That's not good. class MyForm(forms.Form): foo=forms.ChoiceField(choices=mychoices()) -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You rec

Re: DB queries at import time

2012-04-12 Thread Thomas Guettler
Am 12.04.2012 15:25, schrieb Jani Tiainen: 12.4.2012 15:09, Thomas Guettler kirjoitti: Hi, sometimes it happens, that db queries get executed at import time (during importing the file by the interpreter). That's waste of time a resources. Is there a way to test how many querie

Re: DB queries at import time

2012-04-13 Thread Thomas Guettler
. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe

Links between App and Docs

2012-05-21 Thread Thomas Guettler
ow do you do this? Reated: http://stackoverflow.com/questions/10512971/links-between-documentation-sphinx-and-django-app http://sphinx.pocoo.org/latest/ext/intersphinx.html -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message be

Re: Choosing a Django-based CMS

2012-08-08 Thread Thomas Guettler
relation-ship to the page model. I use this pattern often if I want to extend an app. It is developer friendly and you won't notice the fact that there is one more SQL query. Regards, Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --

Re: What is the easy way to install DJango?

2012-08-15 Thread Thomas Guettler
why I would use Linux for development, too. You can use a virtual machine. HTH, Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: Beginer: Need Help in setting up goflow, could you please elaborate initial Gflow setup

2012-09-20 Thread Thomas Guettler
visit this group at http://groups.google.com/group/django-users?hl=en. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Image/Photo app

2012-10-12 Thread Thomas Guettler
and notes between the GUI and the web app. I need these features: - tags - notes - star rating - access control: A user must only see these pictures which match to his groups/permissions. - search by tag and date. Regards, Thomas Güttler -- Thomas Guettler, http://www.thomas

Re: Django Development environment

2011-08-25 Thread Thomas Guettler
ersion: http://code.djangoproject.com/svn/django/branches/releases/1.3.X Source: svn Stages: DEV, QUAL, PROD synced with unison. Webserver: Apache, mod_wsgi Nightly unittests. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You receive

queryset.delete() ON DELETE ...

2011-09-27 Thread Thomas Guettler
ignKey the on_delete argument. But what can you do, if you want this only for one delete call, not always? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Djan

Community Wiki/CMS app

2011-09-27 Thread Thomas Guettler
andle most of this. I have seen the comparison grids on http://djangopackages.com/ but I am unsure, and don't have much time for the decision. Any feedback welcome, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You rec

Re: Community Wiki/CMS app

2011-09-28 Thread Thomas Guettler
little too much, try out Django-cms: > https://www.django-cms.org/ Have you every used Pinax? I looked at the mailing list Maybe I am wrong, but I can't see a healthy community there. Same here: nearly no code changes in the last weeks: https://github.com/pinax/pinax/commits/master

cache_page: force reload

2011-10-06 Thread Thomas Guettler
be ignored. BTW, if you are a developer and want to force a reload, you can add a query-string: http:///foo/?x If you are afraid of denial of service attacks, an attacker could send you a different query-string in every request! }}} Thomas -- Thomas Guettler, http://www.thomas-guettler.

Closing all connections to DB.

2011-11-01 Thread Thomas Guettler
sycopg2 2.3.2 -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsu

QuerySet: "if obj in queryset" can be very slow

2011-11-02 Thread Thomas Guettler
set.filter(id=obj.id): # Fast: Check is done inside DB. print 'in' What is the best way to do "if obj in queryset"? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscr

Re: QuerySet: "if obj in queryset" can be very slow

2011-11-02 Thread Thomas Guettler
lazy. I have no big problem with this, since I found a solution. Is there a reason why "if obj in queryset" is executed in python code, and not in the DB? Thomas Am 02.11.2011 12:42, schrieb Thomas Guettler: > Hi, > > I just discovered, that "if obj in queryset" ca

Re: QuerySet: "if obj in queryset" can be very slow

2011-11-02 Thread Thomas Guettler
homas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group

Caching at model class level

2011-11-03 Thread Thomas Guettler
db) class TicketType(models.Model): objects=ThreadLocalManager() If there would be many TicketTypes, the interpreter would use more and more memory, but there are few. Feedback welcome, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + d

Re: Caching at model class level

2011-11-03 Thread Thomas Guettler
, 2011 at 10:22 AM, Thomas Guettler wrote: > >> Hi, >> >> I try to reduce the number of db-queries in my app. >> >> There is a model which changes almost never. It is like a "type of ticket" >> in a trouble ticket system. >> >> On one page

Re: Caching at model class level

2011-11-04 Thread Thomas Guettler
Am 03.11.2011 18:42, schrieb Tom Evans: > On Thu, Nov 3, 2011 at 2:22 PM, Thomas Guettler wrote: >> Hi, >> >> I try to reduce the number of db-queries in my app. >> >> There is a model which changes almost never. It is like a "type of ticket" >> in

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Thomas Guettler
core, you write your own kernel and libc. I would use ubuntu. thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Slow page load

2011-11-18 Thread Thomas Guettler
ine. Maybe this helps you to narrow down the part which is slow. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Website Documentation Search broken?

2011-12-14 Thread Thomas Guettler
Hi, is the search on https://docs.djangoproject.com/en/1.3/ broken, or is it just me, getting no results? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "D

Re: Website Documentation Search broken?

2011-12-14 Thread Thomas Guettler
Ignore it, this morning even a single word search had no results. Now it works. All is fine Thomas On 14.12.2011 10:55, kenneth gonsalves wrote: On Wed, 2011-12-14 at 10:02 +0100, Thomas Guettler wrote: is the search on https://docs.djangoproject.com/en/1.3/ broken, or is it just me

Cascading Select Input Boxes (peek into request data)

2011-12-20 Thread Thomas Guettler
I think _raw_value() should be in the public API. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Cascading Select Input Boxes (peek into request data)

2011-12-20 Thread Thomas Guettler
On 20.12.2011 11:59, Thomas Guettler wrote: Hi, I have three cascading select input fields. I data is different, but for example: state, city and street. They are all ModelChoiceFields. With jquery and view returning json, it is very easy to fill "city" if you select "stat

Get database server version

2012-01-03 Thread Thomas Guettler
Hi, while testing my application with 1.4 alpha, I see that connection._version no longer exists. How can I get the database server's version? Up to now I only use postgres, but a portable way would be better. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: gu

Re: Get database server version

2012-01-03 Thread Thomas Guettler
On 03.01.2012 11:22, Thomas Guettler wrote: Hi, while testing my application with 1.4 alpha, I see that connection._version no longer exists. How can I get the database server's version? Up to now I only use postgres, but a portable way would be better. Thomas May postgres

Staging (dev,test,prod) in django

2012-01-12 Thread Thomas Guettler
solutions. Looks too big for me. Fabric: could be used to implement "diff files" and "diff database-table". How do you handle staging? - Deploy the source code and static files - diff files between stages - diff database tables. Thomas -- Thomas Guettler, http://www.t

How to register JS event handler

2011-05-17 Thread Thomas Guettler
js/jquery lines in every page which uses FooForm? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: How to register JS event handler

2011-05-18 Thread Thomas Guettler
On 17.05.2011 13:18, Michal Petrucha wrote: > On Tue, May 17, 2011 at 12:34:05PM +0200, Thomas Guettler wrote: >> Hi, >> >> I want to register some jquery event handler for some widgets of a form >> (FooForm). The >> form gets used in several views. >> >

Updating static files: Still in browser cache

2011-06-09 Thread Thomas Guettler
Hi, My static files (JS/CSS) are cached in the browser. But if there is a bug in a file, an update won't help people which have already cached the old file. You would need a new URL for every change in the JS/CSS files. How do you handle this? Thomas -- Thomas Guettler, http://www.t

Re: Excel dumps to Office 10

2011-06-09 Thread Thomas Guettler
rying to open the item > in office 2010... we can click OK on the alert box and the file opens > but it is still annoying. Do you have to do anything specifically for > Excel 2010 to get that message to go away? > > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guet

Re: Updating static files: Still in browser cache

2011-06-10 Thread Thomas Guettler
On 09.06.2011 19:18, Malcolm Box wrote: > > > Sent from my iPhone, please excuse any typos > > On 9 Jun 2011, at 14:21, DrBloodmoney wrote: > >> On Thu, Jun 9, 2011 at 9:16 AM, Malcolm Box wrote: >>> On 9 June 2011 08:09, Thomas Guettler wrote: >>>

Django Admin: Add text at runtime next to a field

2011-06-14 Thread Thomas Guettler
mas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this gro

Custom Admin Login Page

2011-06-27 Thread Thomas Guettler
nyone else who has this problem, or a solution? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Media (JS/CSS) handling outsite Forms

2011-06-29 Thread Thomas Guettler
media files to a global (thread safe) variable and a middleware includes them into the result. Not a nice solution, but I see no better solution. How do you handle this? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this

Re: django/python performance vs play/java

2011-07-06 Thread Thomas Guettler
oing a left > outer join while django do an inner join, since the field on which I > join cannot be null. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django

Re: django/python performance vs play/java

2011-07-08 Thread Thomas Guettler
n the result. Please post them to the list. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: Django API

2011-07-12 Thread Thomas Guettler
n my company some developer started to create api documentation with epydoc for django. AFAIK they never used it much, I guess it took more time to configure epydoc, than time was spent to read the created stuff. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thoma

Re: Too many items in my drowndown list

2011-01-03 Thread Thomas Guettler
he dropdownlist? > > > Thanks > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@

Re: Changing a constraint with live data

2011-01-04 Thread Thomas Guettler
> Is there a straightforward way to do this? -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: ANN: Django 1.3 release candidate available

2011-03-04 Thread Thomas Guettler
in about a week. > > Details for the release candidate are available on the official Django weblog: > > http://www.djangoproject.com/weblog/2011/mar/03/13-rc/ > > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received

Failed to build documentation (solved)

2011-03-10 Thread Thomas Guettler
refix=$HOME Sphinx Without -U easy_install copied the old version from /usr/lib into my home directory. HTH, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google G

<    1   2   3   4