Re: Have browsers broken post-redirect-get? best practice now?

2013-10-03 Thread David Durham
I think when they hit the browsers back button, the form will have the data they entered previously. When they submit it, since it was already submitted previously, you could just make it an edit action, or do whatever is appropriate given that they are submitting the same form again. I think the

Re: Django FormWizard Dynamically Alter form_list

2010-02-02 Thread David Durham
On Sat, Jan 30, 2010 at 1:25 PM, leveille wrote: > I'm having some issues with the form wizard, that maybe someone can > shed some light on. According to the docstring in the method > process_step: I can "dynamically alter self.form_list". So, based on > my project needs, I'm appending forms to th

Re: ORACLE_HOME in wsgi script

2009-06-09 Thread David Durham
On Tue, Jun 9, 2009 at 3:44 PM, David Durham wrote: > On Thu, Jun 4, 2009 at 8:54 AM, SlafS wrote: >> >> Hi! >> >> I'm trying to run Django app with mod_wsgi and Oracle, but when I try >> to configure it I always get an internal ser

Re: ORACLE_HOME in wsgi script

2009-06-09 Thread David Durham
On Thu, Jun 4, 2009 at 8:54 AM, SlafS wrote: > > Hi! > > I'm trying to run Django app with mod_wsgi and Oracle, but when I try > to configure it I always get an internal server error (500) with this > error.log: > > ImproperlyConfigured: Error loading cx_Oracle module: libclntsh.so. > 11.1: cannot

Re: Newb - how to remember the main course while we select the dessert

2009-06-09 Thread David Durham
On Thu, Jun 4, 2009 at 9:19 AM, adelaide_mike wrote: > > My latest problem can be illustrated thus: > > In the first form we select the main course - spam or eggs.  In the > next form we select the dessert - ice cream or mud cake, and in the > third form we select the after-dimmer drink - tea or c

Re: FormWizard: Setting up a ChoiceField.choices based on previous forms,

