Re: Using gettext_lazy in __repr__

2006-02-02 Thread hugo
>Are you sure? Because now it throws a NameError exception. >global name 'gettext_lazy' is not defined Yes, I am sure. I wrote that stuff ;-) >>> from django.utils.translation import gettext_lazy, activate >>> activate('de-de') >>> print gettext_lazy('Username:') Benutzer: So you just need to p

Re: Template cache which speeded up my setup 25 times

2006-02-02 Thread hugo
>I was thinking we could add a CACHE_COMPILED_TEMPLATES setting and >change get_template() to give it a "cache" keyword argument, which >would default to the value of CACHE_COMPILED_TEMPLATES. Any quick >thoughts before I implement this? Or a way for the template loader to tell the machinery that

Re: Do I use @login_required to extend authentication?

2006-02-02 Thread tonemcd
Jason F. McBrayer wrote: > "tonemcd" <[EMAIL PROTECTED]> writes: > > > You do mention that every entry in LDAP must also exist in the django > > users table as well - is that a fundamental requirement? > > I've written very similar django-to-ldap glue code to this, and what I > did was treat the

Re: Paginator Documentation

2006-02-02 Thread tonemcd
Thanks a lot! - that's just what I needed. Cheers, Tone

Re: Oracle support?

2006-02-02 Thread Jamison Roberts
Well if the free DB2 acts like the OS-390 version, then I want no part of it.  Unfortunately I have to deal with mainframe Db2 for my job, and it's no fun at all.  There is nothing easy to use about it.  One of our data warehouses has several Oracle 9iR2, and they are much easier to deal with.On 2/

Re: Oracle support?

2006-02-02 Thread Robert Hicks
IBM just released a lite free version of DB2 that has been specs than the Oracle version. I would use the Oracle version though because that is what I use at work. Robert

Re: ManyToMany: get_FOO_count() and get_FOO()

2006-02-02 Thread Adrian Holovaty
On 2/2/06, Jan Rademaker <[EMAIL PROTECTED]> wrote: > See this example: > http://www.djangoproject.com/documentation/models/many_to_many/ > > So how come the article objects in this example don't have a > get_publication_count() and get_publiction()? See Gary's comment as > well. Hey Jan, This i

Re: Do I use @login_required to extend authentication?

2006-02-02 Thread Jason Huggins
Hmm... Jason, your code is probably the "next logical step" for my hack. The following is the right link to your code, yes? -->http://www.carcosa.net/jason/blog/computing/django/authentication-2005-12-05-13-25.html -Jason

Re: Do I use @login_required to extend authentication?

2006-02-02 Thread Jason Huggins
>You do mention that every entry in LDAP must also exist in the > django users table as well - is that a fundamental requirement? Yes, it is a fundamental requirement for my "hack". I put "hack" in quotes because I fully admit that my patch is not a complete plug-in replacement for Django's user

Re: Using gettext_lazy in __repr__

2006-02-02 Thread Jan Rademaker
Are you sure? Because now it throws a NameError exception. global name 'gettext_lazy' is not defined I must say I'm rather new to Python and haven't got the faintest idea where to look when I get exceptions like this thrown at me. This is what I import at the top of my model: from django.core

ManyToMany: get_FOO_count() and get_FOO()

2006-02-02 Thread Jan Rademaker
The documentation states: "It doesn't matter which model gets the ManyToManyField, but you only need it in one of the models -- not in both." See this example: http://www.djangoproject.com/documentation/models/many_to_many/ So how come the article objects in this example don't have a get_publica

Re: Using gettext_lazy in __repr__

2006-02-02 Thread hugo
>Is it possible to use gettext_lazy in a model's __repr__ while using >the objects from a python shell (started with 'manage.py shell')? Yes, it should be possible - but you shouldn't use the "_" name, but use the original name. Not doing "from django.utils.translation import gettext_lazy as _" b

Re: SQL debugging

2006-02-02 Thread Jacob Kaplan-Moss
On Feb 2, 2006, at 1:48 PM, Luke Skibinski Holt wrote: Is is possible to access the SQL queries made as a template variable during any given page call? I've written a particularly ugly hack in order to use generic views and I'd like to see if it was all worth it ... Hey Luke -- This is in

Using gettext_lazy in __repr__

