Re: extra_context weirdness

2006-05-16 Thread Jay Parlar
On 5/16/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > One reason for not making the arguments always be evaluated is that in > the current setup, you have ways to do both things: evaluate prior to > render or evaluate once at import. If QuerySets were always called, you > would lose the

Re: extra_context weirdness

2006-05-16 Thread Malcolm Tredinnick
On Tue, 2006-05-16 at 22:28 -0400, Jay Parlar wrote: > I'm experiencing some odd behaviour with the 'extra_context' field > used by the generic views. > > I have an 'info_dict' in my urls.py that I *want* to define like this: > > info_dict = { > 'queryset': Post.objects.all(), >

Re: Many to Many challenges

2006-05-16 Thread Chris Moffitt
> Is your house built on an old burial ground? Because I'm willing to > entertain the possibility your computer might be possessed. :-) > > Hmm. Sometimes it's seems so but I'm pretty sure that's not the case. ;) > How are you running the webserver? Via 'manage.py runserver' or some > other

Re: There is no v0.92 or v0.95 release of Django

2006-05-16 Thread Malcolm Tredinnick
Hi Todd, On Tue, 2006-05-16 at 22:06 -0400, Todd O'Bryan wrote: > Given that the Documentation directs people to the download page to > download something that doesn't exist, it might be worth it to either: > a. update the documentation to reflect the fact that the release is > not currently

extra_context weirdness

2006-05-16 Thread Jay Parlar
I'm experiencing some odd behaviour with the 'extra_context' field used by the generic views. I have an 'info_dict' in my urls.py that I *want* to define like this: info_dict = { 'queryset': Post.objects.all(), 'date_field': 'date', 'extra_context':

Re: Many to Many challenges

2006-05-16 Thread Chris Moffitt
> Cutting and pasting your code into a clean project directory with the > same Django code revision as yours, this all works for me. So, as you > suspect, the problem is not with your code as written. > > Can you try the same experiment: start a new app and cut and paste the > code as written

Download page out of date

2006-05-16 Thread Todd O'Bryan
While it's great that the documentation has been updated to 0.92 (or 0.95 or whatever), it'd be nice to be able to download that version. :-) Todd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: There is no v0.92 or v0.95 release of Django

2006-05-16 Thread Todd O'Bryan
Given that the Documentation directs people to the download page to download something that doesn't exist, it might be worth it to either: a. update the documentation to reflect the fact that the release is not currently there, b. create a beta release for people to use, or c. choose some other

Re: Download page out of date

2006-05-16 Thread James Bennett
On 5/16/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > I just checked in Subversion and it looks like version 0.92 or 0.95 > was never tagged as a release version. Is that correct? That is correct. When the magic-removal branch was merged into the main Django trunk, Adrian announced that once

Re: Many to Many challenges

2006-05-16 Thread Malcolm Tredinnick
On Tue, 2006-05-16 at 20:13 -0500, Chris Moffitt wrote: [...] > I created a brand new app from scratch (including a new MYSQL database) > copied just my models.py file over, typed the code and got the same result! > > I even tried the suggestion of clearing out all of the old .pyc files > and

There is no v0.92 or v0.95 release of Django

2006-05-16 Thread Russell Keith-Magee
On 5/17/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: I just checked in Subversion and it looks like version 0.92 or 0.95was never tagged as a release version. Is that correct?Yes. This is correct.Just to make this perfectly clear, and head off the confusion that seems to be reigning: The only

Re: There is no v0.92 or v0.95 release of Django

2006-05-16 Thread Douglas Campos
agreed :) On 5/16/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 5/17/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > > > I just checked in Subversion and it looks like version 0.92 or 0.95 > > was never tagged as a release version. Is that correct? > > Yes. This is correct. > > Just

Re: Best way to do a dynamic sidebar?

2006-05-16 Thread Malcolm Tredinnick
Hi Jay, On Tue, 2006-05-16 at 17:24 -0400, Jay Parlar wrote: > As an example, say I'm building a blogging app, and I want a right > sidebar that always shows the last X post titles. What's the best way > to template this? > > I've though of something like the following in a base.html: > > >

Re: Download page out of date