2008-12-31 Thread David Durham, Jr.
On Tue, Dec 30, 2008 at 3:16 PM, Ariel Mauricio Nunez Gomez wrote: > Hello list, > Today I started using FormWizard and could not find a clean way to populate > a choices field based on previously submitted forms, I ended up overriding > the render method like this(The only changed line is the on

Re: How to avoid out of sync sequence for primary key using Postgresql?

2008-10-16 Thread David Durham, Jr.
On Thu, Oct 16, 2008 at 2:38 PM, cfobel <[EMAIL PROTECTED]> wrote: > I recently encountered a situation where the sequence for the primary > key of one of my models became out of sync, which caused the following > error when trying to save a new model instance: > > IntegrityError ... 'duplicate k

Re: django-jython-postgres driver

2008-10-13 Thread David Durham, Jr.
On 10/13/08, dusans <[EMAIL PROTECTED]> wrote: > I have writen a Test.java with: > Class.forName("org.postgresql.Driver"); > > It works, so that means it should work. > > But jython tells me: DatabaseError: driver [org.postgresql.Driver] not > found > > What am i doing wrong > I have been r

Re: using request.POST as keyword args

2008-10-09 Thread David Durham, Jr.
> I do not understand why you want to do this. Why not just pass request.POST > without the **, and declare your function to take a single argument which > you expect to be a dictionary-like object (as request.POST, a QueryDict, > is)?. That is: > > result = ab.perform(request.POST) > where: > d

djangosnippets.org list navigation

2008-10-08 Thread David Durham, Jr.
The list navigation on djangosnippets is not so good. Take this page for instance: http://www.djangosnippets.org/users/ I happened to stumble across the following jquery plugin which might be a quick fix for some of the issues (though searching should be added to): http://www.ihwy.com/labs

Re: displaying list from dictionnary -django 1.0

2008-10-03 Thread David Durham, Jr.
On Fri, Oct 3, 2008 at 12:13 PM, tsmets <[EMAIL PROTECTED]> wrote: > I have an application that records the status of an applications. > Basically something like : > _ started-request > _ started > _ stop-requested > _ stopped > + some technical informations (version, host, URL, ...) > > I tho

Re: Form controls for choosing from long lists

2008-09-26 Thread David Durham, Jr.
On Fri, Sep 26, 2008 at 12:12 PM, Donn <[EMAIL PROTECTED]> wrote: > > Hi, > I thought I'd ask before rolling my own (at tedious pace) widget/whatever: > > If you have a foreign key field to a table of thousands of, say, author names, > the drop-down control becomes a real problem: > 1. It's not pa

Re: amd64 vs x86 hosting

2008-09-25 Thread David Durham, Jr.
>> I think the primary difference is the amount of RAM that is supported >> and whether or not you have compatible software. With that said, all >> modern processors are x64 so you probably want to default with an x64 >> OS unless you need x86 for software compatibility reasons. > > That's not wh

Re: Multiple instances using mod_python

2008-09-24 Thread David Durham, Jr.
> I see on this thread > > from last year that there is suspicion that Apache can at times misdirect > mod_python requests to the wrong mod_python instance. You could try mod_wsgi. -Dave

Re: amd64 vs x86 hosting

2008-09-24 Thread David Durham, Jr.
On Wed, Sep 24, 2008 at 11:07 AM, David Durham, Jr. <[EMAIL PROTECTED]> wrote: > On Wed, Sep 24, 2008 at 6:14 AM, mcosta <[EMAIL PROTECTED]> wrote: >> One question: ¿amd64 or x86? we've got some bechmark claiming superior >> performance for amd64, both with pytho

Re: amd64 vs x86 hosting

2008-09-24 Thread David Durham, Jr.
On Wed, Sep 24, 2008 at 6:14 AM, mcosta <[EMAIL PROTECTED]> wrote: > One question: ¿amd64 or x86? we've got some bechmark claiming superior > performance for amd64, both with python and mysql, but then we can not > tune with psyco. We've taken a look at pyrex but we do not know even > if we are sh

Re: Two Django visions running at once.

2008-09-23 Thread David Durham, Jr.
On Wed, Sep 17, 2008 at 3:21 PM, KillaBee <[EMAIL PROTECTED]> wrote: > > Is it possible to have two versions of django running at the same time > on an Ubuntu server(9.0 and 1.0)? > It is taking to long to recode, and until I do I wanted It up and > running with the old version. > I got the tar.gz

Re: How to simulate recursive inlines in admin?

2008-09-22 Thread David Durham, Jr.
2008/9/22 Steve Holden <[EMAIL PROTECTED]>: > This all seems rather ambitious for the admin. Isn't it supposed to be a > simple application, and aren't those kind of functions supposed to be > implemented by other views? There's no point trying to make the admin > all things to all people - that w

Re: How to simulate recursive inlines in admin?

2008-09-22 Thread David Durham, Jr.
On Mon, Sep 22, 2008 at 4:05 PM, Petar Marić <[EMAIL PROTECTED]> wrote: > I'm using the admin app for creating Questionnaires and I'd like to let users > edit questions and answers in the same form. AFAIK recursive inlines aren't > supported in Django (a hard problem by itself) so the only other wa

Re: ModelForm initial= vs. instance=

2008-09-20 Thread David Durham, Jr.
> Basically, I store the cleaned_data in the session for POSTs and use > the cleaned_data in order to initialize a ModelForm for display after > GETs. Eventually, I have to save some things. When that happens, I > again get the data from a session: > >for i in range(len(self.get_form_li

Re: ModelForm initial= vs. instance=

2008-09-20 Thread David Durham, Jr.
> No, there's quite a difference. "Initial" is used to set the initial > values and is quite appropriate when a *new* model instance is going to > be created. The "instance" is used when you want the ModelForm to be > used to update an existing instance of a model. > Since Django does not > curren

Re: Template Inheritance Question

2008-09-19 Thread David Durham, Jr.
On Fri, Sep 19, 2008 at 4:07 PM, djandrow <[EMAIL PROTECTED]> wrote: > > I have a template, text that extend a template base. > > In my text template I have; > > {% extends 'base.html' %} > > {% block content %} > > SOME CODE > > {% endblock content %} I'm not a django expert, but I think that yo

ModelForm initial= vs. instance=

2008-09-19 Thread David Durham, Jr.
I'm writing a little wizard application to walk a user through creating a bunch of Model objects. I stumbled across something kind of interesting; if I create a ModelForm like so: SomeModelForm(initial={...}) All of the fields I have are prepopulated, except the ForeignKey ones. I don't hav

Re: Reusable views from a template - How?

2008-09-17 Thread David Durham, Jr.
>> Have you read up on template inheritance? >> http://docs.djangoproject.com/en/dev/topics/templates/#id1 > > I've read that part, I can see how that would work if I statically define > the form. But right now I have > a view defined that pushes out the LoginForm to my template. So say I have > a

Re: Reusable views from a template - How?

2008-09-17 Thread David Durham, Jr.
On Wed, Sep 17, 2008 at 1:35 PM, WillF <[EMAIL PROTECTED]> wrote: > I have written a login view as I have followed the tutorial but how do I > reuse this view in multiple pages of the site? > > Is there a way to render this particular view as part of a template, so I > could have the login form (o

Re: date time input in a modelform

2008-09-17 Thread David Durham, Jr.
On Tue, Sep 16, 2008 at 3:13 PM, David Durham, Jr. <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm working through a simple wizard using the formtools wizard stuff. > My issue is that my forms don't display with niceties such as date > time popup and foreign key &#x

date time input in a modelform

2008-09-16 Thread David Durham, Jr.
Hi all, I'm working through a simple wizard using the formtools wizard stuff. My issue is that my forms don't display with niceties such as date time popup and foreign key 'add' options. Is there something extra that has to be done for these features? Just as a simple test, I reduced things to

Re: Nesting inlines with django-admin

2008-09-11 Thread David Durham, Jr.
> I'm having the same need for nested inlines. Bump. I'm probably going to take the plunge and try to implement this if no one has beaten me to it. -Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: filters should throw exceptions

2008-04-21 Thread David Durham, Jr.
On Mon, Apr 21, 2008 at 1:06 PM, Peter Rowell <[EMAIL PROTECTED]> wrote: > From http://www.djangoproject.com/documentation/templates/#variables > > If you use a variable that doesn't exist, the template system will > insert the value of the TEMPLATE_STRING_IF_INVALID setting, which is > set to

filters should throw exceptions

2008-04-21 Thread David Durham, Jr.
Hi all, I'm new to working with Django so forgive my newness. I'm reading through chapter 10 of the free online django book, and I've come across the statement that filter should silently ignore errors. I disagree with this. I think they ought to raise exceptions, and the site should be config