2006-02-02 Thread Jan Rademaker
Is it possible to use gettext_lazy in a model's __repr__ while using the objects from a python shell (started with 'manage.py shell')? When I try to do so I get the following error: Traceback (most recent call last): File "", line 1, in ? File "/var/home/j.rademaker/django/myproject/../mypro

SQL debugging

2006-02-02 Thread Luke Skibinski Holt
Is is possible to access the SQL queries made as a template variable during any given page call? I've written a particularly ugly hack in order to use generic views and I'd like to see if it was all worth it ... Luke Skibinski Holt

Re: Do I use @login_required to extend authentication?

2006-02-02 Thread Jason F. McBrayer
"tonemcd" <[EMAIL PROTECTED]> writes: > You do mention that every entry in LDAP must also exist in the django > users table as well - is that a fundamental requirement? I've written very similar django-to-ldap glue code to this, and what I did was treat the django User model as a cache of data i

Re: template ifequal

2006-02-02 Thread Luke Plant
On Thursday 02 February 2006 09:53, oggie rob wrote: > I don't think this is inconsistent. You normally put filters within > variables. I don't think you can put it within tags: Yes you can: >>> import django.template >>> django.template.Template('{% if var1|length_is:"0" %}You can use \ ... fi

[Job] Still looking for a Django developer

2006-02-02 Thread Jacob Kaplan-Moss
Hey folks -- We're still looking for a kick-ass Django developer to join our team here in Lawrence. You can read the full job info at http:// www.jacobian.org/2005/dec/07/job/, but here are some highlights: * You get to get paid to write Django apps, and even to hack on Django itself.

Re: template ifequal

2006-02-02 Thread scum
You have a good point about the consistancy. The `ifequal` should mimic the `if` as much as possible. I think a bug report may be called for in this case.

Re: Paginator Documentation

2006-02-02 Thread scum
#Sample Template # Uses django admin css file. # You'll need to modify the specific fields in the table, but that should be easy enough. # Hope you find this helpful. #== {# Ug

current module and app

2006-02-02 Thread Karsu
Is there any method or other way to get current module and module's app? I think one way could be parse it from url, but is there more elegant way?

admin stopped working at 2230

2006-02-02 Thread Kenneth Gonsalves
hi, i did the latest svn up to 2230. Admin stopped working and the error message doesnt give the line number for the error. This is the error message: TemplateSyntaxError at /births/admin/ Invalid block tag: 'endif' Request Method: GET Request URL:http://birbal.web/births/admin/ Ex

Re: generic view how to know if a field is recquired

2006-02-02 Thread coulix
ok thanks, i tried a similar thing to get the help admin part of a field to be display form.nom.formfield.help , doesnt seems to work.

Re: Error when relating a model to another model more than once

2006-02-02 Thread Rudolph
Thanks! That must be ticket 1305: http://code.djangoproject.com/ticket/1305 I'll just work around it for a while (until 'before too long') because the rest of Django fits all my needs! Rudolph

Re: generic view how to know if a field is recquired

2006-02-02 Thread James Bennett
On 2/2/06, Maniac <[EMAIL PROTECTED]> wrote: > form.nom.formfield.is_required Ha. Didn't know about that. I'm guessing, though it's not mentioned anywhere in the docs that you can do this (or at least, not anywhere that I've found), that it comes from the 'is_required' attribute set on the field

Re: generic view how to know if a field is recquired

2006-02-02 Thread Maniac
coulix wrote: hi, i am writting a generic create object view for my recipe model. i can get the form display well using this kind of code : Nom de la recette {{form.nom}} ect .., But is there a way of automatically checking if {{ form.nom }} is a recquired field ? (and therefore put a star ne

Re: generic view how to know if a field is recquired

2006-02-02 Thread James Bennett
On 1/31/06, coulix <[EMAIL PROTECTED]> wrote: > hi, i am writting a generic create object view for my recipe model. > i can get the form display well using this kind of code : Do you mean you're writing a view (which is Python code), or a template? I'm hoping you mean the latter and that you're u

Re: template ifequal

2006-02-02 Thread oggie rob
> This seems like a bug to me - certainly it is inconsistent behaviour between > {% if %} (where you can do 'var1|lower' etc) and {% ifeqaul %}. I would file > a bug report. I don't think this is inconsistent. You normally put filters within variables. I don't think you can put it within tags:

Re: generic view how to know if a field is recquired

2006-02-02 Thread coulix
do i have to hardcode it for every field ?