2006-05-16 Thread Todd O'Bryan
I just checked in Subversion and it looks like version 0.92 or 0.95 was never tagged as a release version. Is that correct? On May 16, 2006, at 9:05 PM, Todd O'Bryan wrote: > > While it's great that the documentation has been updated to 0.92 (or > 0.95 or whatever), it'd be nice to be able to

Re: Transactions and model.save()

2006-05-16 Thread Elver Loho
On 5/17/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 5/16/06, Elver Loho <[EMAIL PROTECTED]> wrote: > > Let's take the poll sample. We've got the vote() view going on. > > > > choice.votes += 1 > > choice.save() > > > > Suppose we've got thread1 and thread2 going on (high-load website):

Re: going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-05-16 Thread gabor
gabor wrote: > > for example, with the reverse_lookup test models, this query fails: > > >>> User.objects.get(poll__question__exact="What's the first question?") > Traceback (most recent call last): >File "", line 1, in ? >File "/Users/gabor/src/django/django/db/models/manager.py",

Re: Transactions and model.save()

2006-05-16 Thread Adrian Holovaty
On 5/16/06, Elver Loho <[EMAIL PROTECTED]> wrote: > Let's take the poll sample. We've got the vote() view going on. > > choice.votes += 1 > choice.save() > > Suppose we've got thread1 and thread2 going on (high-load website): > > choice.votes is originally 16 > > thread1.choice.votes += 1 >

going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-05-16 Thread gabor
hi, (from-svn (today) django), postgres reverse-lookups on foreign keys does not work for me. i even created a new empty project, and copied the example models from: http://www.djangoproject.com/documentation/db_api/ into it, and tried the example reverse-query, and it did not work :-( then

Best way to do a dynamic sidebar?

2006-05-16 Thread Jay Parlar
As an example, say I'm building a blogging app, and I want a right sidebar that always shows the last X post titles. What's the best way to template this? I've though of something like the following in a base.html: {% block sidebar %} {% last_posts_list %} {% endblock %} Where

Re: Dreamhost - does anyone know a better webhosting?

2006-05-16 Thread Phil Powell
I have been hosted with these guys: http://www.bytemark.co.uk/ for quite some time. I started out with them when they were a young startup, and I can highly recommend them if you're looking for "full control" solution. They are a UK-based company, and they provide a very reliable "Virtual

Re: Many to Many challenges

2006-05-16 Thread [EMAIL PROTECTED]
If you haven't done it already be sure to try this: http://www.mail-archive.com/django-users@googlegroups.com/msg06631.html It's a problem with svn updates leaving old .pyc files lying around. I noticed strange problems a couple of times that were fixed with this, so now I do it routinely after

Re: Why django return pages with not webserver running?

2006-05-16 Thread [EMAIL PROTECTED]
Ok. This was the problem: 1- A anterior instance of the webserver was in memory. This happend when I try to debug it from Komodo (I don't know that is not possible, or at least, is not simple). That mean that I run another instance of it and get 2 separate responses, depending if I let it open

Re: Accessing an element in a list inside a dictionary

2006-05-16 Thread Adrian Holovaty
On 5/16/06, Facundo Casco <[EMAIL PROTECTED]> wrote: > Hi, I have this structure provs = {'0134': ['PSM', 0], '0135': ['GRAN', > 0]} that I need to access from a template. > [...] > what I need is > > 0134 PSM 0 This should do the trick: {% for prov in provs.items %} {{ prov.0 }} {{ prov.1.0 }}

Re: Accessing a field's upload_to strftime

2006-05-16 Thread Waylan Limberg
On 5/16/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > > On 5/16/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > > > Jay Parlar wrote: > > > > >Hmm... So let me get this straight... When someone does an upload via > > >my form, Django *temporarily* stores it in my uploads directory, with > > >the

Re: For what is useful order_with_respect_to?

2006-05-16 Thread Rudolph
Hi, This question is yet unsolved (for me). Does "order_with_respect_to" have a widget in the admin interface (nothing seems to change). And does it have an API, something like: object.move_up() object.move_down() object.move_first() object.move_last(). And when I delete an item, the bigger

Re: Problems with ForeignKey in magic-removal

2006-05-16 Thread Luke Plant
On Tuesday 16 May 2006 02:48, Malcolm Tredinnick wrote: > Thinking out loud a bit here, more as a reminder to myself: but I > wonder _why_ this worked? If you have no __str__ method, it will fall > back to __repr__, so you should have been seeing the same output > regardless. Are we stomping on

Accessing an element in a list inside a dictionary

2006-05-16 Thread Facundo Casco
Hi, I have this structure provs = {'0134': ['PSM', 0], '0135': ['GRAN', 0]} that I need to access from a template. What I have in the template is: {% for prov in provs %} {{prov}} {{prov.0}} {{prov.1}} {% endfor %} it outputs 0134 0 1 what I need is 0134 PSM 0 Can someone tell me what

Re: multi-auth branch

2006-05-16 Thread Douglas Campos
exactly, thanx english isn't my first language, sorry. Perhaps we'll have group and user ldap storage? :) On 5/16/06, gabor <[EMAIL PROTECTED]> wrote: > > Joseph Kocherhans wrote: > > On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > >> the multi-auth branch targets some kind of 100%

