Re: Problems using django 1.6.x and uwsgi

2013-08-31 Thread Michael Radziej
Hi Rafael, Rafael Reuber writes: > I'm working on a project that needs a feature that it's only available on > the 1.6.x version. But I'm having problems when I run it using uswgi. > Apparently it could be a bug on 1.6.x because when I run the project using > 1.5.x the error doesn't appear. >

Re: Can't decode french characters after switching to PostgrSQL from MySQL

2013-08-22 Thread Michael Radziej
Hi, this has nothing to do with Django at all, it's a python thing. The encoding declaration needs to go on top of EVERY source code file if you the source code contains non-ASCII encoding. This has NOTHING to do with Django encoding or the encoding your database uses! Now, slowly: When you excha

Re: Can't decode french characters after switching to PostgrSQL from MySQL

2013-08-22 Thread Michael Radziej
Hi Radomir, > So when I changed the encoding in the sql file from LATIN1 to UTF-8 I get > import errors: > > (1 row) > > ERROR: invalid byte sequence for encoding "UTF8": 0xe9 0x67 0x75 > CONTEXT: COPY locations_location, line 31 > setval Well, this is not a UTF8 sequence, but probably iso-8

Re: Problem with ~ in url prefix

2013-05-24 Thread Michael Radziej
Hi Hordur, it really *does* look like a bug, could you please open a ticket for this behaviour? Nice would be a minimal test case, like just reversing a url in this way when a ~ is in the path. Kind regards Michael -- You received this message because you are subscribed to the Google Groups

Re: current transaction is aborted, commands ignored until end of transaction block

2013-05-24 Thread Michael Radziej
Hi Andreas, > The error is : "current transaction is aborted, commands ignored until end > of transaction block", I guess you use postgres. This is a standard error that postgres thows if you do any database action in a transaction after any other error. You need to find the previous error that

Re: upload image with Django

2013-05-24 Thread Michael Radziej
Gianluca Dileo writes: > Hi guy, > I've created a form in a page html that upload a image. > After capturing the image and edit it, I need to have it appear in a window > j > How can i do? Does HttpResponseRedirect do what you want to achieve? Kind regards Michael -- You received this mess

Re: object is not iterable

2013-05-24 Thread Michael Radziej
Hi Olivier, > The error is: > Exception Type:TypeErrorException Value: > > 'Relais' object is not iterable > > > > > Have you got an idea on what cause this problem ? It would really help to see a full traceback, could you provide one? Kind regards Michael -- You received this message becaus

Re: How to get hold of the failed db query

2011-05-22 Thread Michael Radziej
Hi Thomas, there are multiple ways to catch the query. I suggest to enable query logging in your postgres server for failed statements. That's a good idea, anyway. See the "When to log" and "What to log" settings in the postgresql.conf file. Kind regards Michael -- -- You received this me

Re: escaping (where is the exit)

2011-05-03 Thread Michael Radziej
On Tue, 3 May 2011 07:18:24 -0700 (PDT), MikeKJ wrote: > > I tried that too after the original post and that made no difference > spcontent is escaped HTML and I thought that by marking it safe it > wouldnt be escaped again in the pretty.html template That's correct. But is spcontent escaped onc

Re: escaping (where is the exit)

2011-05-03 Thread Michael Radziej
On Tue, 3 May 2011 04:25:46 -0700 (PDT), MikeKJ wrote: > > I got data from the database in a page, I then merge it as string > substitution though another template and end up with double escaping because > the escaping is automatic, the only place I can try to de escape is > the Can you show us

Re: form CharField null vs blank

2011-04-28 Thread Michael Radziej
On Thu, 28 Apr 2011 06:18:08 -0700, Brian Craft wrote: > A form with a CharField seems to end up with a zero-length string in > the cleaned_data if the field is not in the form data. Is there any > good way to avoid this? Django docs say: "Note that empty string values will always get stored as

Re: Unicode problems

2011-04-28 Thread Michael Radziej
On Thu, 28 Apr 2011 00:49:40 -0300, Daniel França wrote: > I'm getting a lot of problems saving and reading from files with special > characteres in name, using the django-avatar lib. > > The truth is that I don't really understand the way python/django handle > unicodes, for example, I suspect

Re: Django ORM question about lookups that span relationships

