Re: etag and 404.

2007-04-18 Thread Atilla
I stand corrected, thank you for the referenced reply. I've missed that part of the specification. If you make any changes to the conditional get middleware, please consider sending a patch for it, that could be incorporated in the code later, hopefully. --~--~-~--~~~-

Re: new forms - processing the form without rebuilding the entire view

2007-04-18 Thread Tipan
Thanks Guys, I've read through all the links and I can see plenty of scope with Ajax/JSON. I note that most of the solutions use a Javascript toolkit such as Prototype/Dojo/Yahoo/JQuery. Two questions come to mind: 1. Does using the toolkit save a lot of work - what are the main advantages? 2.

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread [EMAIL PROTECTED]
On 18 avr, 05:16, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Not really -- although in that case there would be slightly more value > in adding the encoding line, since bytestrings that aren't UTF-8 encoded > will break in interesting ways. > > My main reason for not adding this: if you forge

Bug? RadioWidget does not render its attrs

2007-04-18 Thread Iwan
Hi there, It does not seem that this has been reported previously --- it seems that RadioWidget does not render its HTML attributes passed in via attrs. This is django.newforms.widgets.RadioWidget in the svn branch http://code.djangoproject.com/svn/django/trunk (revision 5023). So, if you have

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread ashwoods
maybe a little off-topic, but why do you need special characters in code? it makes code maintainance and reusability a bit more difficult, while there are not really a lot of situations where its necesary. just asking :) --~--~-~--~~~---~--~~ You received this m

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread [EMAIL PROTECTED]
On 18 avr, 13:39, ashwoods <[EMAIL PROTECTED]> wrote: > maybe a little off-topic, but why do you need special characters in > code? it makes code maintainance and reusability a bit more difficult, > while there are not really a lot of situations where its necesary. > > just asking :) Because fre

Re: json and django - couple of questions.

2007-04-18 Thread MerMer
Thanks Russ, Since my last post I've also discovered the the "values" option which automatically converts the queery sets into a list of dictionaries. data=MyModel.objects.values('field1', 'field2') MerMer On Apr 18, 12:48 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 4/18/07, Me

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread John Lenton
On 4/18/07, ashwoods <[EMAIL PROTECTED]> wrote: > > maybe a little off-topic, but why do you need special characters in > code? it makes code maintainance and reusability a bit more difficult, > while there are not really a lot of situations where its necesary. > > just asking :) I don't know ab

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread Kenneth Gonsalves
On 18-Apr-07, at 5:44 PM, John Lenton wrote: >> >> just asking :) > > I don't know about Nicolas, but I'm writing something for a > Spanish-speaking customer, so I might have a TelephoneField > ("teléfono") in there, for example. the way to do it is verbose_name = _("telephone") -- regards k

Re: Static content in admin?

2007-04-18 Thread Jay Parlar
On 4/17/07, RG <[EMAIL PROTECTED]> wrote: > > Is there any way to manage static blocks of content from the admin > panel? I am converting my companies website into django and many "non- > programmers" will be maintaining the content. > > There are blocks on the home page that will get updated only

why there is no something like HttpResponseRedirect but status is 303

2007-04-18 Thread Gilbert Fine
Hi All, According to HTTP standard, the meaning of 303 status is (copied from rfc2616): 10.3.4 303 See Other The response to the request can be found under a different URI and SHOULD be retrieved using a GET method on that resource. This method exists primarily to allow the output of a POST-

Re: why there is no something like HttpResponseRedirect but status is 303

2007-04-18 Thread Atilla
On 18/04/07, Gilbert Fine <[EMAIL PROTECTED]> wrote: > > Hi All, > >According to HTTP standard, the meaning of 303 status is (copied > from rfc2616): > > 10.3.4 303 See Other > > The response to the request can be found under a different URI and > SHOULD be retrieved using a GET method on that

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread Atilla
> >> just asking :) > > > > I don't know about Nicolas, but I'm writing something for a > > Spanish-speaking customer, so I might have a TelephoneField > > ("teléfono") in there, for example. > > the way to do it is verbose_name = _("telephone") Yes, instead of naming your models with "funky" char

Re: Navigating the Documentation