Re: multi-auth branch

2006-05-16 Thread Joseph Kocherhans
On 5/16/06, gabor <[EMAIL PROTECTED]> wrote: > > Joseph Kocherhans wrote: > > On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > >> the multi-auth branch targets some kind of 100% external auth? because > >> i've seen some approach using ldap+django users > > > > I'm not sure what you mean

Re: multi-auth branch

2006-05-16 Thread gabor
Joseph Kocherhans wrote: > On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: >> the multi-auth branch targets some kind of 100% external auth? because >> i've seen some approach using ldap+django users > > I'm not sure what you mean by "100% external" but the backends that > get used are

Re: Accessing a field's upload_to strftime

2006-05-16 Thread Ivan Sagalaev
Jay Parlar wrote: >Alright, let me see if I understand it this time: If you upload a file >that's already been uploaded, then Django will lose the association to >the old one, and it will essentially be sitting orphaned on the disk? > > Exactly. >For my use case, I actually want to keep every

Re: Best practice for separating Model and Control?

2006-05-16 Thread Jacob Kaplan-Moss
On May 16, 2006, at 8:25 AM, Bill de hÓra wrote: > Which is to say in Java land we used to start with manager classes and > wish for generic DB APIs (like, we did that for *years*, until > Hibernate/Ibatis came along). I've never seen any interesting db- > backed > app not need to go round

Re: multi-auth branch

2006-05-16 Thread Joseph Kocherhans
On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > the multi-auth branch targets some kind of 100% external auth? because > i've seen some approach using ldap+django users I'm not sure what you mean by "100% external" but the backends that get used are controlled by the

Re: multi-auth branch

2006-05-16 Thread Douglas Campos
the multi-auth branch targets some kind of 100% external auth? because i've seen some approach using ldap+django users On 5/16/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > > Does anyone have news about it? progress, etc > > The

Re: Using existing database shema

2006-05-16 Thread Michael Radziej
Joseph Kocherhans wrote: > On 5/16/06, Filipe <[EMAIL PROTECTED]> wrote: >> Do you think I'll find difficulties in using model classes with my own >> data persistency logic? In such case, will I loose other features >> besides the ORMapping itself? (I've read something about loosing >>

Re: Accessing a field's upload_to strftime

2006-05-16 Thread Jay Parlar
On 5/16/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > Jay Parlar wrote: > > >Hmm... So let me get this straight... When someone does an upload via > >my form, Django *temporarily* stores it in my uploads directory, with > >the "_" at the end of the filename, right? > > > No. It tries to save

Re: Using existing database shema

2006-05-16 Thread Joseph Kocherhans
On 5/16/06, Filipe <[EMAIL PROTECTED]> wrote: > Do you think I'll find difficulties in using model classes with my own > data persistency logic? In such case, will I loose other features > besides the ORMapping itself? (I've read something about loosing > autogenerated admin pages, form

Dreamhost - does anyone know a better webhosting?

