Re: Many Models, One Form with newforms?

2009-04-08 Thread robstar
Thanks a lot ! That worked great. I can't believe how easy it is to slam everything back into the db using the instance and prefix. Django ftw!! rob > > Just use them all side-by-side in your views and templates,   > potentially using prefixes > (http://docs.djangoproject.com/en/dev/ref/form

Many Models, One Form with newforms?

2009-04-08 Thread robstar
Hey guys, I'm working on a recipe engine and need to consolidate all the related models for one Recipe on one page for editing purposes... Suppose I have: model Recipe fk <-model Recipe Parts fk <- model Ingredients

Re: geodjango join problem

2008-09-05 Thread robstar
So it turns out MYSQL can't handle distance lookups... has anyone come up with a workaround to use mysql with geodjango for distance lookups?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: geodjango join problem

2008-09-03 Thread robstar
I forgot to paste it, but I did include objects = models.GeoManager() in my class. I also tried making a different object like geo_objects = models.GeoManager() and ran that from the shell to make sure I was invoking the right manager. I still get that same traceback ... any ideas?? On Sep 2,

Re: geodjango join problem

2008-09-02 Thread robstar
Oops, forgot to paste that in .. I've got that in there. On Sep 2, 6:29 pm, Justin Bronn <[EMAIL PROTECTED]> wrote: > > class Location(models.Model): > >   geo_loc         = models.PointField() > > > The thing that strikes me as strange is that the geomanager doesn't > > show up at all in the t

geodjango join problem

2008-09-02 Thread robstar
Hi guys, I just got geodjango installed and am trying to do a basic radius query as shown on the wiki. ver: Django-1.0-beta_2 class Location(models.Model): geo_loc = models.PointField() This is the example: from django.contrib.gis.geos import * from suitengine.models import Locatio

Re: order_by foreign key problem

2008-05-30 Thread robstar
ethod recursively prepopulates the > cache of all one-to-many relationships ahead of time. > > Try to do it without the select_related to see if you can get the query to > execute. I know this will mean an additional hit on the db to access the > related model, but I can't think

Re: order_by foreign key problem

2008-05-29 Thread robstar
on/db-api/ > contains the info you want. Try this: > Gear.objects.select_related().order_by('generic_info__hits') > > you could also set the order_by in the Meta of Item to hits and then you > could just do: > Gear.objects.select_related().order_by('generic_info'

Re: order_by foreign key problem

2008-05-29 Thread robstar
on/db-api/ > contains the info you want. Try this: > Gear.objects.select_related().order_by('generic_info__hits') > > you could also set the order_by in the Meta of Item to hits and then you > could just do: > Gear.objects.select_related().order_by('generic_info'

order_by foreign key problem

2008-05-29 Thread robstar
Hey guys, I read through some of the threads here, but still can't get this simple scenario to work.. DB name: gcdb class Item(models.Model): hits= models.IntegerField(default=0) class Gear(models.Model): generic_info= models.OneToOneField(Item) Should this work?? res

Re: Multiple validation error handling in clean()

2008-02-14 Thread robstar
That worked ! I like that solution much better too! Thanks for your help. Rob On Feb 14, 2:14 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-02-14 at 10:54 -0800, robstar wrote: > > Thanks Malcolm, I'll try it out. > > > Some of this feels ki

Re: Multiple validation error handling in clean()

2008-02-14 Thread robstar
Thanks Malcolm, I'll try it out. Some of this feels kind of hack'ey what's the correct, clean way to do this kind of processing with newforms?? Rob On Feb 14, 1:49 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-02-14 at 10

Re: Multiple validation error handling in clean()

2008-02-14 Thread robstar
Error(error_list) return self.cleaned_data How does this function know to associate 'Captcha error' with captcha ? and how do I reference it in the template? Thanks. Rob On Feb 14, 1:09 pm, robstar <[EMAIL PROTECTED]> wrote: > Hi guys, > > I'm working

Re: Multiple validation error handling in clean()

2008-02-14 Thread robstar
Oops, I found some info in search this might answer my question .. thanks anyway ! :) rob On Feb 14, 1:09 pm, robstar <[EMAIL PROTECTED]> wrote: > Hi guys, > > I'm working my way through the newforms and it's pretty cool.. but I'm > stumped on the

Multiple validation error handling in clean()

2008-02-14 Thread robstar
Hi guys, I'm working my way through the newforms and it's pretty cool.. but I'm stumped on the error message handling from clean(). I want to check the CAPTCHA input on the page (2 fields) as well as if the password fields match and return the error for each problem independently. clean() is sup