2007-04-18 Thread Tim Chase
> Am I the only one who has a hellish time trying to navigate > Django's online documentation? (here: > http://www.djangoproject.com/documentation/) Yes, I too have had difficulties, though I find the following link: http://www.google.com/search?q=%s%20%28site%3Adjangoproject.com%20OR%20site%3A

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread mamcxyz
> Yes, instead of naming your models with "funky" characters, you can > always set the verbose displayed name to whatever you need it to be. The are not funky. Are the normal characters in each labguage. Anyway, that show too if the "funky" chars appear in "text" so --~--~-~--~~

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread Atilla
On 18/04/07, mamcxyz <[EMAIL PROTECTED]> wrote: > > > Yes, instead of naming your models with "funky" characters, you can > > always set the verbose displayed name to whatever you need it to be. > > The are not funky. Are the normal characters in each labguage. Anyway, > that show too if the "funk

Email Charset

2007-04-18 Thread Condredge
I wonder if anyone else has discovered this problem. I have an application which sends email. Most of the recipients get the email fine, however some of them receive a message which looks all garbled. The reason is that the message is encoded in utf_8. When I changed the DEFAULT_CHARSET to US_A

Re: Psychopg 2 Install

2007-04-18 Thread Brian Luft
>I'm asking what do I place into the pg_config and library_dirs in order for >the installation to work on the client web server? Or what do I in general to >make it work? I don't know what you mean by "place into". Make sure you read the INSTALL and README files carefully that came with your p

puzzeled by possible inconsistency in queery set.

2007-04-18 Thread Merric Mercer
I'm getting, what seems to me, an inconsistency. Here's a simplified example: >>qs=Mymodel.objects.all() >>for i in qs: setattr(i,"firstname","merric") This works on:- >>qs[0].firstname >>merric It also works in the template:- {% for i in qs %} {{ i.firstname }} {% endfor

Resize images on demand

2007-04-18 Thread Michel Thadeu Sabchuk
Hi people! I've done a method to resize images on demand on a template, it is a simple filter that made use of PIL.Image, see the following template code: ... ... The code is already running, but I have another approach, reather than use a filter, I can define an automatic custom method on t

Re: puzzeled by possible inconsistency in queery set.

2007-04-18 Thread Merric Mercer
The line of my previous post " print i.name" should read "print i.firstname This is just a correction to my post, not to my problem! Thanks MerMer Merric Mercer wrote: > I'm getting, what seems to me, an inconsistency. > Here's a simplified example: > > > >>qs=Mymodel.objects.all() > >>for

Re: Django app initialisation

2007-04-18 Thread Andrew Durdin
On Apr 18, 4:27 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > The problem is that "import all apps" is not a simple operation and has > lots of unexpected (at least until you get used to expecting the > unexpected) side-effects. Nested imports are the main cause. :-) > > The problem is tha

newforms: radioselect, class attribute?

2007-04-18 Thread patrickk
I´m using the code below, but the class is not being display in the input form: this_form = forms.ChoiceField(choices=this_choices, widget=forms.RadioSelect(attrs={'class': 'vRadioSelectField'})) any ideas? thanks, patrick --~--~-~--~~~---~--~~ You received

Re: Session support

2007-04-18 Thread SlavaSh
This is wrong "intentional design decision". There few more web clients in the world besides the IE and Firefox. Part of them does not support cookies. On 27 мар, 22:26, "RajeshD" <[EMAIL PROTECTED]> wrote: > On Mar 27, 11:00 am, "SlavaSh" <[EMAIL PROTECTED]> wrote: > > > Is it any way to use ses

Re: Session support