2006-05-16 Thread PythonistL
I have been using Dreanhost for share webhosting service for a few months already but I found out it is very unreliable. If there is a higher traffic my site goes down. From the beginnig I was happy - no problem - but now when more users come to my site - problems repeat all over and over again.

Re: How to prevent a page from being cached?

2006-05-16 Thread PythonistL
Malcom, thank you for the reply L. --~--~-~--~~~---~--~~ 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 group, send email

Re: multi-auth branch

2006-05-16 Thread Joseph Kocherhans
On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > Does anyone have news about it? progress, etc The implementation is pretty much finished and committed. I have most of the docs written, but I still need to review and commit them. Someone has already written an LDAP backend and posted it

Re: Best practice for separating Model and Control?

2006-05-16 Thread Bill de hÓra
lcaamano wrote: > We're not using Django yet but I think I have a good idea of how we'd > use it in our framework. I'll try to summarize that in a few > paragraphs, which hopefully will give you another idea of how to deal > with the problem you present. > > We use two modules per table, one

multi-auth branch

2006-05-16 Thread Douglas Campos
Does anyone have news about it? progress, etc thnx Douglas --~--~-~--~~~---~--~~ 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

i18n

2006-05-16 Thread Elver Loho
Is there a way to chain languages in the i18n interface? We're using a custom Interchange tag right now to do i18n in our webstore. We support Estonian, Latvian, Lithuanian, Russian, and English. The language chaining goes something like this: if locale is estonian: print i18n(message,

Re: Subclassing question

2006-05-16 Thread frank h.
I just migrated to m-r having used inheritance in my models. I was seeing this behaviour http://groups.google.com/group/django-users/browse_frm/thread/13a94a5ac9b5ff8a/f6fbcdd419ddf89e?q=page+not+found=1#f6fbcdd419ddf89e only when I stumbled across your comment, did I realize that m-r does not

Re: dynamic templates for form fields

2006-05-16 Thread Alexandre CONRAD
> Scaffold Script maybe useful to you: > http://code.djangoproject.com/wiki/ScaffoldScript At a first glance, this pretty much looks like what I need. I'll try it out. > anyway I suggest looking at generic views, they make append\update easy. > I found this tutorial useful: >

Re: Transactions and model.save()

2006-05-16 Thread Michael Radziej
Elver Loho wrote: > Hiya! > > Someone raised this question in the comments of the 4th tutorial and > it's been bugging me to no end. > > Let's take the poll sample. We've got the vote() view going on. > > choice.votes += 1 > choice.save() > > Suppose we've got thread1 and thread2 going on

Re: Using existing database shema

2006-05-16 Thread Filipe
I fear to get into trouble if I choose to use inspectdb, there are a lot of composited primary keys and many-to many-relations in this DB (I know that the ORM in Django supports m-to-m relations, but knowing it is usually a sensible point in ORMs, I would prefer not to use an ORM just yet).

Re: ManyToManyField reverse lookup not working

2006-05-16 Thread der . elminator
Hi Phil, I was already using the "new" syntax - so that wasn't the source of my problem. Honestly i still don't know the cause of the problem but by today it resolved by itself. Suddenly my objects contain the correct methods... I updated my trunk revision to latest (2917 as i write), that's

Re: Limiting selection in admin pages [NEWBIE]

2006-05-16 Thread Michael Radziej
[EMAIL PROTECTED] wrote: > I came across this in Django's documentation: > (http://www.djangoproject.com/documentation/model_api/#many-to-one-relationships) > > (...) > limit_choices_to: > A dictionary of lookup arguments and values (...)that limit > the available admin choices for this

Transactions and model.save()

2006-05-16 Thread Elver Loho
Hiya! Someone raised this question in the comments of the 4th tutorial and it's been bugging me to no end. Let's take the poll sample. We've got the vote() view going on. choice.votes += 1 choice.save() Suppose we've got thread1 and thread2 going on (high-load website): choice.votes is

Re: Limiting selection in admin pages [NEWBIE]

2006-05-16 Thread [EMAIL PROTECTED]
I came across this in Django's documentation: (http://www.djangoproject.com/documentation/model_api/#many-to-one-relationships) (...) limit_choices_to: A dictionary of lookup arguments and values (...)that limit the available admin choices for this object. Instead of a dictionary this

