Point 4 above is a little ambiguous:

>4. Move the queries you've created to a view that renders results to
>a template.  If you start doing this by accepting GET parameters and
>displaying the search results through the template, you can get the
>query functionality working and test it by changing the URL before
>creating the actual search form.

Can anyone help out?

thanks in advance.

Divesh
On Jul 9, 1:58 pm, Divesh Gidwani <dagidw...@gmail.com> wrote:
> Thanks so much for all the advice.. Yes, you are right, a lot of it
> sounds like rubbish, and i'm just lost! Yes, I am going to finish up
> the tutorial today, and read up on the documentation.
>
> Thanks so much for your help. I will surely keep you updated on how
> things go!
>
> Much appreciated once again.
>
> -Divesh
>
> On Jul 9, 1:45 pm, Friðrik Már Jónsson <frid...@pyth.net> wrote:
>
>
>
> > HiDivesh,
>
> > > I have this model that I want to design on Django. I have already
> > > created the mysql side of it, and the mysql database is ready. Also, i
> > > have loaded mysqldb and i think it works.
>
> > It sounds like you've created something with MySQL and imported it to  
> > a database that's used by Django.  This is not the same as creating  
> > actual models in your `models.py` file, which is required if you want  
> > to make use of Django's querying methods.
>
> > > (Species 1 & 2). And then you write a view, that will do the searching
> > > according parameters (Tolerance, pagination, species 1&2)
>
> > > So I have to create something like the website above on Django. Was
> > > just wondering if there was any easy way of doing this.. I don't fully
> > > understand Django yet, and am not sure if  have to make a form or
> > > what? I'm really confused.
>
> > > Basically what I want to do is create that type of a site, with only
> > > one species, and then have it such that when you click the radio
> > > button next to one species, it shows you what that species corresponds
> > > to in the mysql database.
>
> > You need to take this one step at a time.  You seem to be mixing model  
> > creation (defining the data structure) with writing views and  
> > templates (the radio button, pagination, criteria).
>
> >   1. Design the model[1] to the specification that is your current  
> > MySQL schema.
> >   2. Fill the model with some test data[2].
> >   3. Use the shell to try to retrieve the objects[3] according to the  
> > criteria you would get from your user through the view.
> >   4. Move the queries you've created to a view that renders results to  
> > a template.  If you start doing this by accepting GET parameters and  
> > displaying the search results through the template, you can get the  
> > query functionality working and test it by changing the URL before  
> > creating the actual search form.
> >   5. Create the search form, probably using `django.forms`[4] and use  
> > a `ChoiceField(widget=RadioSelect, choices=...)`[5] to present the  
> > options to users.
>
> > If this is all sounding like nonsese to you, it probably means you  
> > should spend some time reading up on Django's excellent documentation,  
> > and if you haven't already, finish the tutorial.
>
> > Regards,
> > Friðrik Már
>
> >   [1]http://docs.djangoproject.com/en/dev/topics/db/models/
> >   
> > [2]http://docs.djangoproject.com/en/dev/topics/db/queries/#creating-objects
> >   
> > [3]http://docs.djangoproject.com/en/dev/topics/db/queries/#retrieving-ob...
> >   [4]http://docs.djangoproject.com/en/dev/topics/forms/
> >   
> > [5]http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to