2007-04-18 Thread James Bennett
On 4/18/07, SlavaSh <[EMAIL PROTECTED]> wrote: > This is wrong "intentional design decision". > There few more web clients in the world besides the IE and Firefox. > Part of them does not support cookies. Django provides a sessions framework in 'django.contrib.sessions' (note the "contrib" in tha

build problem with databrowse

2007-04-18 Thread dummy
Hi all, I checked out a fresh copy of django-svn with databrowse contrib app included. I run 'python setup.py sdist' or 'python setup.py bdist_rpm' and the templates-folder of databrowse is missing. Can somebody verify this ? Regards, Dirk -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat .

Re: Session support

2007-04-18 Thread Honza Král
On 4/18/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 4/18/07, SlavaSh <[EMAIL PROTECTED]> wrote: > > This is wrong "intentional design decision". > > There few more web clients in the world besides the IE and Firefox. > > Part of them does not support cookies. > > Django provides a sessions

Re: django comparison

2007-04-18 Thread [EMAIL PROTECTED]
For what it's worth, I found Django to be LESS work than Mambo/Joomla, just because I wasted an ungodly amount of time trying to make Mambo do what I wanted. On Apr 17, 10:26 pm, M Harris <[EMAIL PROTECTED]> wrote: > On Tuesday 17 April 2007 21:12, Jay Parlar wrote:> The Django server can only >

Re: new forms - processing the form without rebuilding the entire view

2007-04-18 Thread Nathaniel Whiteinge
Personally, I use a toolkit to lessen cross-browser compatibility problems as well as to speed quick, little functionality (eg. animations). I chose jQuery because it's small, unobtrusive, and I love the CSS-like syntax. - whiteinge On Apr 18, 3:11 am, Tipan <[EMAIL PROTECTED]> wrote: > Thanks Gu

stackless and django

2007-04-18 Thread Michael K
I have a strange question. If I'm using a stackless version of python, could I, in theory, use channels and tasklets within a django application/project? I can't think of any problems, and I've not experienced any issues with using the stackless binary to run manage.py, but I'm kind of wondering

Discussion on django-job-at-wefi

2007-04-18 Thread Michael K
Pablos, Are you still looking to fill out the team? --~--~-~--~~~---~--~~ 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

ImportError: no module named django

2007-04-18 Thread Oliver Charles
Ok, I've done a ton of googling on this, and not come up with much luck. Here's my situation: I've just purchased a new VPS from OpenHosting for a project, and it comes with mod_python, apache2 and postgresql all setup. So I did a subversion checkout of django, and symlinked it to /usr/lib/pytho

Re: Get function name after....

2007-04-18 Thread Mario Gonzalez
On 27 mar, 22:26, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > > At the moment we try to remember to fill in most of the details on the > > > wrapped object, but this isn't always possible (for example, the > > > __name__ attribute of a function is read-only in python 2.3). One > Today I t

Re: ImportError: no module named django

2007-04-18 Thread oggie rob
What happens when you run: sudo -u apache python >>> import django >>> django BTW, I use openhosting and have a few django sites running so don't be discouraged! -rob On Apr 18, 12:59 pm, Oliver Charles <[EMAIL PROTECTED]> wrote: > Ok, > > I've done a ton of googling on this, and not come up

Re: ImportError: no module named django

2007-04-18 Thread Oliver Charles
I get... [EMAIL PROTECTED] ~]$ sudo -u apache python Password: Python 2.4.3 (#1, Mar 14 2007, 18:51:08) [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import django Traceback (most recent call last): File "", line 1,

Re: ImportError: no module named django

2007-04-18 Thread oggie rob
Okay, you're getting much closer. Try 'sudo -u apache ls -l /usr/lib/ python2.4/site-packages/' and 'site-packages/django' to look at permissions. On Apr 18, 2:10 pm, Oliver Charles <[EMAIL PROTECTED]> wrote: > I get... > > [EMAIL PROTECTED] ~]$ sudo -u apache python > Password: > Python 2.4.3 (#

Extending django User model to multiple profiles

2007-04-18 Thread checco
Hi, from here, as you certainly know, you can see how to extend the User model to fit the particular needs of a given application: http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model In my application I have two different kind of users, so I have to extend it twice: which va

Re: ImportError: no module named django

2007-04-18 Thread ashwoods
maybe apache or apache mod_python is set not to follow symlinks. copy the django code into site-packages (not merely a symlink) and try if that works. On Apr 18, 11:10 pm, Oliver Charles <[EMAIL PROTECTED]> wrote: > I get... > > [EMAIL PROTECTED] ~]$ sudo -u apache python > Password: > Python 2.4

Re: ImportError: no module named django

2007-04-18 Thread Oliver Charles
Ok, I took the last email private with Rob, and got it sorted! It seemed that apache couldn't access any files in /home/acid2, so the solution has been to move everything into /opt/django, so I did: sudo mv /home/acid2/src/django_src/ /opt/django/src/ sudo rm /usr/lib/python2.4/site-packages/djan

