Use ODK with Django?

Hello!

I'm trying to collect data with OpenDataKit Collect and store the results
in a Python Django application.
I have the Collect App pointed to my server's IP address, but the responses
I receive don't contain any form information, and it seems to want specific
responses from Aggregate that I haven't been able to spoof. Is there an API
that describes how Collect interfaces with Aggregate so that my django app
can interface in the same way?

As a backup option, I could keep Aggregate, and then interface my django
app with Aggregate, possibly by reading the generated MySQL tables. Is
there any documentation on how those tables are created and structured?

Any other suggestions on the easiest way to get responses into Django would
be greatly appreciated!

Thanks!

  • Erik

Hi Erik,

These sorts of emails should probably go to the developer mailing list.

If you want to connect ODK Collect to X, the OpenRosa Submission API
and the OpenRosa Form Discovery API are what you are looking for. You
can find those APIs at
https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaAPI. Be sure to
also read https://groups.google.com/d/msg/opendatakit-developers/HJzxsxQHh8U/cjegKd7Ln5wJ
for some of the recent gotchas.

If you are running on a Tomcat server (not Google App Engine), you
have access to the underlying MySQL or PostgreSQL tables in ODK
Aggregate. The structure of those tables are documented at
https://code.google.com/p/opendatakit/wiki/AggregateDatabaseStructure.
Note this is a fragile way to pull data from Aggregate because table
structure could change between versions. Moreover, changing any of
this data could corrupt your Aggregate install. A better approach is
to use ODK Aggregate's many publishers (e.g., JSON) or the
Briefcase-Aggregate API at
https://code.google.com/p/opendatakit/wiki/BriefcaseAggregateAPI.
Those publishers and APIs are your only option if you use Google App
Engine.

Finally, you should also take a look at http://formhub.org. It's an
ODK-backend built on Django. It's running as a single cloud-hosted
service, but you can also host it yourself on your own infrastructure.

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Fri, Jan 3, 2014 at 6:23 AM, Erik Schluntz eschluntz@gmail.com wrote:

Hello!

I'm trying to collect data with OpenDataKit Collect and store the results in
a Python Django application.
I have the Collect App pointed to my server's IP address, but the responses
I receive don't contain any form information, and it seems to want specific
responses from Aggregate that I haven't been able to spoof. Is there an API
that describes how Collect interfaces with Aggregate so that my django app
can interface in the same way?

As a backup option, I could keep Aggregate, and then interface my django app
with Aggregate, possibly by reading the generated MySQL tables. Is there any
documentation on how those tables are created and structured?

Any other suggestions on the easiest way to get responses into Django would
be greatly appreciated!

Thanks!

  • Erik

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

1 Like

Hi Erik,

This message has more info about ODK an Django. Maybe it would help.

https://groups.google.com/forum/#!topic/opendatakit/_38YS1stTus

Best,
Omar

1 Like

Thanks Yaw! I decided to go with the publish functionality through
aggregate.

Now when I click publish, my server never receives anything. I'm using the
tiny python server that you wrote which prints post requests to the
console. It's running on my laptop, but I have verified that I can reach it

Thanks!
Erik
Hi Erik,

These sorts of emails should probably go to the developer mailing list.

If you want to connect ODK Collect to X, the OpenRosa Submission API
and the OpenRosa Form Discovery API are what you are looking for. You
can find those APIs at
https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaAPI. Be sure to
also read
https://groups.google.com/d/msg/opendatakit-developers/HJzxsxQHh8U/cjegKd7Ln5wJ
for some of the recent gotchas.

If you are running on a Tomcat server (not Google App Engine), you
have access to the underlying MySQL or PostgreSQL tables in ODK
Aggregate. The structure of those tables are documented at
https://code.google.com/p/opendatakit/wiki/AggregateDatabaseStructure.
Note this is a fragile way to pull data from Aggregate because table
structure could change between versions. Moreover, changing any of
this data could corrupt your Aggregate install. A better approach is
to use ODK Aggregate's many publishers (e.g., JSON) or the
Briefcase-Aggregate API at
https://code.google.com/p/opendatakit/wiki/BriefcaseAggregateAPI.
Those publishers and APIs are your only option if you use Google App
Engine.

Finally, you should also take a look at http://formhub.org. It's an
ODK-backend built on Django. It's running as a single cloud-hosted
service, but you can also host it yourself on your own infrastructure.

Yaw

ยทยทยท from my other computer. Any ideas? -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Fri, Jan 3, 2014 at 6:23 AM, Erik Schluntz eschluntz@gmail.com wrote:

Hello!

I'm trying to collect data with OpenDataKit Collect and store the results
in
a Python Django application.
I have the Collect App pointed to my server's IP address, but the
responses
I receive don't contain any form information, and it seems to want
specific
responses from Aggregate that I haven't been able to spoof. Is there an
API
that describes how Collect interfaces with Aggregate so that my django app
can interface in the same way?

As a backup option, I could keep Aggregate, and then interface my django
app
with Aggregate, possibly by reading the generated MySQL tables. Is there
any
documentation on how those tables are created and structured?

Any other suggestions on the easiest way to get responses into Django
would
be greatly appreciated!

Thanks!

  • Erik

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/NYpOLVQHRaE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Erik,

If your other computer is within the same network (i.e., behind the same
firewall), then it's probably considerably easier for it to address and
access your laptop's server than Aggregate. You should somehow test
accessibility from a separate server (or some computer, at least, connected
via a different network/ISP); try, e.g., accessing your server via 3g on
your phone.