Re: ManyToManyField reverse lookup not working

2006-05-16 Thread Phil Powell
It may not be exactly related to the problem you're having, but worth checking: I was having some difficulty checking the right syntax for use when referencing many-to-many fields recently, and noticed that the syntax has changed from what is currently documented. You can find a chart

Re: Many to Many challenges

2006-05-16 Thread der . elminator
Hi, I am experiencing exactly the same error with the same trunk revision (2909). On irc no-one could really reproduce my django's behavior... I posted yesterday on this list (topic: "ManyToManyField reverse lookup not working"), but still don't have no clue why it doesn't work for me. Looking

Re: Question about cache

2006-05-16 Thread Axel Steiner
Hi, > Yes. Have a look at this post from Adrian: > http://groups.google.com/group/django-users/browse_frm/thread/500d8cebe1f0c4e1/751e204668a0fdca?q=caching+questions=1#751e204668a0fdca > > He describes how URLs are stored in the cache and how to invalidate > them. The original poster in that

Re: ManyToManyField reverse lookup not working

2006-05-16 Thread der . elminator
Hello Gunnar, I am sorry, that was kind of a copy error -- in my model names maxlength is correctly set and it validates without errors. I still have no clue why no reverse lookup methods are added. derelm --~--~-~--~~~---~--~~ You received this message because

Re: Limiting selection in admin pages [NEWBIE]

2006-05-16 Thread tonemcd
Good question - short answer is it's not anything I tried to do, so I don't know... Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Limiting selection in admin pages [NEWBIE]

2006-05-16 Thread [EMAIL PROTECTED]
Hi guys, Sidestep question about 'limit_choices_to': is it possible to limit choices of a foreign key according to the value of another field in my model? In your example, the value 'Administration' is hard-coded... Thanks. > > Sorry Q, > I forgot to add the WorkGroup definition; > > class

Re: dynamic templates for form fields

2006-05-16 Thread viestards
Hi! Scaffold Script maybe useful to you: http://code.djangoproject.com/wiki/ScaffoldScript anyway I suggest looking at generic views, they make append\update easy. I found this tutorial useful: http://www.postneo.com/2005/08/17/django-generic-views-crud On 5/15/06, Alexandre CONRAD <[EMAIL

Re: ManyToManyField reverse lookup not working

2006-05-16 Thread Gunnar Wegner
Hello, I cannot validate your model (python manage.py validate) since the Tag's name has no maxlength. What happens if you add it? Gunnar Am Montag, 15. Mai 2006 18:49 schrieb [EMAIL PROTECTED]: > hi, > > i am using this set of models: > # -*- encoding: utf-8 -*- > from django.db import

Re: Limiting selection in admin pages [NEWBIE]

2006-05-16 Thread tonemcd
Sorry Q, I forgot to add the WorkGroup definition; class WorkGroup(models.Model): groupName = models.CharField(maxlength=50) def __str__(self): return "%s" % self.groupName That's where the 'groupName' is coming from in my lookup. I'm using rev 2900 (ie the merged MR trunk) so

Re: admin app doesnt work after m-r migration

2006-05-16 Thread frank h.
thanks malcolm, I had prepared the necessary database changes in a script a while ago turns out the documentation has changed since then... :-) following the steps in the updated http://code.djangoproject.com/wiki/RemovingTheMagic#Databasechangesyoullneedtomake and everything works!! thanks,

Re: admin app doesnt work after m-r migration

2006-05-16 Thread Malcolm Tredinnick
On Tue, 2006-05-16 at 00:21 -0700, frank h. wrote: > Hi I just migrated to magic-removal and everything seems fine (my views > work etc) When you say you "migrated to magic-removal", did you also follow the database change insructions on this page:

admin app doesnt work after m-r migration

2006-05-16 Thread frank h.
Hi I just migrated to magic-removal and everything seems fine (my views work etc) ...except that when I try to login into the admin app, I get an error about OperationalError at /admin/ (1054, "Unknown column 'django_content_type.model' in 'field list'") Request Method: GET Request URL: