[IPython-dev] Django ORM magic

Fernando Perez fperez.net at gmail.com
Thu Oct 31 00:47:19 EDT 2013


great! Feel free to list it on the extensions index at the wiki:

https://github.com/ipython/ipython/wiki/Extensions-Index

Cheers,

f


On Wed, Oct 30, 2013 at 6:30 AM, Martín Gaitán <gaitan at phasety.com> wrote:

> Try to do some data analysis on resultados.gob.ar (the portal with
> official data of the elections in Argentina) [1]  I've done a **fast and
> dirty** cell magic to define django's models dynamically.
>
> https://gist.github.com/mgaitan/7207448
>
> usage example can be seen here:
>
>
> http://nbviewer.ipython.org/7224431#modelando-resultados.gob.ar-en-una-base-de-datos
>
>
> as a short rationale:
>
> It's clear that django is not conceived for this use case, but I love its
> ORM. The problem is that it needs some setup (configure "apps", databases,
> etc. ). This magic handle that, and then import every model.
>
> of course, there are tons of things to improve, but would be great some
> early feedback .
>
> cheers.
> m.
>
>
> [1]  In my province (Córdoba) there was an "affair" with the last
> congressman seat, due the difference is very short (<0.06%) and some people
> found not computed votes in the telegrams (particularly, for the Left Union
> Party). I'm hacking a bit trying to find more "suspicious" cases:
> http://nbviewer.ipython.org/7224431
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
Fernando Perez (@fperez_org; http://fperez.org)
fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
fernando.perez-at-berkeley: contact me here for any direct mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131030/a6848b37/attachment.html>


More information about the IPython-dev mailing list