Search Results

Search found 6 results on 1 pages for 'dragoon'.

Page 1/1 | 1 

  • Django view function design

    - by dragoon
    Hi, I have the view function in django that written like a dispatcher calling other functions depending on the variable in request.GET, like this: action = '' for act in ('view1', 'view2', 'view3', 'view4', ... ): if act in request.GET: action = act break ... if action == '': response = view0(request, ...) elif action == 'view1': response = view1(request, ...) elif action == 'view2': response = view2(request, ...) ... The global dispatcher function contains many variable initialization routines and these variables are then used in viewXX functions. So I feed that this is bad view design but I don't know how I can rewrite it?

    Read the article

  • Django, javascript and code reuse problem

    - by dragoon
    Hi, I have some sort of a design problem with my Django AJAX application. I have a template where I initialize js variable from django context variable like so: var test = "{{ test }}"; This variable is than used in a number of js functions that are needed for interface to work properly. So now I'm trying to reuse some content from this page in another page that loads it dynamically on some user interaction using jQuery.load(..), and I don't see any way how I can initialize that variable, so js functions don't work now. Is there any solution for this or may be I'm doing it wrong? Thanks.

    Read the article

  • Django nested formsets

    - by dragoon
    Hi, I have an edit object view that contains a formset(one or many if this matters), now I want to create a page that can display multiple edit object forms and submit it in a single form. What is the correct way to achieve this task?

    Read the article

  • Django, javascript and code ruse problem

    - by dragoon
    Hi, I have some sort of a design problem with my Django AJAX application. I have a template where I initialize js variable from django context variable like so: var test = "{{ test }}"; This variable is than used in a number of js functions that are needed for interface to work properly. So now I'm trying to reuse some content from this page in another page that loads it dynamically on some user interaction using jQuery.load(..), and I don't see any way how I can initialize that variable, so js functions don't work now. Is there any solution for this or may be I'm doing it wrong? Thanks.

    Read the article

  • Jquery find behavior in firefox 3.5.9

    - by dragoon
    Hi, i have the following piece of HTML code on my page: <tr> <td> <div> <input type="hidden" name="test" value=""> <input autocomplete="off" class="ffb-input watermark"> <div class="ffb"> <div class="content"> </div> </div> </div> </td> </tr> In JavaScript I get the <tr> element using jquery and trying to search for input like this: tr.find('div input:hidden') but nothing is returned. When I'm using find like this: tr.find('div input[type=hidden]') Everything is working fine. What is the reason for such behavor? I observe this only in FireFox 3.5.9, not in 3.6.3, Jquery 1.4.2

    Read the article

1