Re: GAE+Django+Threaded comments

89 views
Skip to first unread message

Javier Guerra Giraldez

unread,
Dec 5, 2012, 9:00:20 AM12/5/12
to django...@googlegroups.com
On Wed, Dec 5, 2012 at 3:04 AM, JG <jurga...@gmail.com> wrote:
> I found a lot of examples on the internet, but the thing is - I am also
> working with Google App Engine.

(disclaimer, i haven't developed on GAE, I've just read the specs a few times)

yes, that's a problem. In your specific example, the tutorial you
link uses Django-mptt, which uses aggregates, which aren't supported
by the datastore in GAE.

so, I see only three solutions:

- keep searching for a GAE-specific example. I'm sure somebody
somewhere has done threaded comments on GAE...

- switch from datastore to Google Cloud SQL. it's supposed to be
MySQL-compatible, so the Django ORM should work, no? I haven't read
anywhere if that works or not, but IMHO it's worth a try. unless
there's a cost difference? again, i have no idea.

- develop your own. In fact, hierarchical structures aren't a great
match for SQL storage, so non-obvious mappings (like MPTT) are needed.
Google's datastore might (or might not) allow a more direct approach.

cheers,

--
Javier

JG

unread,
Dec 11, 2012, 5:31:49 AM12/11/12
to django...@googlegroups.com
I resolved my issue and decided to post the solution in case someone will need something similar. The thing is that Javier was right - mptt is not working. I also tried to switch to Google Cloud SQL. But at the end I found a simple solution that was all the time in front of me - django-threadedcomments app (http://code.google.com/p/django-threadedcomments/). The project page seems a bit abandoned, but I found this tutorial that helped a lot http://django-threadedcomments.googlecode.com/svn-history/r120/trunk/docs/tutorial.rst . It worked for me, maybe that is not the best solution, but at least saves some time from implementing your own tree.
Reply all
Reply to author
Forward
0 new messages