Best,

Chris

ยทยทยท On Sun, Jan 5, 2014 at 7:55 AM, Erik Schluntz wrote:

Thanks Yaw! I decided to go with the publish functionality through
aggregate.

Now when I click publish, my server never receives anything. I'm using the
tiny python server that you wrote which prints post requests to the
console. It's running on my laptop, but I have verified that I can reach it
from my other computer. Any ideas?

Thanks!
Erik
Hi Erik,

These sorts of emails should probably go to the developer mailing list.

If you want to connect ODK Collect to X, the OpenRosa Submission API
and the OpenRosa Form Discovery API are what you are looking for. You
can find those APIs at
https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaAPI. Be sure to
also read
https://groups.google.com/d/msg/opendatakit-developers/HJzxsxQHh8U/cjegKd7Ln5wJ
for some of the recent gotchas.

If you are running on a Tomcat server (not Google App Engine), you
have access to the underlying MySQL or PostgreSQL tables in ODK
Aggregate. The structure of those tables are documented at
https://code.google.com/p/opendatakit/wiki/AggregateDatabaseStructure.
Note this is a fragile way to pull data from Aggregate because table
structure could change between versions. Moreover, changing any of
this data could corrupt your Aggregate install. A better approach is
to use ODK Aggregate's many publishers (e.g., JSON) or the
Briefcase-Aggregate API at
https://code.google.com/p/opendatakit/wiki/BriefcaseAggregateAPI.
Those publishers and APIs are your only option if you use Google App
Engine.

Finally, you should also take a look at http://formhub.org. It's an
ODK-backend built on Django. It's running as a single cloud-hosted
service, but you can also host it yourself on your own infrastructure.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Fri, Jan 3, 2014 at 6:23 AM, Erik Schluntz eschluntz@gmail.com wrote:

Hello!

I'm trying to collect data with OpenDataKit Collect and store the
results in
a Python Django application.
I have the Collect App pointed to my server's IP address, but the
responses
I receive don't contain any form information, and it seems to want
specific
responses from Aggregate that I haven't been able to spoof. Is there an
API
that describes how Collect interfaces with Aggregate so that my django
app
can interface in the same way?

As a backup option, I could keep Aggregate, and then interface my django
app
with Aggregate, possibly by reading the generated MySQL tables. Is there
any
documentation on how those tables are created and structured?

Any other suggestions on the easiest way to get responses into Django
would
be greatly appreciated!

Thanks!

  • Erik

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/NYpOLVQHRaE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

To rule out network issues I've tried putting the server on ec2, and its
still not receiving any posts. I also confirmed that I can post from my
laptop.
Thanks,
Erik

ยทยทยท On Jan 5, 2014 7:55 AM, "Erik Schluntz" wrote:

Thanks Yaw! I decided to go with the publish functionality through
aggregate.

Now when I click publish, my server never receives anything. I'm using the
tiny python server that you wrote which prints post requests to the
console. It's running on my laptop, but I have verified that I can reach it
from my other computer. Any ideas?

Thanks!
Erik
Hi Erik,

These sorts of emails should probably go to the developer mailing list.

If you want to connect ODK Collect to X, the OpenRosa Submission API
and the OpenRosa Form Discovery API are what you are looking for. You
can find those APIs at
https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaAPI. Be sure to
also read
https://groups.google.com/d/msg/opendatakit-developers/HJzxsxQHh8U/cjegKd7Ln5wJ
for some of the recent gotchas.

If you are running on a Tomcat server (not Google App Engine), you
have access to the underlying MySQL or PostgreSQL tables in ODK
Aggregate. The structure of those tables are documented at
https://code.google.com/p/opendatakit/wiki/AggregateDatabaseStructure.
Note this is a fragile way to pull data from Aggregate because table
structure could change between versions. Moreover, changing any of
this data could corrupt your Aggregate install. A better approach is
to use ODK Aggregate's many publishers (e.g., JSON) or the
Briefcase-Aggregate API at
https://code.google.com/p/opendatakit/wiki/BriefcaseAggregateAPI.
Those publishers and APIs are your only option if you use Google App
Engine.

Finally, you should also take a look at http://formhub.org. It's an
ODK-backend built on Django. It's running as a single cloud-hosted
service, but you can also host it yourself on your own infrastructure.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Fri, Jan 3, 2014 at 6:23 AM, Erik Schluntz eschluntz@gmail.com wrote:

Hello!

I'm trying to collect data with OpenDataKit Collect and store the
results in
a Python Django application.
I have the Collect App pointed to my server's IP address, but the
responses
I receive don't contain any form information, and it seems to want
specific
responses from Aggregate that I haven't been able to spoof. Is there an
API
that describes how Collect interfaces with Aggregate so that my django
app
can interface in the same way?

As a backup option, I could keep Aggregate, and then interface my django
app
with Aggregate, possibly by reading the generated MySQL tables. Is there
any
documentation on how those tables are created and structured?

Any other suggestions on the easiest way to get responses into Django
would
be greatly appreciated!

Thanks!

  • Erik

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/NYpOLVQHRaE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Greetings
I don't bring any solution to this problem, but I want to ask for your help is that I've been trying to find a way to connect django with odk collect but until today I haven't been able to find a suitable methodology, so you could help me with your methodology until I get where arrived so far?
You can contact me by whatsapp +258850619236 or by email baptista@terrafirma.co.mz to provide the methodology you used for this odk integration with django app.
Thanks a lot if you can help
Baptista Guivala