Re: Generic views in magic removal

2006-03-22 Thread Arthur
> I think I figured it out, your RegEx should be: > (?P\d+)/$ Ah, much better. I've looked at the completely wrong places. I still wonder a bit about the error message. Now it only complains about missing templates which I should be able to fix. Thanks so much Arthur

Re: Generic views in magic removal

2006-03-22 Thread limodou
On 3/23/06, Arthur <[EMAIL PROTECTED]> wrote: > > > I got it . You should pass the info_dict as **info_dict, but not > > info_dict directly. > > Thanks for your answer. I don't think you can do that inside tuples. > It throws a syntax error. > > Arthur Oh, I made a mistake. I'm sorry. -- I like

Re: Generic views in magic removal

2006-03-22 Thread limodou
On 3/23/06, Arthur <[EMAIL PROTECTED]> wrote: > > > The info_dict never gets implicitly passed -- it's always explicitly > > passed. We're removing the magic, not adding to it! :) > > > > But as for your question, it seems like you're getting that error > > because you're passing in 'queryset'

Re: Generic views in magic removal

2006-03-22 Thread Arthur
> The info_dict never gets implicitly passed -- it's always explicitly > passed. We're removing the magic, not adding to it! :) > > But as for your question, it seems like you're getting that error > because you're passing in 'queryset' twice. I've minimized the app to the bare minimum, but the

Re: Generic views in magic removal

2006-03-22 Thread Adrian Holovaty
On 3/22/06, Arthur <[EMAIL PROTECTED]> wrote: > > Your example you aren't passing in that info_dict you created. > > Thanks Max. That's what I tried first. But from the partially updated > tutorial in the mr branch docs and the error message > "object_detail() got multiple values for keyword

Re: Generic views in magic removal

2006-03-22 Thread Arthur
> > I'm trying to use generics on the magic removal trunc and I'm a bit at > > a loss because the queryset variable seems to get autoconverted to a > > string. The following urls.py always results in a "AttributeError: > > 'str' object has no attribute 'model'": > > > > from

Re: Generic views in magic removal

2006-03-22 Thread Max Battcher
Arthur wrote: > Hi all > > I'm trying to use generics on the magic removal trunc and I'm a bit at > a loss because the queryset variable seems to get autoconverted to a > string. The following urls.py always results in a "AttributeError: > 'str' object has no attribute 'model'": > > from

Generic views in magic removal

2006-03-22 Thread Arthur
Hi all I'm trying to use generics on the magic removal trunc and I'm a bit at a loss because the queryset variable seems to get autoconverted to a string. The following urls.py always results in a "AttributeError: 'str' object has no attribute 'model'": from django.conf.urls.defaults import *

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
Hi Thanks for your responses. Thats what I thought, just wanted to make sure. The all() just seems unitutive to me, but given that Djangos syntax is so easy, a little bit of something here and there is no biggie. Thanks again. PS I just posted a patch for the generic views on the developers

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 18:25, ChaosKCW wrote: > A dumb question, but will objects.all() cause any kind of performance > hit ? > > I mean when the code appends QuerySet.filter(pk=object_id), will it > condense that to a SQL statement that returns one object or reutrn > all obejcts then do

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
A dumb question, but will objects.all() cause any kind of performance hit ? I mean when the code appends QuerySet.filter(pk=object_id), will it condense that to a SQL statement that returns one object or reutrn all obejcts then do the PK query ? Thanks,

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 17:43, ChaosKCW wrote: > Just one question, I have used model.objects, not > model.objects.all(). It appears to work and makes more sense to me. > Any comments? Use model.objects.all() (at least for now). model.objects will work in some cases, but perhaps not in

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 17:47, ChaosKCW wrote: > Hi > > Is there some documentation on the "Sites" functionality. I have seen > it, but not seen any docs ? 'Site' in that example was a model in my own app -- there is a Django model of the same name, but I don't know that much about it.

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
Hi Is there some documentation on the "Sites" functionality. I have seen it, but not seen any docs ? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
Thanks, I had a look at the code and worked that out. Just one question, I have used model.objects, not model.objects.all(). It appears to work and makes more sense to me. Any comments? Thanks, Stephen --~--~-~--~~~---~--~~ You received this message because

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 16:58, ChaosKCW wrote: > Please can someone help. I am following Tutorial4 for generic views, > plus adapting it to the magic removal instructions on the wiki page. > As far as I can tell i followed the instructions exactly, But I get > an error stating that 'model'

Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
Hi Please can someone help. I am following Tutorial4 for generic views, plus adapting it to the magic removal instructions on the wiki page. As far as I can tell i followed the instructions exactly, But I get an error stating that 'model' is not a valid paremeter to the view. I am sure its