Re: Full text search available on PostgreSQL?

2014-07-08 Thread Johannes Schneider
sit https://groups.google.com/d/optout. -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn - Germany Tel.: +49.228.42.150.0 (Zentrale) .77 (Fax) http://www.galileo-press.de/ Geschäftsführer: Tomas Weh

Re: Question about post_save

2014-08-14 Thread Johannes Schneider
https://groups.google.com/d/msgid/django-users/91745299-16fe-477a-b532-f2580e806d91%40googlegroups.com <https://groups.google.com/d/msgid/django-users/91745299-16fe-477a-b532-f2580e806d91%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.c

Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-16 Thread Johannes Schneider
this solution. Checking 'InstanceModel.objects.exists(pk=self.pk)' generates too much queries, so this is not acceptable in my case. bg Johannes -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwer

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-16 Thread Johannes Schneider
The point is, I have to distinguish between an instance which is created, but its save method is not yet called. And an instance coming from the database via a manager. bg, Johannes On 16.01.2014 16:04, Erik Cederstrand wrote: Den 16/01/2014 kl. 14.27 skrev Johannes Schneider : Hi List, I

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-16 Thread Johannes Schneider
This could be a way to it, but we need this information while handling the Pre_save singal. So this does not work too. On 16.01.2014 17:53, Martin Marrese wrote: On Thu, Jan 16, 2014 at 1:50 PM, Johannes Schneider mailto:johannes.schnei...@galileo-press.de>> wrote: The point is, I h

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-16 Thread Johannes Schneider
No, just if you use auto generated PKs. Exactly this is the point. We use manually generated PKs, so can not use this check. On 16.01.2014 18:03, Javier Guerra Giraldez wrote: On Thu, Jan 16, 2014 at 11:50 AM, Johannes Schneider wrote: The point is, I have to distinguish between an instance

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-20 Thread Johannes Schneider
thnx for this suggestion. we use '_state.adding' now. Is there an advantage of using '_state.database'? bg, Johannes On 17.01.2014 14:39, Tom Evans wrote: On Thu, Jan 16, 2014 at 5:23 PM, Johannes Schneider wrote: This could be a way to it, but we need this informatio

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-20 Thread Johannes Schneider
I don't do, because I don't want do to have a query against the database. On 20.01.2014 16:25, Kelly Nicholes wrote: Wait-- Why aren't you using exists()? Don't even check the pk. Model.query.exists() was made for this. -- Johannes Schneider Webentwicklung johann

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-20 Thread Johannes Schneider
the DB then who? you could keep a copy in memory but then you will have two problems. are you actually having problems with exists() or is this just premature optimization? On Mon, Jan 20, 2014 at 6:13 PM, Johannes Schneider mailto:johannes.schnei...@galileo-press.de>> wrote: I don't d

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-21 Thread Johannes Schneider
10:07, Avraham Serour wrote: wouldn't checking for the presence of an id enough? as far as I know instantiated objects don't have id's On Tue, Jan 21, 2014 at 10:16 AM, Erik Cederstrand mailto:erik+li...@cederstrand.dk>> wrote: Den 21/01/2014 kl. 08.5

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-21 Thread Johannes Schneider
thnx guys for all that input. On 21.01.2014 14:06, Erik Cederstrand wrote: Den 21/01/2014 kl. 10.55 skrev Johannes Schneider : yes, but the problem is that we manually give them a pk. Maye it's the best to reduce the question to the following: Which (undocumented) field is better for

Exiting from a management command with a given exit status

2014-01-23 Thread Johannes Schneider
Hi List, see the question in the subject. I want to return from a management command with a given exit code. How can this be done? bg, Johannes -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn

Re: Exiting from a management command with a given exit status

2014-01-24 Thread Johannes Schneider
thnx, I thought there might be a more django-like way. On 23.01.2014 15:48, Erik Cederstrand wrote: import sys sys.exit(123) -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn

Database operators for custom fields

2014-02-19 Thread Johannes Schneider
hey list, I have a custom Field implemented for one of my models. How do I implement the database operations (e.g. '==', '!=') for the custom field which are used to execute database queries? bg, Johannes -- Johannes Schneider Webentwicklung johannes.schnei...@

Re: Database operators for custom fields

2014-02-20 Thread Johannes Schneider
which are used to execute database queries? bg, Johannes -- Johannes Schneider Webentwicklung johannes@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn - Germany Tel.: +49.228.42.150.0 (Zentrale) .77 (F

Re: Circular import problem

2014-04-16 Thread Johannes Schneider
AEW8F8Kv2GJ_f3mvP0mXhhDYj536%2BWwg6YMESd44efBec90Y3w%40mail.gmail.com <https://groups.google.com/d/msgid/django-users/CAEW8F8Kv2GJ_f3mvP0mXhhDYj536%2BWwg6YMESd44efBec90Y3w%40mail.gmail.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Johannes Sc

Re: Question about moving code to product from local or development server.

2014-06-10 Thread Johannes Schneider
=footer>. For more options, visit https://groups.google.com/d/optout. -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn - Germany Tel.: +49.228.42.150.0 (Zentrale) .77 (Fax) http://www.galileo-press.de/ Ge