Nested locations

16 views
Skip to first unread message

Sri Prasanna

unread,
May 21, 2013, 7:28:50 AM5/21/13
to rapi...@googlegroups.com, unicefuganda
Hi,

We followed the steps in this guide to implement nested locations. But looks like migration for adding "tree_parent_id" column to locations_location table is missing and this is raising "column locations_location.tree_parent_id does not exist" when we query for Location.objects.all()

Please let us know how can we fix this issue and here is the installed apps list.

-- 
Sri Prasanna

Victor Miclovich A. K.

unread,
May 21, 2013, 7:39:37 AM5/21/13
to rapi...@googlegroups.com, unicefuganda
With the latest RMS, there have been a number of changes with nested locations. I personally followed advice in the docs where I subclass location models and do all mptt work to the models. I too had a similar error months back.

Victor
--
You received this message because you are subscribed to the Google Groups "rapidsms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rapidsms+u...@googlegroups.com.
To post to this group, send email to rapi...@googlegroups.com.
Visit this group at http://groups.google.com/group/rapidsms?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sri Prasanna

unread,
May 21, 2013, 7:44:04 AM5/21/13
to Victor Miclovich A. K., rapi...@googlegroups.com, unicefuganda
Victor,

Does this mean RapidSMS's nested location module cannot be used at the moment? Adding location subclass is not an option for us since we need to store hierarchical location information(using location type and location).

-- 
Sri Prasanna

Victor Miclovich A. K.

unread,
May 21, 2013, 8:07:14 AM5/21/13
to Sri Prasanna, rapi...@googlegroups.com, unicefuganda
With unicef's code, you need some hard work with the migrations. There are just many dependencies that need to be fixed to match the latest. Lots of work, but doable. I tried using a locations fixture from an old UNICEF project, this failed coz of that error,

Sri Prasanna

unread,
May 21, 2013, 9:20:08 AM5/21/13
to Victor Miclovich A. K., rapi...@googlegroups.com, unicefuganda
Victor,

Here is the migration we used to fix this issue. It should be documented/patched somewhere so that other developers can avoid this issue in future.

-- 
Sri Prasanna

Dan Poirier

unread,
May 21, 2013, 10:32:46 AM5/21/13
to rapi...@googlegroups.com, Victor Miclovich A. K., unicefuganda
On Tuesday, May 21, 2013 9:20:08 AM UTC-4, Sri Prasanna K wrote:
Victor,

Here is the migration we used to fix this issue. It should be documented/patched somewhere so that other developers can avoid this issue in future.

-- 
Sri Prasanna


Sri, could you please open an issue (https://github.com/rapidsms/rapidsms/issues/new) and include how you solved the problem? Then others could more easily find the solution, and maybe someone will be able to fix it in the code at some point.

Thanks!
Dan P.
 
Reply all
Reply to author
Forward
0 new messages