Re: django server tree organization

2006-07-30 Thread [EMAIL PROTECTED]
Guillermo Fernandez Castellanos wrote: > Hi, > of course ,the second model is better,the first one is too much confused > I've seen this subject several times in the mailing lists without > being able to find a definite/useful answer in the mailing list. > > I'm going to have a server with

Re: TEMPLATE_CONTEXT_PROCESSORS

2006-07-30 Thread Rares Vernica
Hi, I written my own views. How can I pass a RequestContext objects, instead of a plain Context object, from my view to my template? Thanks a lot, Ray Ian Clelland wrote: > On 7/24/06, Rares Vernica <[EMAIL PROTECTED]> wrote: >> The goal is to have request.META.PATH_INFO in templates. >> >>

Re: Database API question: I am not able to return a QuerySet

2006-07-30 Thread SmileyChris
How about just making the query like this: A.objects.filter(b__status=1) --~--~-~--~~~---~--~~ 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

editable=False and "Could not find Formfield or InlineObjectCollection named ..."

2006-07-30 Thread Corey
When I set editable=False in a model and modify the "fields" attribute of the Admin class, a "Could not find Formfield or InlineObjectCollection named ..." is generated. Removing the editable=False makes it work again. Is this a bug, or working as it is supposed to? Thanks, Corey

Database API question: I am not able to return a QuerySet

2006-07-30 Thread Suriya
Hi all, I have a situation here where I do not know how to use the filter() function in the database API to obtain a QuerySet. I am describing the schema and what I have done, below. I hope you have an answer to my question. # Only the necessary fields are shown here class A(models.Model):

Re: app specific admin changes

2006-07-30 Thread Tamara D. Snyder
This is what I thought, but where do I put these files? Directly in my project directory? In a project/templates/admin directory? Directly in my application directory? In my application/templates directory? In an application/templates/admin directory? In an

Re: Empte XXX__in queries with postgres

2006-07-30 Thread Russell Keith-Magee
On 7/31/06, Neilen Marais <[EMAIL PROTECTED]> wrote: Is this considered to be a bug, or must I simply live with it?I'd call inconsistency between database platforms a bug. If you would log this, we would be much obliged.Thanks, Russ Magee %-) --~--~-~--~~~---~--~~

Re: non date-based detail pages: previous/next?

2006-07-30 Thread Ian Holsman
you might want to do this 'work' when the user actually requests the page in question, not when you generate the one he is looking at.for example have 2 views defined in urls.pygetnext/(object-id)/getprev/(object-id)/and have these 2 views do the calculation on what is 'next' and issue the 301

Re: non date-based detail pages: previous/next?

2006-07-30 Thread SmileyChris
jcb wrote: > I have a page that lists a bunch of Geolocation objects (using the > generic view list, works great.) I have a detail page > (django.views.generic.list_detail.object_detail) that works great the > same way...displaying one geolocation (with a tiny Google map, nice.) Perhaps the

Re: Simplifying template?

2006-07-30 Thread SmileyChris
Something like the following would be neat: {{ s.teachers|loop:"userinfo.informal_name"|join:"; " }} I thought of using python's "map" as the filter name but "loop" is probably be a more generic term. How I imagine the filter would look: def loop(value, arg): # TODO: do some test to ensure

app specific admin changes

2006-07-30 Thread Tamara D. Snyder
Hi All, I am relatively new to Django, but I am enjoying trying to get my first application working. My question today is about application specific changes to the Admin. For instance, my project is full of little test applications (blog1, blog2, places, events). I would like the

Empte XXX__in queries with postgres

2006-07-30 Thread Neilen Marais
Hi I fairly often have code that looks like Model.objects.filter(id__in=some_list) where some_list is generated programatically. Sometimes some_list is empty, and if it is, I get a psycopg.ProgrammingError exception. OTOH if I use SQLite I simply get back an empty query-set as expected. Is

non date-based detail pages: previous/next?

2006-07-30 Thread jcb
Okay, I've scoured the fine, fine documentation, and, well, nothing. I have a page that lists a bunch of Geolocation objects (using the generic view list, works great.) I have a detail page (django.views.generic.list_detail.object_detail) that works great the same way...displaying one

django server tree organization

2006-07-30 Thread Guillermo Fernandez Castellanos
Hi, I've seen this subject several times in the mailing lists without being able to find a definite/useful answer in the mailing list. I'm going to have a server with several domain names serve a few applications (blog, photo gallery,...). But I'm a bit at a loss when dealing with how to

Re: rss feed, unique_id

2006-07-30 Thread Wiktor Grębla
Wiktor Grêbla napisa³(a): I've an impression that this message was not delivered to the list, although google finds it... > I was trying to add an rss feed with blog comments, and I'm mostly done, > here are some snippets i pasted on irc this morning: > > http://paste.e-scribe.com/934/ > > The

RE: Scandinavian characters in .po files and timezones

