Friday, March 21, 2014

Re: How allow public query & download of info from my db


2014-03-21 12:19 GMT-03:00 C. Kirby <misthop@gmail.com>:
I've actually built a small app that generates a form allowing users to do a Meta Query on models django-modelqueryform.
I am in the process of a full rewrite of it to make it a lot more customizable, but the initial version works with fields that have choices set or with fields that are a numeric type. The resulting form provides each of the fields in you models with either a multichoicefield (choices) or a multifield widget which has a min, max and allow None checkbox. Right now I do not handle text based fields.

You can find the code and documentation (as it is) at https://github.com/ckirby/django-modelqueryform

Even if you can't use this directly, I think the code can give you some ideas.

Hope it helps!

On Friday, March 21, 2014 3:49:17 AM UTC-5, Venkatraman.S. wrote:

On Fri, Mar 21, 2014 at 12:17 AM, Nicholas Tapia <tapia.n...@gmail.com> wrote:
Hey Django Community!

I'm newer to programming and was pointed in the direction of django for this project.

The idea is that people can make their own custom queries and download load it from my db.

So far I'm thinking that using a form is they way to go to accept this information.  But from there I'm a little confused.  Does a custom model need to be created automatically before that query can be requested and displayed?  Or can model be skipped in this case?



The Q is very abstract and you need to refine it if you need better guidance.

From what I understand, it looks to me that you have a database and have been asked to provide an interface from which customers can download data. If yes, the best possible way to have filters so that customers can define their queries based on these filters and download the related dataset. Do NOT expose an interface by which customers can key-in a SQL and download data.

More on hearing from you.

-V
 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bb22e4ba-3602-4181-82e9-18b335667705%40googlegroups.com.

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

Nicholas, if you do an interface where user can write his own custom sql querys its an open door for sql inyection... indeed, you were facilitating his work :P

What Venkatraman says is (more or lest) what Kirby does, so IMHO you must to go in that way.

Cheers!,

Saludos Cordiales,
--
Rafael E. Ferrero

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJJc_8UhjcCTJLN%2BFY3JPfyinb3UTeCV8S7J1NH2GwFdujGxPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment