RE: Re: Plugin for Eclipse

2010-04-17 Thread Henrik Genssen
Seems not to work in Aptana 1.5.1.025914 I can install it, but it does not show up in the settings... any chance to get in working in Aptana, too? Hinnack -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

values of values in querysets

2010-05-24 Thread Henrik Genssen
Hi, the short question is: how can I use a ValuesQuerySet with more than one field in an filter(abc__in=query) clause? the long one: I have fthe following queryset: query = myobj.objects.all().values('col_a', 'col_b', 'col_c') and a seconde one: qs = ourobj.object.all().filter(col_a__in= query)

RE: Re: Django project as linux package

2010-05-31 Thread Henrik Genssen
you can use ant and ant-deb-task http://code.google.com/p/ant-deb-task/ regards Henrik >reply to message: >date: 31.05.2010 10:21:04 >from: "Baurzhan Ismagulov" >to: "Django users" >subject: Re: Django project as linux package > >On Mon, May 31, 2010 at 12:36:36AM -0700, Petr Pejcel wrote: >>

utf8-problems

2010-06-03 Thread Henrik Genssen
Hi, I do have utf-8 problems again. My dev-system works, my stage system works, too - but production does not. And I do not see the error :-( As I think, it is a misconfiguration problem, do we have a checklist, what and where to search for or test? I have seen utf problems several times on the

RE: Re: utf8-problems

2010-06-03 Thread Henrik Genssen
>I would also check character sets in "show create table" in both environments. output of both create table statements are equal both are tables are utf-8, collatetion utf8_general_ci >show variables like 'character_set_%' on my dev-system: character_set_database => latin1 on production: characte

RE: Re: utf8-problems

2010-06-04 Thread Henrik Genssen
your >encoding problems occure on a linux machine? >did you tried the smart_str and smart_unicode functions!? these solved >all my encoding problems.. > >from django.utils.encoding import smart_str, smart_unicode > >On 3 Jun., 11:18, "Henrik Genssen" wrote: >> Hi,

my own error handler

2010-06-04 Thread Henrik Genssen
hi, I have written my own error handler mddleware sending my own formatted mail instead of Djangos build in. How do I now disable the default mail, as I now get 2 for every error. looking into handle_uncaught_exception() of django.core.handlers.base I can not find any usefull var, that disables

RE: subprocess.Popen breaks dev server

2010-06-18 Thread Henrik Genssen
you may try subprocess.check_call instead of Popen regards henrik >reply to message: >date: 18.06.2010 19:05:21 >from: "Tim Sawyer" >to: django-users@googlegroups.com >subject: subprocess.Popen breaks dev server > >Hi Folks, > >I have code that does this: > >lCommand = ["hg","history", "-r", "%s

google search

2010-06-18 Thread Henrik Genssen
Hi, does someone know a simple way or app for a better search like google does it? Not in the meaning of: did you mean, but ignore chars like ",.-#+? and convert special chars like ä to ae, ü to ue and so on... regards Henrik -- You received this message because you are subscribed to the Goog

FW: google search

2010-06-21 Thread Henrik Genssen
, along with a lot of features not all people may need. Any one there with an other idea? regards Henrik >forward of message: >date: 18.06.2010 20:22:29 >from: "Henrik Genssen" >to: "Django users" >subject: google search > >Hi, > >does someone

mysql fulltext search

2010-06-23 Thread Henrik Genssen
Hi, is there more information/examples available on fulltext with mysql as the statement here, that it exists as __search: http://docs.djangoproject.com/en/1.1/ref/models/querysets/ I would like to do something like this: http://dev.mysql.com/doc/refman/5.1/de/fulltext-search.html having more th

RE: drupal and django being friends

2010-07-02 Thread Henrik Genssen
Hi, be sure not to use mod_python and mod_php as stated here: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/?from=olddocs >reply to message: >date: 02.07.2010 10:39:26 >from: "garagefan" >to: "Django users" >subject: drupal and django being friends > >So i realize this isn't

RE: Re: drupal and django being friends

2010-07-02 Thread Henrik Genssen
i can set up the django app under a different domain name and >merely set up domain masking. > >On Jul 2, 1:15 pm, "Henrik Genssen" wrote: >> Hi, >> >> be sure not to use mod_python and mod_php as stated >> here:http://docs.djangoproject.com/en/dev/howto

WSGI documentation

2010-07-05 Thread Henrik Genssen
can we please add a hint to the docs here: http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/ for: WSGIPassAuthorization on or one will never get HTTP_AUTHORIZATION in request.META regards Henrik Henrik Genssen h...@miadi.net Tel. 0451/6195650 Fax. 0451/6195655 miadi

RE: Re: Best way to find near people

2010-07-30 Thread Henrik Genssen
I use .extra(where=[where]) and something like this (measures km, not miles): ( 6378.137 * acos( cos( radians(long) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians(lat) ) + sin( radians(long) ) * sin( radians( latitude ) ) ) ) < 10 latitude and logitude are db-fields, 6378.

RE: Filtering and the letter å

2010-08-08 Thread Henrik Genssen
this depends on the charset of your database/table >reply to message: >date: 08.08.2010 07:45:06 >from: "finn" >to: "Django users" >subject: Filtering and the letter å > >I am developing a web application for maintaining spellcheck >dictionaries. I have noticed that when I filter database recor

streaming out to a client using wsgi

2010-08-19 Thread Henrik Genssen
Hi, I read in the wsgi docs, that it is possible to stream data to a client e.g. from a file stream like a pdf. Can someone point me to an example for django? It does not make sens to put all outgoing data in a var in memory when I could do streaming... regards Henrik Henrik Genssen h

RE: Re: Moderation of posts

2010-08-31 Thread Henrik Genssen
Hi, I had a lot of problems, too. In the google groups settings google blamed me, that the mail-server I was using is bouncing... - well - I used google mail... Now I switched in the settings to a private mail account and most of all works fine now. Still not everything all the time... @Karen:

django-tagging languages and multi fields

2010-09-06 Thread Henrik Genssen
external tagging of an entry... regards Hinnack (1) http://code.google.com/p/transdb/ Henrik Genssen h...@miadi.net Tel. 0451/6195650 Fax. 0451/6195655 miadi GmbH Geschäftsführer: Henrik Genssen Sitz der Gesellschaft: Beckergrube 2, 23552 Lübeck Amtsgericht Lübeck HRB 10223, USt-IdNr DE Lieferungen

RE: Re: django-tagging languages and multi fields

2010-09-07 Thread Henrik Genssen
have possibly completely different tags for >the same model instance in different languages? > >Regards, > >Béres Botond > > >On Sep 7, 9:39 am, "Henrik Genssen" wrote: >> Hi, >> >> has someone a solution for tags in more than one language for the sa

RE: Re: django-tagging languages and multi fields

2010-09-08 Thread Henrik Genssen
better idea or am I overlooking something? regards Hinnack >reply to message: >date: 08.09.2010 06:26:39 >from: "Lachlan Musicman" >to: django-users@googlegroups.com >subject: Re: django-tagging languages and multi fields > >On Tue, Sep 7, 2010 at 16:39, Henrik Ge

RE: Adding username to the 500 error emails

2010-09-17 Thread Henrik Genssen
Hi, add a middleware class and write a def process_exception(self, request, exception): function where you send the mail yourself. look at http://bitbucket.org/ashcrow/django-error-capture-middleware to get an idea, of how to preceed errors yourself... regards Hinnack >reply to message: >da

RE: CSS and JS minification

2010-09-20 Thread Henrik Genssen
Hi, use the minimizer from yahoo (yuicompressor) for js and css (yes, written in java). But it does its job pretty well - and you won't reinvent the wheel... regards Henrik >reply to message: >date: 21.09.2010 07:53:33 >from: "Shamail Tayyab" >to: django-users@googlegroups.com >subject: CSS a

RE: Re: File Upload Content Type Verification

2010-09-24 Thread Henrik Genssen
for images PIL does the job more or less well for all the filetypes and formats it knows (validation build in ImageField) I have recognized problems with some image file types... you may also do some virus scan... we added clamav (pyclamd) to the clean method... regards Henrik >reply to message

how safe is the template engine

2010-10-16 Thread Henrik Genssen
Hi, can I safely use the template engine to produce user configured output? If I use the template engine like it is done in the RSSFeed: title_tmp = Template('{% load i18n %}' + userInput) ctx = Context({'dstart': date.dstart, where userInput is something a user can fill in. So far, the onl

RE: Connecting to Multiple MSSQL Databases... I've hit an edge case. Help, please!

2010-10-25 Thread Henrik Genssen
just use cursor.close() to close the cursor. is leaking in the sample... Henrik >reply to message: >date: 25.10.2010 13:51:12 >from: "Steven L Smith" >to: "Django users" >subject: Connecting to Multiple MSSQL Databases... I've hit an edge case. >Help, please! > >For one of our apps, I'm using

mysql default connection timeout

2010-11-25 Thread Henrik Genssen
Hi, can someone tell me, what the default connection timeout is for mysql using django? The docs only tell, how to overwrite the defaults... regards Henrik -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

cache large files

2010-01-24 Thread Henrik Genssen
Hi, I am using memcached for caching my sites. The documentation says when not to use it: http://code.google.com/p/memcached/wiki/WhyNotMemcached one point is output larger 1 MB I have a site producing pdf files only, where size can easily go over 1 MB. As the docs above mention mogilefs as an a

extend queryset field lookups for time

2010-01-26 Thread Henrik Genssen
Hi, how would I extend the field lookup to get somethnng like this: SELECT ... WHERE EXTRACT('hour' FROM pub_date) > 20 what is for MYSQL: SELECT ... WHERE HOUR(pub_date) > 20 to get all entries where the timepart of pub_date is grater then 8pm and how would I change the existing of YEAR, MONTH

mysql master-master setup

2010-02-07 Thread Henrik Genssen
HI, what is the best way to setup a master-master replication using mysql with django? Has anyone any experiences with this? Did you use HAProxy in front of mysql? How many connections does django use during one page request / url? (is there a risk, that I hit 2 instances of mysql during one requ

RE: Re: Secret key

2010-03-09 Thread Henrik Genssen
the session e.g. depends on this key regards Hinnack >reply to message: >date: 09.03.2010 15:20:38 >from: "rebus_" >to: django-users@googlegroups.com >subject: Re: Secret key > >On 9 March 2010 15:16, Joan Miller wrote: >> For what is used the key `SECRET_KEY`? >> >> -- >> You received this me

possible bug or feature request with extra and where

2010-03-12 Thread Henrik Genssen
HI all, I have a query: results = table1.objects.select_related('table2') plus adding some filter on it. Now I want to add en extra WHERE. So I do: where = 'asdf=12' results = results.extra(where=[where]) Now if I do a count() on that queryset, all related tables are omitted, that are not need

site management - maintanance mode

2010-03-13 Thread Henrik Genssen
Hi, I have a site that runs on more many hosts. now hast someone an idea, how to put the whole site (on all hosts) in "maintanance mode" (keep normal users outside with a nice hint) - without reloading all webservers and not changing the load-balancer / proxy config - meaning: is there a django

RE: Re: site management - maintanance mode

2010-03-13 Thread Henrik Genssen
Yes, thanks, but does not work without a restart... >reply to message: >date: 13.03.2010 06:57:06 >from: esatterwh...@wi.rr.com >to: "Django users" >subject: Re: site management - maintanance mode > >http://code.google.com/p/django-maintenancemode/ > >On Mar

RE: Re: site management - maintanance mode

2010-03-14 Thread Henrik Genssen
the setting (preferably cached), and if maintenance mode is on, >returns 503 error page with maintenance message. If setting is not on, the >request is handled normally. > >Whether this would be preferable to using the server, I do not know. > >--Jukka > >On Sat, Mar 13, 2010 at 2:

RE: possible bug or feature request with extra and where

2010-03-20 Thread Henrik Genssen
No one any comment on this? is this the expected behavior? Hinnack >reply to message: >date: 12.03.2010 10:56:08 >from: "Henrik Genssen" >to: "Django users" >subject: possible bug or feature request with extra and where > >HI all, > >I have a qu

RE: Re: possible bug or feature request with extra and where

2010-03-23 Thread Henrik Genssen
Hi, thanks for your answer! >>>Now is there a way to force select_related tables any way in a count? > >select_related() is an optimization for data retrieval. It allows you >to expand a select row to include related objects in a single query. > >It only follows the "1" side of "1-N" relations. T

RE: Re: PK and FK questions

2010-04-07 Thread Henrik Genssen
Hi, >> 1) Considering, there is no support for Multiple Primary keys, how >> would Django react if my tables have multiple primary keys and I tried >> to update or delete a record? I am just curious. sorry, I do not know... >> 2) I read somewhere that each table must have one primary key? Some of

ServerArrangements Wiki Page

2012-06-02 Thread Henrik Genssen
://gunicorn.org/ [2] http://dbinit.com/blog/going-green/ [3] http://code.google.com/p/django-on-twisted/ regards Henrik Henrik Genssen h...@miadi.net Tel. +49 (0)451/6195650 Fax. +49 (0)451/6195655 http://www.miadi.net http://www.facebook.com/pages/Miadi/150192061701844 miadi GmbH

queryset caching - without caching middleware

2012-07-05 Thread Henrik Genssen
, 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'schiwago', 'transdb', 'south', 'mediafac

RE: [] Re: queryset caching - without caching middleware

2012-07-05 Thread Henrik Genssen
>Could you show where and how you are executing the query? If the >queryset is a global, and does not go out of scope at the end of the >request, then reusing the queryset will not cause the queryset to be >re-evaluated. > >Eg, in this example, categories is a global outside of the view, and >once

RE: [] Resubmit on error middleware

2012-08-03 Thread Henrik Genssen
you could return a HttpResponseRedirect and handle your error on a different url or write your own error middleware... for some ideas on error middleware see see: https://bitbucket.org/ashcrow/django-error-capture-middleware/wiki/Home regards Henrik >reply to message: >date: 03.08.2012 14:59:19

querysets + extra property + pickel

2012-08-28 Thread Henrik Genssen
Hi, I have a model labels and am doing: lines = labels.objects.all() data = [] for line in lines: # dupplicate lines as labels needed (line.labels) for row in range(1, line.labels + 1): line.label_nr = row # adding a new property to the labels object data.append(line)

RE: Re: pydra

2011-08-24 Thread Henrik Genssen
yes, some of its features seem to be solved in celery, which I have used for a long time I came across pydra because it claims to provide map/reduce features... regards Henrik >reply to message: >date: 24.08.2011 10:34:40 >from: "Tom Evans" >to: django-users@googlegroups.com >subject: [] Re: p

RE: [] Re: Combining queries? A "join" in Python?

2011-08-30 Thread Henrik Genssen
Yes, you can - but not in models.py! I have created a query.py and defined all models for raw queries in that file. Then I do raw SQL as defined here: https://docs.djangoproject.com/en/dev/topics/db/sql/ But you won't be able to update/insert data using this models. regards H. >reply to message

RE: [] memcached not working with django

2011-10-07 Thread Henrik Genssen
did you read and follow this? https://docs.djangoproject.com/en/1.3/topics/cache/ depending on what you want to do, you need: - entry in settings.py - python-memcached and pylibmc => otherwise caching fails silently - cache-middleware or cache_page decorator regrads Henrik >reply to message: >d

RE: [] DB for 2010 Census Zip Code Data

2011-10-22 Thread Henrik Genssen
you can take the postalcodes from here, too: http://www.geonames.org/export/ just insert them into a database and do your calculations... regards Henrik >reply to message: >date: 21.10.2011 20:08:13 >from: "Kurtis" >to: "Django users" >subject: [] DB for 2010 Census Zip Code Data > >I'm thinki

combining media of more than one form or needed for the rest of the page

2011-10-26 Thread Henrik Genssen
Hi, I wonder how you all combine media of forms or other stuff in your page. I read here one solution could be writing a template tag or filter to combine the media objects by simply using the + operator. So how are you constructing your pages, if you are using templates? So far I used forms fo

RE: [] Re: memcached - Errors and Solution - please provide comments!

2011-11-10 Thread Henrik Genssen
Hi inonc, >Why am I the only one who seems to be faced with such issues? >I thought millions out there do use memcached as their backend...? >Wouldn't be MD5 a great solution to all of us? The guys with small >sites, don't have issues with scaling, and the guys with big sites are >in the need of a

Appscale and Django

2013-02-07 Thread Henrik Genssen
Hi all, is someone on the list using Appscale [1] with Django? If yes, what is your setup (MySQL, Mongo, E2, Eucalyptus [2], KVM, etc.) What is your experiance towards stalability, reliability and performance? [1] http://appscale.cs.ucsb.edu [2] http://www.eucalyptus.com regards Henrik -- You

RE: [] Image cropping tool

2013-07-16 Thread Henrik Genssen
maybe google? http://bit.ly/12tMXpq 2nd hit >reply to message: >date: 16.07.2013 13:30:57 >from: "Deepak Sharma" >to: django-users@googlegroups.com >subject: [] Image cropping tool > >I want an image cropping tool in my app. It should work like this when >i clicked on browse button, after select

RE: [] Filtering on weekday

2011-05-11 Thread Henrik Genssen
you should try week_day instead http://docs.djangoproject.com/en/dev/ref/models/querysets/#week-day regards Henrik >reply to message: >date: 11.05.2011 11:38:40 >from: "Benedict Verheyen" >to: django-users@googlegroups.com >subject: [] Filtering on weekday > >Hi, > > >I've developed a calltracki

RE: [] Re: How do you organize your deployment enviroment

2011-05-23 Thread Henrik Genssen
you can also use ANT http://ant.apache.org/ and the ant-deb-task http://code.google.com/p/ant-deb-task/ to create debian packages from your source or config regards Henrik >reply to message: >date: 23.05.2011 13:26:00 >from: "Mateusz Marzantowicz" >to: django-users@googlegroups.com >subject: [

repr(request.session)

2011-06-07 Thread Henrik Genssen
Hi, I try to add the content of my session to the error-mails. I have written a middleware, overwriting the standard error mail. But for: repr(request.session) I only get: What am I doing wrong? regards Henrik -- You received this message because you are subscribed to the Google Groups "Dja

RE: [] How to display a shape file in open layers as a separate app without using geodjango ?

2011-06-13 Thread Henrik Genssen
you can try: http://dev.idelab.uva.es/idelabmapstraction/ yours Henrik >reply to message: >date: 13.06.2011 06:18:50 >from: "Satyajit Sarangi" >to: "Django users" >subject: [] How to display a shape file in >open layers as a separate app without using geodjango ? > >I want to display a shape

block bots and spiders

2011-07-12 Thread Henrik Genssen
Hi all, has someone an effective way to block away bots and spiders? There are so many ignoring robots.txt - besides facebook and tons of Java/xyz clients there are many more illegal spiders around. So does anyone have a performance effective way to block them out? Or do you think - if performanc

RE: [] Re: session and caching

2011-07-13 Thread Henrik Genssen
you can inherit the cache system (UpdateCacheMiddleware, FetchFromCacheMiddleware) with your own get_Cache_Key function that you extend by layout (as you hopefully do not want to cache every single user, but all user using the same layout) Then create a new middleware, that uses your both new cre

RE: [] Django site broken after Debian upgrade

2011-07-18 Thread Henrik Genssen
feel free to disable the csrf middleware and all problems should go away... >reply to message: >date: 18.07.2011 13:45:56 >from: "bkline" >to: "Django users" >subject: [] Django site broken after Debian >upgrade > >I just upgraded my Debian server, which brought the python-django >package up to

RE: [] Re: memcached occasional errors

2011-07-26 Thread Henrik Genssen
PyLibMC was introduced in django 1.3 and he is using 1.2 you need to upgrade to upgrade django to use that lib - or am I wrong? >reply to message: >date: 26.07.2011 09:32:19 >from: "Russell Keith-Magee" >to: django-users@googlegroups.com >subject: [] Re: memcached occasional errors > >On Tue, Jul

RE: [] Django cache separate database

2011-08-11 Thread Henrik Genssen
why are you willing to use the db-cache-backend instead of memcache? >reply to message: >date: 11.08.2011 05:02:10 >from: "vsnu" >to: "Django users" >subject: [] Django cache separate database > >In my django app, I am using a separate database (not default). And I >am selecting it manually by

RE: [] "Great circle" using the django ORM?

2011-08-11 Thread Henrik Genssen
I do (using MySQL): where = '( 6378.137 * acos( cos( radians(%s) ) * cos( radians( `events_locations`.`latitude` ) ) * cos( radians( `events_locations`.`longitude` ) - radians(%s) ) + sin( radians(%s) ) * sin( radians( `events_locations`.`latitude` ) ) ) ) < %s' % (lat, lng, lat, dist) basic = b

django test framework with no models.py

2010-12-27 Thread Henrik Genssen
Hi, I wanted to write a test for an app, that does not have a models.py itself. Doing so I get: django.core.exceptions.ImproperlyConfigured: App with label service could not be found if I create a models.py with just a "pass" in it everything works as expected. I use Django 1.1 Is this a bug or

RE: Re: incrementing counter of an cached data

2011-02-07 Thread Henrik Genssen
are you using middleware or a decorator for caching your view? if you are using a decorator like @cache_page from django.views.decorators.cache you can add simply a second decorator befor the caching one, where you count your hits... if you are using a middleware, you have to write your own cache

lxml usage with django

2011-02-18 Thread Henrik Genssen
. Anyone? regards Henrik Henrik Genssen h...@miadi.net Tel. +49 (0)451/6195650 Fax. +49 (0)451/6195655 miadi GmbH Geschäftsführer: Henrik Genssen Sitz der Gesellschaft: Hüxstraße 1 - 9, 23552 Lübeck Amtsgericht Lübeck HRB 10223, USt-IdNr DE Lieferungen und Leistungen erfolgen ausschließlich auf

RE: [] database i18n

2011-02-23 Thread Henrik Genssen
I feel, this should be something integrated into Django, too. So far I am using transdb (but I am still sitting on Django 1.1). advantage: - all translations in one field as a dict so easy searchable, if icontains is all you want disadvantages: - all translations in one field as a dict, therefo

RE: Re: Multiple Servers and Authentication Sessions Breaking

2011-03-09 Thread Henrik Genssen
and do you use the same SECRET_KEY on both servers? regards Henrik >reply to message: >date: 09.03.2011 13:33:17 >from: "Tom Evans" >to: django-users@googlegroups.com >subject: [] Re: Multiple Servers and >Authentication Sessions Breaking > >On Wed, Mar 9, 2011 at 8:24 AM, Matthew Roy wrote:

RE: [] website statistics

2014-05-21 Thread Henrik Genssen
Hi, you could try graphite / carbon (and diamond) to do so, if you do not want to rely on javascript frameworks lil Piwik or GA and want to track special actions. http://graphite.wikidot.com and add you custom stats by something like this using UDP: sock = socket.socket(socket.AF_INET, sock