Customizing Form Field HTML Attributes

2011-07-31 Thread SixDegrees
I would like to use the 'title' attribute of several form fields to hold our help_text, rather than displaying the text alongside the field. I don't see any way, though, to add or modify tag attributes on a form field. How would I do this? -- View this message in context: http://old.nabble.com/C

Re: Customizing Form Field HTML Attributes

2011-07-31 Thread SixDegrees
Thank you. Stuart MacKay wrote: > > Take a look at the widgets used to display a form. From the > documentation: https://docs.djangoproject.com/en/dev/ref/forms/widgets/ > > "On a real Web page, you probably don't want every widget to look the > same. You might want a larger input element for

Defunct Processes on Server

2011-08-12 Thread SixDegrees
We are running a Django-driven site using Apache. Some of our forms launch a time-consuming process by using Popen: p = subprocess.Popen(my_cmd, shell=True) which works fine, in the sense that the command gets launched in the background and doesn't hang the website while it processes. These

Re: Defunct Processes on Server

2011-08-12 Thread SixDegrees
> You could obviously store this in a database too. >> >> Your script could then wait on the processes to collect the returncodes > and avoid this defunct process phenomenom. >> >> This is of course just a suggestion, although I'm pretty sure it would &g

Re: Defunct Processes on Server

2011-08-12 Thread SixDegrees
Calling wait() on the processes freezes the form page until the process completes. Since the process may take several minutes to run, this is not acceptable. We need the process to run in the background and detach from the server process, but when it is finished we need it to truly finish and not

Dynamic Forms with Varying init Arguments

2011-08-19 Thread SixDegrees
I'm using formsets to implement a dynamic form as described http://www.mancoosi.org/~abate/dynamic-forms-with-django here . However, the forms created by the formset want a parameter passed that determines the contents of the form during initialization. This parameter can be passed back through a

Re: Dynamic Forms with Varying init Arguments

2011-08-19 Thread SixDegrees
next form you create." SixDegrees wrote: > > I'm using formsets to implement a dynamic form as described > http://www.mancoosi.org/~abate/dynamic-forms-with-django here . However, > the forms created by the formset want a parameter passed that determines > the contents of

Re: Dynamic Forms with Varying init Arguments

2011-08-19 Thread SixDegrees
I'm no longer at the computer where my code resides. But "you are wanting to call formset_factory and have it pass along a parameter to the Form that the formset contains" is pretty much what I want to know how to do. Wayne Smith-4 wrote: > > On Aug 19, 12:41 pm, SixD

Re: Dynamic Forms with Varying init Arguments

2011-08-19 Thread SixDegrees
particular model in this case, sadly. At least I don't think so; I may give it another look. Wayne Smith-4 wrote: > > On Aug 19, 1:58 pm, SixDegrees wrote: >> I'm no longer at the computer where my code resides. But "you are wanting >> to >> call formset_fac

Comment Framework and Session Variables

2011-09-21 Thread SixDegrees
I'm using the Django-supplied comment framework, and I would like to initialize the email field of the comment form with a value stored in a session variable. The forms, however, are created using template tags; they aren't instantiated in the view, for example, where I could easily provide the se