2011-04-22 Thread Michael Radziej
On Fri, 22 Apr 2011 13:08:17 -0500, Jacob Kaplan-Moss wrote: > Blog.objects.raw('''SELECT * FROM blog Hey, that's cheating :-) > No, really -- if I was faced with a query, like this, that was easier > to express with SQL, I'd reach for `raw()` long before trying to > figure if I could twist th

Re: Django ORM question about lookups that span relationships

2011-04-22 Thread Michael Radziej
On Fri, 22 Apr 2011 07:02:22 +0300, Oleg Lomaka wrote: > Blog.objects.filter(entry__pub_date__lte=date(2011, 4, 1), > entry__headline__contains='Easter > ').latest('pub_date') > > Or > > Blog.objects.filter(entry__pub_date__lte=date(2011, 4, 1), >

Re: Bug in Django admin?

2011-03-09 Thread Michael Radziej
Hi Martin! On Wed, 09 Mar 2011 15:58:54 +0100, Martin Tiršel wrote: > NO = False > YES = True > YES_NO_CHOICES = ( > (NO, 'no'), > (YES, 'yes') > ) > > to > > > NO = 0 > YES = 1 > YES_NO_CHOICES = ( > (NO, 'no'), > (YES, 'yes') > ) > > Then I get 0 or 1 for filter instead

Re: Django and an indirect access to the database tables (over stored procedures calls for data retrieval and modification)

2011-03-09 Thread Michael Radziej
On Tue, 8 Mar 2011 22:18:12 -0800 (PST), Vazir wrote: > There is some examples via raw() for data selects, but nothing > about data updates. Any suggestions? If you want to go this path, you can override the save method and do raw SQL instead to interact with the stored procedures. Go into the dj

Re: Django and an indirect access to the database tables (over stored procedures calls for data retrieval and modification)

2011-03-08 Thread Michael Radziej
On Tue, 8 Mar 2011 10:11:57 -0800 (PST), Vazir wrote: > there is no way (and no need) of giving a Django models with direct > access to a DB structure (all business logic is already bult in to the > DB), all DB interaction must be done via the stored procedures calls. Well, you have to call your

Re: Bug in Django admin?

2011-03-08 Thread Michael Radziej
Hi Martin! > > It's the wrong URL, you should use > > > > .../admin/appname/booltest/?completed__exact=False > > > > It is the same link, I don't see a difference :) Args--you're right. Stupid fingers :-) I meant .../admin/appname/booltest/?completed__exact=0 Does it work that way for you wit

Re: When do we stop using Django admin?

2011-03-08 Thread Michael Radziej
On Mon, 7 Mar 2011 21:49:45 -0800 (PST), ajaishankar wrote: > I do know we can tweak the admin to restrict querysets etc. and also > override admin templates - but is admin preferable in this situation? > > Or is it better to treat all this as a front end web app, and start > work on fresh pages

Re: Bug in Django admin?

2011-03-07 Thread Michael Radziej
Ahoj Martin, On Mon, 07 Mar 2011 12:49:32 +0100, Martin Tiršel wrote: > When I use filter in Django admin (that produces URL > .../admin/appname/booltest/?completed__exact=False), I get results which > are with completed=True. This is the SQL query generated by Django > admin: It's the wrong

Re: Main Application's settings.py floating multiple systems

2011-03-07 Thread Michael Radziej
On Mon, 7 Mar 2011 10:26:53 -0800 (PST), octopusgrabbus wrote: > So, my question is, is there an accepted way to populate BASE_URL and > MEDIA_URL with some local setting, like perhaps calling a python > function?, because it's Python code? I usually have a set of setting modules somewhere: bas

Re: data model help?

2011-03-05 Thread Michael Radziej
Hi Tim! On Sat, 5 Mar 2011 06:05:51 -0800 (PST), Tim wrote: > For me that looks a little complex. The 'sequence' doesn't really > belong to the Chapter or the Book, but to their relationship. A > Chapter may have one sequence number when part of Book A, and another > for Book B. That's a classic

Re: Ordering of querysets

2011-03-04 Thread Michael Radziej
On Fri, 4 Mar 2011 21:40:36 +0100, Sidney Cadot wrote: Hi Sidney, > It is possible by using a nested query, e.g. > > SELECT * FROM (SELECT * FROM some_table ORDER BY timestamp DESC LIMIT 10) > ORDER BY timestamp ASC; Nice, but it doesn't make sense. It makes everything harder to understand. Reve

Re: Dynamic ForeignKey using or how ?

2009-05-19 Thread Michael Radziej
On Tue, May 19, Anakin wrote: > class Faves(models.Model): > post = models.ForeignKey(CASTS-OR-ARTICLES) > user = models.ForeignKey(User,unique=True) > > is it possible ? You might want to use "generic relations" for this. They are described in the contenttypes framework. Hope

Re: Time & Date calculation in template

2009-05-13 Thread Michael Radziej
On Wed, May 13, Joshua Partogi wrote: > Dear all, > > Is it possible to do time and or date calculation in the template? > > Let's say I have a DateField {% now %} and want to subtract it with an > IntegerField (let's say 4, to get 4 years before today) in the template. If > it's possible, wha

Re: Foreign keys with null=True and QuerySet.exclude

2007-11-23 Thread Michael Radziej
On Fri, Nov 23, Andrew McMurry wrote: > > I have models something like this: > > class Attribute (Model): > name = CharField(maxlength=32) > private = BooleanField(default=False) > > class Object (Model): > ... > attr = ForeignKey(Attribute, null=True, blank=True) > >

Re: MySqldb error:

2007-11-15 Thread Michael Radziej
On Wed, Nov 14, [EMAIL PROTECTED] wrote: > > I'm receiving this error as I work thru Tutorial 1 (http:// > www.djangoproject.com/documentation/tutorial01/): > > [EMAIL PROTECTED] mysite]# python manage.py syncdb > Traceback (most recent call last): > File "/usr/lib/python2.3/site-packages/dja

Re: block.super returning html character codes - NOT html

2007-11-14 Thread Michael Radziej
On Wed, Nov 14, Josh wrote: > > Hi Michael, > > > This should only be needed if you did not do what Malcolm called "Simple > > backwards compatibility", i.e. to set {% autoescape off %}. > > > > So, am I right that you didn't put such a {% autoescape off %} tag in your > > root template? Then y

Re: block.super returning html character codes - NOT html

2007-11-14 Thread Michael Radziej
Hi Josh, On Wed, Nov 14, Josh wrote: > > Fixed it. > > New feature in django-dev is HTML escaping for any template tags (good > against cross-site scripting problems). > > Had to apply the safe filter to any template tags I don't want auto- > escaped. > > OLD: {{ block.super|safe }} > > NEW

Re: GoFlow: a workflow engine for django, available now as a django contrib

2007-09-25 Thread Michael Radziej
On Mon, Sep 24, MiloZ wrote: > > You can here dowload the workflow engine contrib; a demo django > project is included > http://django-goflow-en.blogspot.com/ Oops, French-- It would be very nice to have an English description, at least a short description. I can read a tiny bit of French, but

Re: order_by with foreign keys

2007-09-10 Thread Michael Radziej
On Mon, Sep 10, [EMAIL PROTECTED] wrote: > > that helps, thanks very much... > > i got a bit confused by all the tickets concerning this issue. also > the documentation doesn't mention any bugs, well bad luck ;) I didn't mean to blame this on you, it's not easy to find your way through the tic

Re: Problem with user login

2007-09-10 Thread Michael Radziej
On Mon, Sep 10, Joe wrote: > > Hi, > > I have a medium-traffic django site (maybe 2 page views a day) and > I am having a problem with users trying to log into the site. > > I am using the django view for logging in and logging out > (django.contrib.auth.views.login). For some reason and

Re: order_by with foreign keys

2007-09-10 Thread Michael Radziej
On Mon, Sep 10, [EMAIL PROTECTED] wrote: > > hi guys, > i noticed there have been questions about this before, but none of > those threads was helpful. > > i've got a simple db-request, the result should be ordered by a column > "thema" in a foreign key table "Thema": > Test.objects.select_rela

Re: isnull lookup's contradicting result

2007-09-06 Thread Michael Radziej
On Thu, Sep 06, Nis Jørgensen wrote: > > Michael Radziej skrev: > > On Thu, Sep 06, Russell Keith-Magee wrote: > > > > > >> On 9/6/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > >> > >>> I'd *love* to have a sneak previe

Re: isnull lookup's contradicting result

2007-09-06 Thread Michael Radziej
On Thu, Sep 06, Russell Keith-Magee wrote: > > On 9/6/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > > > I'd *love* to have a sneak preview of your changes, any way? ;-) > > Hey! Get to the back of the line! No queue-jumping! I was here first! :-) ...

Re: isnull lookup's contradicting result

2007-09-06 Thread Michael Radziej
Hi Malcolm, On Fri, Sep 07, Malcolm Tredinnick wrote: > My bad; you're right. Only m2m does outer joins on trunk at the > moment.:( > > I've been looking at the new stuff too much lately. This problem is > fixed there, so if people can wait until that lands very shortly it will > go away. this

Re: problems with finnish after upgrading to latest svn head

2007-09-06 Thread Michael Radziej
On Thu, Sep 06, Kenneth Gonsalves wrote: > > > On 06-Sep-07, at 4:27 PM, Chris Hoeppner wrote: > > > Make sure you're serving the content with the right content type in > > HTML, and that Django is working with the right content type, and that > > the files have a coding declared. > > all thi

Re: Q lookup with both OR and AND

2007-09-06 Thread Michael Radziej
On Thu, Sep 06, [EMAIL PROTECTED] wrote: > I thought I was close with this, but it only returned tickets assigned > to me. (The parenthesis around the 2nd and 3rd Q's obviously didn't > help) > > Ticket.objects.filter(Q(private__exact=False) | > (Q(private__exact=True) & Q(assigned_user__usernam

Re: Error adding DateField - 'unicode' object has no attribute 'strftime'

2007-09-05 Thread Michael Radziej
Hi Greg, On Wed, Sep 05, Greg wrote: > > Michael, > I'm using sqlite. Thanks for the clarification. I've almost no experience with sqlite, sorry. Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax +49-911-9352-100 http://www.noris.de - The

Re: hai am new one to django

2007-09-05 Thread Michael Radziej
On Wed, Sep 05, eXt wrote: > > On 5 Wrz, 10:37, Damodhar <[EMAIL PROTECTED]> wrote: > > i want to take reaserch about this topic, and submit report, so canu > > hel pme. > Are you really going to write the report or you want someone to write > it for you? The latest is my feeling after reading y

Re: Problem in current svn TRUNK

2007-09-04 Thread Michael Radziej
On Mon, Sep 03, Peter Nixon wrote: > Tomorrow I will setup a vm for you running openSUSE 10.3 beta2 that you can > play with to your hearts content. Would that be helpfull? Peter, this is going to take a substantial amount of time. I'm not a core developer, and I don't (any more) use SuSE, so i

Re: Strange encoding behavior

2007-09-03 Thread Michael Radziej
On Fri, Aug 31, Anderson Santos wrote: > > Ahhh, finally! Fine! > > Thank you very much, it worked now =D > I didn't know about the __unicode__ trick Well, the unicode documentation is dense to read, so one shouldn't rush through it. But it contains also this trick: http://www.djangoprojec

Re: Strange encoding behavior

2007-08-31 Thread Michael Radziej
On Fri, Aug 31, Anderson Santos wrote: > > Here the code: > > > class Download(models.Model): > """ Disponibilização de arquivos para download """ > > descricao = > models.CharField(verbose_name='Descrição',maxlength=250) > data_do_arquivo = models.DateField() > caminho_do_arq

Re: Preferred way to expand User Model?

2007-08-31 Thread Michael Radziej
On Fri, Aug 31, Rotlaus wrote: > > On Aug 31, 11:02 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > > > what is the preferred way to expand the user model? I would use a > > > model with a OneToOne Field, but documentation says i should not. What > > > should i do instead? > > > > A foreign key

Re: Strange encoding behavior

2007-08-30 Thread Michael Radziej
On Thu, Aug 30, Anderson Santos wrote: > > I am still having this issue. > I have in my settings DEFAULT_CHARSET = "utf-8", and I created a new > database with UTF-8 encoding (using PGAdmin). > So I go to admin page, click on my model and then the "add" button, I > include a special char (á, ç,

Re: Choices cannot be marked for translation?

2007-08-30 Thread Michael Radziej
On Thu, Aug 30, Jarek Zgoda wrote: > > Michael Radziej napisał(a): > > >>>> The next testing option is to try with non-lazy version. > >>> that works! import gettext as _ > >> And that's a real bug, I think. > >> > >&g

Re: non unicode

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, Robin Becker wrote: > > Hi, we're having some troubles with latest django that are caused by the > switch > to unicode string output. In particular since we were already carefully > handling > the conversion and encoding of the database values we are now getting errors > bec

Re: Choices cannot be marked for translation?

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, Jarek Zgoda wrote: > > Kenneth Gonsalves napisał(a): > > >>> now, this doesnt work - when I remove the _(), then the choices > >>> appear. How do I then mark them for translation? > >>> > >> Make sure to use gettext_lazy > > i *am* using: from django.utils.tr

Re: Choices cannot be marked for translation?

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, Kenneth Gonsalves wrote: > > > On 29-Aug-07, at 2:24 PM, Michael Radziej wrote: > > >>>> now, this doesnt work - when I remove the _(), then the choices > >>>> appear. How do I then mark them for translation? > >>>>

Re: UnicodeDecodeError with memcache

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, patrickk wrote: > > I just changed > self._cache.set(key, value, timeout or self.default_timeout) > to > self._cache.set(smart_str(key), value, timeout or > self.default_timeout) > in memcached.py > and it seems to work. > > Don´t know if that´s a proper solution though. Me eit

Re: Error adding DateField - 'unicode' object has no attribute 'strftime'

2007-08-29 Thread Michael Radziej
On Tue, Aug 28, Greg wrote: > > Hello, > I have the following code in my models.py file > > class Orders(models.Model): > timestamp = models.DateField() > ... etc > > / > > I have the following in my view.py function > > from datetime import datetime > o = Orders() > o.ti

Re: Choices cannot be marked for translation?

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, Kenneth Gonsalves wrote: > > > On 28-Aug-07, at 9:55 PM, Chris Hoeppner wrote: > > >> when i upgraded to the latest svn head, I found that all the places > >> in admin that had drop downs for choices were blank. I had always > >> marked my choices for translation like so: > >>

Re: UnicodeDecodeError with memcache

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, patrickk wrote: > instead of sending the whole stack, it´s probably easier to just check > it yourself: > http://skip.dedhost-sil-076.sil.at/trailer/ File "/usr/lib/python2.4/site-packages/memcache.py" in _set 328. fullcmd = "%s %s %d %d %d\r\n%s" % (cmd, key, flags, time, len

Re: Problem in current svn TRUNK

2007-08-28 Thread Michael Radziej
Hi, Though I cannot easily test with exactly your packages, I tested django trunk under Ubuntu (feisty) with postgresql-8.2.3-3, python-2.5.1~rc1-0ubuntu3, python-psycopg2-2.0.5.1-6ubuntu1, with a minimal model syncdb, and it worked. Michael -- noris network AG - Deutschherrnstraße 15-19 - D-

Re: Problem in current svn TRUNK

2007-08-28 Thread Michael Radziej
On Tue, Aug 28, Michael Radziej wrote: > > On Mon, Aug 27, Peter Nixon wrote: > > > > > On Wed 11 Jul 2007, Michael Radziej wrote: > > > Hi, > > > > > > you're using the alpha version of SuSE ... well ... there might very well > >

Re: Problem in current svn TRUNK

2007-08-28 Thread Michael Radziej
On Mon, Aug 27, Peter Nixon wrote: > > On Wed 11 Jul 2007, Michael Radziej wrote: > > Hi, > > > > you're using the alpha version of SuSE ... well ... there might very well > > be a problem very deep in one of the libraries. The alpha releases aren't >

Re: UnicodeEncodeError in template rendering

2007-08-24 Thread Michael Radziej
Hi, On Sun, Aug 19, Malcolm Tredinnick wrote: > > On Sun, 2007-08-19 at 00:27 -0700, cesco wrote: > > File "C:\Python25\lib\site-packages\django\template\__init__.py" in > > render > > 739. return ''.join([force_unicode(b) for b in bits]) ^^^ Malcolm: shouldn't this be u''.j

Re: Multiple primary keys

2007-08-14 Thread Michael Radziej
] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~------~----~~----~--~~--~--~--- >From nobody Mon Sep 17 00:00:00 2001 From: Michael Radziej <[EMAIL PROTECTED]> Date: Mon Aug 13 16:03:06 2007 +0200 Subject: [PATCH] com

Re: databrowse, coercing to Unicode:

2007-08-14 Thread Michael Radziej
Hi, this looks very similar to this ticket (though I'm not sure): http://code.djangoproject.com/ticket/5146 You might want to add your traceback as an attachment. Ah, you get tracebacks that are easier to read if you click on the link "switch to cut and paste view" (or similar, close to the top

Re: databrowse, coercing to Unicode:

2007-08-10 Thread Michael Radziej
On Fri, Aug 10, paulh wrote: > > I have tried the databrowse app on a couple of projects, but it fails > on both with the same error. I wondered whether anyone else has seen > this error message: > > coercing to Unicode: need string or buffer, __proxy__ found > > If you need the whole stack, l

Re: Which database is better for django, PostgreSQL or MYSQL?

2007-07-11 Thread Michael Radziej
On Thu, Jul 12, Kenneth Gonsalves wrote: > > > On 12-Jul-07, at 6:45 AM, nick feng wrote: > > > Which database is better for django, PostgreSQL or MYSQL? > > postgresql - general, not for django in particular mysql does not support django fixtures (unless you use the ISAM storage engine in m

Re: Problem in current svn TRUNK

2007-07-11 Thread Michael Radziej
Hi, you're using the alpha version of SuSE ... well ... there might very well be a problem very deep in one of the libraries. The alpha releases aren't very reliable. I'd suggest that you try it with another OS. So long, Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnb

Europython, anyone?

2007-07-06 Thread Michael Radziej
Hi, I'm going to attend the Europython congress next week, and I'll arrive on early Sunday afternoon. If anyone would like to gather together, please send me an email, I'd appreciate! Cheers, Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax

Re: Generic views: how to use them properly?

2007-06-03 Thread Michael Radziej
On Fri, Jun 01, Sacher Khoudari wrote: > can I add a book to an author? I mean, how do I call > "django.views.generic.create_update.object_create" with "model=Book", > and pass it the value for it's foreign key? You're right, generic views are quite limited. And they work only with "oldforms", w

Re: Unicode-branch: testers wanted

2007-05-30 Thread Michael Radziej
Hi Malcolm! On Sat, May 26, Malcolm Tredinnick wrote: > On Fri, 2007-05-25 at 17:17 +0200, Michael Radziej wrote: > > First, I found that I have a problem with commit 5255 together with the test > > client. It breaks loading the modules, probably due to recursive imports. > &

Re: Unicode-branch: testers wanted

2007-05-25 Thread Michael Radziej
Hi Malcolm, A short disclaimer: I'm currently trying the unicode branch with the autoescape patch and a couple of other patches, so my problems might really be my own problems, but I don't expect it. First, I found that I have a problem with commit 5255 together with the test client. It breaks

Re: Solution to multiple models on one form?

2007-05-23 Thread Michael Radziej
On Sun, May 20, David Priest wrote: > > After bashing at it some more, I had to conclude I was out to lunch. > > It is killing me to wait for newforms. It's senseless for me to > learn old forms, but I'm having a helluva time making heads or tails > of newforms. Some things that I swear m

content type for html parts

2007-04-13 Thread Michael Radziej
Hi, some of my views serve part of an html (or, actually, xhtml document), such as: """ ... """ or """ ... ... """ I'm running into problems whatever content type I use. I use an automatic validator during testing, that validates all text/html or application/xhtml+xml doc

Re: gettext & UnicodeDecodeError

2007-04-13 Thread Michael Radziej
On Thu, Apr 12, sandro.dentella wrote: > > Thanks! that was it. Now I can reproduce the error. Which is the > "correct" solution? > > An easy and not really nice one is to encode title into > DEFAULT_CHARSET, but I'd rather > have _() return an unicode object. How should I do to obtain this? N

Re: gettext & UnicodeDecodeError

2007-04-11 Thread Michael Radziej
On Wed, Apr 11, Sandro Dentella wrote: > > Hi all, > > I'm having problems understanding an error that raises with gettext and an > accented letter. Italian translation of 'priority' is 'priorità', the text > to be translated is: > > subject = _("Priority changed in ticket #%(id)s %(

Re: svn trunk broken since [4919], encoding problems

2007-04-05 Thread Michael Radziej
Hi, mtredinnick has reverted the problematic portion in changeset [4933], so it should be fine again with a current checkout. Merci ;-) Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax +49-911-9352-100 http://www.noris.de - The IT-Outsourci

Re: create_object error

2007-04-05 Thread Michael Radziej
On Thu, Apr 05, Marcelo Ramos wrote: > es_AR: > > #: views/generic/create_update.py:43 > #, python-format > msgid "The %(verbose_name)s was created successfully." > msgstr "Se creó con éxito %(verbose_name)." this should be msgstr "Se creó con éx

svn trunk broken since [4919], encoding problems

2007-04-05 Thread Michael Radziej
Hi, changeset [4919] made the escape filter tag return unicode strings instead of bytestrings, which seems to create problems as soon as you use non-ASCII characters. If you see any encoding problems, especially with oldforms or the admin interface, please take a look at ticket #3924. The except

Re: MySQLdb version

2007-03-21 Thread Michael Radziej
On Wed, Mar 21, Adam wrote: > > This causes a problem with DreamHost...I know they're not the best in > the world, but I get this error now on any sites on their servers. > Does anyone have a decent solution to get around this? Can I install > a local copy somehow and make django use it instead

Re: Blocking IP with middleware?

2007-03-21 Thread Michael Radziej
On Wed, Mar 21, [EMAIL PROTECTED] wrote: > > Looking at my logs, I saw a gazillion requests from 81.208.31.216, > which I believe is a malicious bot. I understand there's a way to use > middleware to block IPs, but could somebody elaborate on that, or > point me in the right direction? Thanks!

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread Michael Radziej
[EMAIL PROTECTED]: > My site just keeps getting bigger and bigger, and the performance has > gotten excruciatingly slow. - database needs indexes? - check how many queries your views generate. Perhaps you need reorganization or select_related. -- noris network AG - Deutschherrnstraße 15-19 - D-

Re: error in SQL syntax for allow_empty=True in list_detail.py

2007-02-21 Thread Michael Radziej
abe: > I'm trying to call object_list in > > django/views/generic/list_detail.py > > with allow_empty=True > > but if I use {{object_list.count}} in a template I get the following > error: > > > (1064, "You have an error in your SQL syntax; check the manual that > corresponds to your MySQL s

Re: Upgrade from build 4454 to 4463 induced problem in template

2007-02-08 Thread Michael Radziej
gordyt: > Howdy Folks! > > I have been running with trunk revision 4454. I just updated to > revision 4463 and a bit of code that has never shown any problems is > now broken.. :-( That was a bug, but it has been fixed in the meantime. Just make another update ;-) Michael -- noris network A

Re: tying custom queries back into the queryset / object model / paginator... ?

2007-02-08 Thread Michael Radziej
Sergey Kirillov: > I'm using this function to load Django objects using custom sql > > obj_list = klass._default_manager.in_bulk(oid_list) But that's two queries. I think that there should be a way to do it with one query. Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 N

Re: order_by not working with foreign keys:

2007-02-02 Thread Michael Radziej
Hi Ramiro, are you the Mr. Anonymous who left comment #18? Just for clarification that I understand who is who ;-) Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax +49-911-9352-100 http://www.noris.de - The IT-Outsourcing Company --~--~---

Re: order_by not working with foreign keys:

2007-02-01 Thread Michael Radziej
Bram - Smartelectronix: > Michael Radziej wrote: >> Bram - Smartelectronix: >> >> >>> I'll be updating the ticket, but I was wondering when the ticket would >>> be merged with trunk. >> Someone needs to writes tests for this. As soon as this has

Re: 2 Questions!

2007-02-01 Thread Michael Radziej
Sebastien Armand [Pink]: > This time it's done. The ticket is here: > http://code.djangoproject.com/ticket/3412 I hope it's enough documented. Merci! I finally realized that it's not about a ForeignKey, sorry for the confusion. Can you check if you can work around it with a entreprise_list=entre

Re: order_by not working with foreign keys:

2007-02-01 Thread Michael Radziej
Bram - Smartelectronix: > I'll be updating the ticket, but I was wondering when the ticket would > be merged with trunk. Someone needs to writes tests for this. As soon as this has been done, the ticket can be promoted to "ready for checkin", which means added core developer attention ;-) Mic

Re: 2 Questions!

2007-02-01 Thread Michael Radziej
Sebastien Armand [Pink]: > No problem, thanks! > > There's already a ticket, it's here: > http://code.djangoproject.com/ticket/3387 No, thanks for searching, but it's not. #3387 was triggered by using queryset.filter(unicode_string) You didn't use a unicode_string within filter(), though the t

Re: utf-8 and database models

2007-01-31 Thread Michael Radziej
Hi Joseph, Joseph Wenninger: > I'm using an sqlite database with a model which has a Charfield named > filepath. > > I'm trying to store an "utf-8" string there. I tried passing it as a byte > string and as a unicode object. Saving works fine, but if I try to access the > field I'm always get

Re: 2 Questions!

2007-01-31 Thread Michael Radziej
Hi Sebastien, I don't see where the exact problem is and whether there's already a ticket, but this is a bug within the newforms package. It is caused due to newforms putting unicode into the models, but most parts of Django are not unicode ready. You can search in the existing tickets (with cate

Re: IPython Shell does not see database changes made by views.

2007-01-31 Thread Michael Radziej
Ivan Sagalaev: > Paul Childs wrote: >> I wanted to do some checks through the shell, which I was opened >> during my unit testing, and found that after making some queries using >> Django objects there appeared to be no changes in the database. When I >> checked the database using its admin tool t

Re: 2 Questions!

2007-01-30 Thread Michael Radziej
Sebastien Armand [Pink]: > - When I search something in my database, using icontains on a field, it > doesn't work when there are non-asccii characters: a product field may > contain (in french so with accents!!) télévision but when I look for "télé" > I get a unicode error. If I look for "vision"

Re: setup.py error SUSE 10.2/VMware Server

2007-01-30 Thread Michael Radziej
Hi, in the svn trunk, the dependency on setuptools was removed some time ago because it made more problems than it solved. Perhaps you should try to fetch it from svn, and then install it from there. Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-

Re: Euro Sign raise UnicodeEncodeError

2007-01-26 Thread Michael Radziej
Hi, we have a bit of chaos here ... Tickets 3370, 1356 and probably 952 all are about this problem, all are accepted, and #3370 and #1356 have very similar patches. I ask everybody to continue discussion in django-developers ("unicode issues in multiple tickets"), and I ask the authors of these t

Re: order_by not working with foreign keys:

2007-01-25 Thread Michael Radziej
Bram - Smartelectronix: > Michael Radziej wrote: >> Hi, >> >> there's a ticket with a patch about the order_by-Problem: >> >> http://code.djangoproject.com/ticket/2210. >> >> Does it help? > > Knowing it's broken helps a LOT :-) &g

Re: order_by not working with foreign keys:

2007-01-25 Thread Michael Radziej
Hi, there's a ticket with a patch about the order_by-Problem: http://code.djangoproject.com/ticket/2210. Does it help? Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax +49-911-9352-100 http://www.noris.de - The IT-Outsourcing Company --~

Re: View didn't return an HttpResponse

2007-01-24 Thread Michael Radziej
[EMAIL PROTECTED]: > What would cause an (intermittent) error saying my view didn't return > an HttpResponse object? Perhaps, a missing return in your view function. Or if you try to return directly a string. It gets intermittent if it's only missing/wrong in a seldom used branch. Michael -- no

Re: Q()s, m2ms and failing queries

2007-01-24 Thread Michael Radziej
Felix Ingram: > Quick reply to myself in case someone is looking through the archives. > This seems to be covered in ticket 1801: > http://code.djangoproject.com/ticket/1801 > > It's noted as a 'hard bug'. I heard you and have put the ticket into "Accepted". If anybody has a solution or can prod

Re: Cookies on mobile phones NOT to expire at browser close

2007-01-24 Thread Michael Radziej
Adam Fast: > I'm not using cookies for mobiles in any of my apps yet, but I have a > Cingular 8125 and would be willing to help test it out. Nice! I need to slab something together and will come back to you. Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-91

Re: Cookies on mobile phones NOT to expire at browser close

2007-01-24 Thread Michael Radziej
Hi, for evaluating this ticket, it would be important to get into contact with anybody using cookies with mobile phones. Anybody, perhaps? Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax +49-911-9352-100 http://www.noris.de - The IT-Outsourc

Re: Database Error Handling

2007-01-24 Thread Michael Radziej
Vadim Macagon: > ... > Let's say I have a Post model with a title field, that title must be > unique for a given date. Here's a sequence of events that could > potentially happen: > > time: t1). User A fills in a form to create a new Post, and sets the > title to "Donkeys". > time: t2). User B

Re: Is this bug in Django

2007-01-22 Thread Michael Radziej
[EMAIL PROTECTED]: > "/usr/local/lib/python2.4/site-packages/django/utils/translation/trans_real.py", > line 167, in _fetch > app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]), > appname[p+1:]) > AttributeError: 'module' object has no attribute 'blog' > > > I have never seen any

Re: Charset hell (xgettext and utf-8 message ids)

2007-01-19 Thread Michael Radziej
guzru: Julio Nobrega ha scritto: I had a bunch of unicode errors using the template tag trans while using Python 2.3. Upgrading to 2.4 solved all my problems. What version of Python are you using? I'm using python 2.4.3. I've also tried updating gettext without success. Nah, the proble

Re: apply a patch

2007-01-15 Thread Michael Radziej
Picio schrieb: Hello, dumb question: which is the chance that patch #1435 will be integrated in trunk before 1.0? I can't tell you, but perhaps this type of question gets more attention at django-developers. You should mention 'aggregate functions' in the subject. How can I aplly this patch

  1   2   >