FreeComments + Comments view

2007-07-26 Thread mikeyparker

Hi All I was just wondering if anybody else had tackled this problem.

We're using the contrib.comments app and we have a need to combine
both FreeComments and Comments together in a single view. We've got
the site set up so that if a registered user is logged in and they
make a comment it is a Comment and an unregistered user when they post
its posted as a FreeComment. That part works fine. Now what we'd like
to do is create a view that combines these two models into one view
sorted by date. I've had a look through the database docs but can't
see how to make a query that returns two *unrelated* models as a
single queryset.

Any help would be much appreciated.

Thanks Mike


--~--~-~--~~~---~--~~
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 to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: GeoDjango Admin interface - Invalid HEX given!

2007-05-30 Thread mikeyparker

Cheers for the heads up

On 27 May, 15:52, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 5/23/07, mikeyparker <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm just moving an application that we were writing over to the
> > GeoDjango branch
>
> FYI, I'm woefully behind on merging that branch up to trunk.
>
> I really need to do that.
>
> Please take a look at the backwards-incompatible changes list since 0.96 
> here:http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
>
> If any of those will cause you trouble, be careful updating the branch 
> checkout.
>
> Cheers,
>   Jeremy


--~--~-~--~~~---~--~~
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 to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: GeoDjango Admin interface - Invalid HEX given!

2007-05-27 Thread mikeyparker



On 25 May, 02:37, Justin Bronn <[EMAIL PROTECTED]> wrote:
> > I'm just moving an application that we were writing over to the GeoDjango 
> > branch
>
> Welcome!

Thanks

>
> >  However I am unable to add a new one using the admin ...
> >  when attempting to create a new instance.
>
> You found a bug in WKTField -- good catch.
>
> > Any help would be much appreciated. Thanks
>
> It has been fixed in r5336.

That's great. Thanks Justin.

>
> Regards,
> -Justin


--~--~-~--~~~---~--~~
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 to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



GeoDjango Admin interface - Invalid HEX given!

2007-05-23 Thread mikeyparker

I'm just moving an application that we were writing over to the
GeoDjango branch and I've come across a small problem that I was
hoping that someone may be able to shed a little light on.

I have a model

class CityArea(models.Model, models.GeoMixin):

name = models.CharField(blank=False, maxlength=100, core=True)
city = models.ForeignKey('City')
poly = models.PolygonField(blank=True)

objects = models.GeoManager()

And I can interact with and create instances of this model using the
shell interface:

ca = CityArea(name='Jesmond', city=c, poly='POLYGON(( 10 10, 10 20, 20
20, 20 15, 10 10))')
ca.save()

This works fine. However I am unable to add a new one using the admin
interface. I can however edit those that are already created. So the
above example becomes available in the admin interface and I can
happily use the interfaces functionality to manipulate it. Like I said
the problem only occurs when attempting to create a new instance. When
ever I try this I get the following error:

Request Method: GET
Request URL:http://0.0.0.0:8000/admin/properties/cityarea/add/
Exception Type: GEOSException
Exception Value:Invalid HEX given!
Exception Location: /sw/lib/python2.5/site-packages/django/contrib/gis/
geos/GEOSGeometry.py in __init__, line 143

Any help would be much appreciated. Thanks

Mike


--~--~-~--~~~---~--~~
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 to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---