2006-07-30 Thread Mikko Nylén
Thanks for all answers. I was able to fix the problem by starting over with the django.po. May be the problem was that when I did start working with the file, I didn't have set encoding=utf-8 and when I turned it on in the middle, Vim didn't convert the characters to UTF-8. - Mikko Nylén

Re: Class variables in mod_python

2006-07-30 Thread [EMAIL PROTECTED]
Adrian Holovaty wrote: [...] > You could use the cache framework to store stuff in there temporarily. > Alternatively, I don't think it's a huge problem to store that in the > database. Thanks for your quick response! Good to know that at least I was on the right track as to what my problem was.

Re: Class variables in mod_python

2006-07-30 Thread Adrian Holovaty
On 7/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > This works fine in the development server. Under mod_python, though, it > appears that these class variables don't work (getRequest doesn't > return what I've previously put in via newRequest). Is there a > difference wrt class variables

Re: Simplifying template?

2006-07-30 Thread Adrian Holovaty
On 7/29/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > Is there any way to make the following any simpler? It's inside > another {% for ... %}, so the ugliness is particularly jarring. > > {% for t in s.teachers %} > {{ t.userinfo.informal_name }}{% if not forloop.last %}}; {{% endif %}} > {%

Class variables in mod_python

2006-07-30 Thread [EMAIL PROTECTED]
Hi. I've built a password reset mechanism for my application using class variables to store random passwords which are later used to authorize password resets. Here's what I'm using: # Speichert Passwortanfragen und gibt sie bei Bedarf zurück class PasswordRequest: requests = {} def

Re: Scandinavian characters in .po files and timezones

2006-07-30 Thread Jean-Francois Roy
On Jul 30, 2006, at 08:08, Mikko Nylén wrote: Also, I'd like to ask how different timezones should be handled? I'm building an application where it would be necessary for the users to be able to choose their own timezone to display date and time information correctly. One option would be,

Re: Scandinavian characters in .po files and timezones

2006-07-30 Thread Ian Clelland
On 7/30/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > I don't know much about Vim, but it appears your ö and ä are entered > with an encoding different than UTF-8. Python then tries to decode > your characters thinking they might be valid UTF-8, but they are not, > so it raises the

Re: Scandinavian characters in .po files and timezones

2006-07-30 Thread Antonio Cavedoni
On 30 Jul 2006, at 14:08, Mikko Nylén wrote: > I tried to change all 'ä's with \xe4 and 'ö's with \xf6 and with > those I was > able to make the messages compile. However, when trying to launch the > built-in server, I get error saying "UnicodeDecodeError: 'utf8' > codec can't > decode bytes

rss feed, unique_id

2006-07-30 Thread Wiktor Grębla
Hi. I was trying to add an rss feed with blog comments, and I'm mostly done, here are some snippets i pasted on irc this morning: http://paste.e-scribe.com/934/ The problem is that i'd like to have unique_id for each item (comments don't have unique links, as they're "attached" to the blog

POST MATRIMONY MESSAGE/PROFILE FREE & JOBS/RESUMES FREE

2006-07-30 Thread chetana.jobs
Post Matrimony Message/Profile FREE only on http://www.net4matrimonials.com -- -- -- Post jobs/resumes FREE only on http://www.net4professionals.com

Re: Django vs TurboGears

2006-07-30 Thread Jeroen Ruigrok van der Werven
On 7/30/06, gabor <[EMAIL PROTECTED]> wrote: > what is JASON? > (or the original poster misspelled json?) http://www.json.org/ JSON (JavaScript Object Notation) is a lightweight data-interchange format. Good chance simplejson will make it to Python 2.6. -- Jeroen Ruigrok van der Werven

Re: Django vs TurboGears

2006-07-30 Thread gabor
Elver Loho wrote: > >> Django doesn't use AJAX while TG uses Mochikit and JASON. > > ...and what stops you from using Mochikit and JASON with Django? It's > like saying that you can't order ice-cream at McDonald's, because it's > not part of the Happy Meal you're eating. > (after several

Scandinavian characters in .po files and timezones

2006-07-30 Thread Mikko Nylén
Hi!, I would like to use internationalization features provided by Django, but I'm having some issues when dealing with Scandinavian characters 'ä', 'ö' and 'å'. If I enter such characters in django.po and try to compile the messages, it tells me that there is an invalid byte sequence wherever

Re: Template widget size

2006-07-30 Thread Nagy Károly
Steven Armstrong írta: >Instead of writing a patch, I've extended/wrapped djangos model and form >fields. This way you can update django without having to reapply patches. > >You can find the code and instructions under [1]. > >Just for the record. I'm totally with Malcolm that this is not a

Re: psycopg2

2006-07-30 Thread Tom Tobin
On 7/30/06, Vance Dubberly <[EMAIL PROTECTED]> wrote: > postgresql_psycopg2 > > Yes I found it. Yes I know it's not supported . But could somebody tell me > how to tell it to shut up? My eyes are bleeding! :) The debug output is > just a little overwhelming and quite useless unless you are the