Re: Per-object-permission branch and Many-to-many relationship issue

2007-04-18 Thread [EMAIL PROTECTED]
This problem has been known since at least last year -- check out http://code.djangoproject.com/ticket/1796 . It has been vexing me for a couple months, but I have yet to find an elegant solution. There is a workaround in django.core.management.run_shell() that cures the problem in the manage.py

Many to Many - struggling with the syntax.

2007-04-18 Thread Merric Mercer
I'm have the following three Models. 1.Category Model 2. Promotion Model - Has a many to many relationship with Category. - Is the Parent of the Cash Model. 3.Cash Model - Has one to one relationship with Promotion. I want to create a query set of Cash Objects, filtered by a speci

[database-api] Using .select_related() with a multi-table query (bug?)

2007-04-18 Thread Luiz Carlos Geron
Hi, I have three models, listed at [1], that I want to get data from with only one query, because of performance issues with my app. The way that worked so far is: league_ids = [12, 21] bets = models.Bet.objects.filter(game__league__id__in=league_ids).order_by('bet__game__league.id', 'game_part'

Re: Any developers in Gold Coast Australia?

2007-04-18 Thread [EMAIL PROTECTED]
experienced Zope/Python/Plone programmer here - based up in Bris - just starting to dip my toes into Django. Have plenty of work already via my CMS business (cmsarchitects.com), but thought I'd reply anyway just to make contact. On Apr 17, 9:08 am, "sime" <[EMAIL PROTECTED]> wrote: > No python/dj

Re: Bug? RadioWidget does not render its attrs

2007-04-18 Thread Russell Keith-Magee
On 4/18/07, Iwan <[EMAIL PROTECTED]> wrote: > > Hi there, > > It does not seem that this has been reported previously --- it seems > that RadioWidget does not render its HTML attributes passed in via > attrs. > > This is django.newforms.widgets.RadioWidget in the svn branch > http://code.djangopro

Re: Email Charset

2007-04-18 Thread Russell Keith-Magee
On 4/19/07, Condredge <[EMAIL PROTECTED]> wrote: > > I wonder if anyone else has discovered this problem. I have an > application which sends email. Most of the recipients get the email > fine, however some of them receive a message which looks all garbled. > The reason is that the message is en

Re: django comparison

2007-04-18 Thread M Harris
On Wednesday 18 April 2007 14:22, [EMAIL PROTECTED] wrote: > For what it's worth, I found Django to be LESS work than Mambo/Joomla, > just because I wasted an ungodly amount of time trying to make Mambo > do what I wanted. Did you get on-board with the Django book, or something else? --

Re: puzzeled by possible inconsistency in queery set.

2007-04-18 Thread Malcolm Tredinnick
On Wed, 2007-04-18 at 17:22 +0100, Merric Mercer wrote: > I'm getting, what seems to me, an inconsistency. > Here's a simplified example: > > > >>qs=Mymodel.objects.all() > >>for i in qs: > setattr(i,"firstname","merric") > > This works on:- > > >>qs[0].firstname > >>merric >

Re: Many to Many - struggling with the syntax.

2007-04-18 Thread Malcolm Tredinnick
On Wed, 2007-04-18 at 23:28 +0100, Merric Mercer wrote: > I'm have the following three Models. > > 1.Category Model > > 2. Promotion Model > - Has a many to many relationship with Category. > - Is the Parent of the Cash Model. > > 3.Cash Model > - Has one to one relationship with Pro

Re: Django app initialisation

2007-04-18 Thread Malcolm Tredinnick
On Wed, 2007-04-18 at 09:34 -0700, Andrew Durdin wrote: > On Apr 18, 4:27 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > > The problem is that "import all apps" is not a simple operation and has > > lots of unexpected (at least until you get used to expecting the > > unexpected) side-ef

In Admininterface: Error: variable not passed into template?

2007-04-18 Thread Michael Lake
Hi all In the Admin interface I'm getting the folloing error for a model: Error: variable not passed into template?>Data class Data(models.Model): experiment_id = models.CharField(maxlength=10) node_id = models.CharField(maxlength=10) content = models.TextField(