Re: ajax select box

2011-05-14 Thread gusheng
i've written something similar to Dajax..
but i don't think that's a good solution..
and i'll not use it in my new project..

it goes the opposite of django philosophy..to design url explicitly..
url should be well mantained..
..and can be used as an api..as similar as possible
i thought..

On 5月9日, 上午2时22分, Ogi Vranesic  wrote:
> Hallo
>
> You can use Dajax(ice) to solve your issue.
> First Dajax and Dajaxice must be installed.
> In your select box for countries add event 'onchange' i.e.:
> onchange="Dajaxice.ajax.getCitiesByCountry('Dajax.process', {'name':this.name,
> 'value':this.value})">
> According to this example you must have the file ajax.py and the function
> getCitiesByCountry must be registered in settings.py like:
> DAJAXICE_FUNCTIONS = (
> 'ajax.getCitiesByCountry',
> )
>
> Afterwards define the function getCitiesByCountry in ajax module
> where you can generate options for cities using python and replace them
> automatically in html.
>
> If something is not clear google for Dajax, Dajaxice, dajax.json()
>
> Greetings
> Ogi
>
> On Sonntag 08 Mai 2011 06:46:54 pm you wrote:
>
>
>
>
>
>
>
> > but i dont know about jquery or ajax, can i get any example from any
> > site , can u provide any link which has such code written
>
> > On May 7, 12:10 pm, Shawn Milochik  wrote:
> > > You'll need to write JavaScript.
>
> > > Specifically:
>
> > >  Write a function that uses AJAX to pass the state to a Django view
> > > and receive the city list, then populate the city drop-down.
>
> > >  Bind that function to the change event of your state drop-down box.
>
> > > This isn't a Django question, though. If you have trouble doing that try
> > > a JavaScript mailing list.
>
> > > I recommend using jQuery's .ajax() function for this.
>
> > > Shawn

-- 
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.



Re: UML to Django - online generation service

2011-05-08 Thread gusheng
yeah...that's useful
and...thx :)

On 5月8日, 上午2时50分, Javier Guerra Giraldez  wrote:
> On Sat, May 7, 2011 at 11:21 AM, Juan Hernandez  wrote:
> > django-extensions does something similar
>
> second that
>
> typically i start developing an app by drafting the models.  i keep a
> window with the output of django-extensions updated automatically
> every time i save.  makes it so easy to keep the big picture on sight
>
> of course, it's not UML
>
> --
> Javier

-- 
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.



Re: UML to Django - online generation service

2011-05-07 Thread gusheng
I'm thinking of something opposite..

Is it possible to draw uml base on my models?

or, how to draw or present my model-structure-data..


On May 4, 10:26 pm, jcabot  wrote:
> Hi everybody,
>
> You can now try for free a new online code-generation service that
> transforms plain UML class diagrams to Django models. 
> Checkhttp://modeling-languages.com/content/uml2python-full-code-generator-...
> for more info.
>
> Any feedback will be highly appreciated!
>
> Jordi

-- 
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.