Re: Imitating "edit_inline" in a view

2007-11-24 Thread James Mulholland
{{ form }} {% for c in car_forms %} {{ c }} {% endfor %} -- James On 23 Nov, 14:55, James Mulholland <[EMAIL PROTECTED]> wrote: > This question is related to this one I asked a couple of months ago: > > http://decenturl.com/groups.google/djangomultipleforms >

Imitating "edit_inline" in a view

2007-11-23 Thread James Mulholland
This question is related to this one I asked a couple of months ago: http://decenturl.com/groups.google/djangomultipleforms I'd like to use something similar to the "edit_inline" option, but in a view. My test models look like this: class Person(models.Model): person_name =

Re: Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
It worked, first time :-) For the record, this is what the code looks like now: urls.py: (r'address/edit/(?P\d+)/', 'testdb.mtable.views.edit_address') views.py: def edit_address(request, id=None): address = Address.objects.get(pk=id) country = address.country AddressForm =

Re: Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Thanks -- I'll try those ideas as well. On Oct 4, 4:05 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On 10/4/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > > > It's using the save() method from AddressForm, which only knows about > > its own fields. > > You should also verify that is_valid() is

Re: Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Thanks for the help :) Seems like a very sound approach, not least because I understand it! -- James On Oct 4, 3:53 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-10-04 at 07:37 -0700, James Mulholland wrote: > > Hi, > > > [Note: apologies for the do

Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Hi, [Note: apologies for the double post. Google didn't offer to preview the message, which is what I was trying to do...] I'm starting to investigate newforms in detail (having previously used the old forms library) since I have a job to convert an Access DB to web format. The client wants to

Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Hi, I'm starting to investigate newforms in detail (having previously used the old forms library) since I have a job to convert an Access DB to web format. The client wants to maintain a similar layout to what they have in Access, which in places means having one page which has several records

Re: Converting a Django site to flat HTML

2006-12-06 Thread James Mulholland
Hi, yes I looked at Curl but I was looking for a quick 'n' dirty way to do it, without worrying too much about the options on the command line. Since I'm coming to Python from Perl, I would also probably choose a Perl-ish way to do what you're accomplishing with Python modules. But, whatever :)

Converting a Django site to flat HTML

2006-12-02 Thread James Mulholland
This might fail the obviousness test for some people, but it just saved me a shed-load of work. Basic problem is this: I pitched Django to a client a few weeks ago, and they seemed very happy with it and told me to go ahead. About a week into the project (ie, when I'd all but finished it ;) they

Re: Creating DB objects from dictionaries

2006-09-26 Thread James Mulholland
Thank you, Malcolm, Ivan :) That just saved me helluva lot of work! -- James --~--~-~--~~~---~--~~ 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

Creating DB objects from dictionaries

2006-09-26 Thread James Mulholland
Suppose I have a dictionary like this: data = { 'a':'1', 'b':'2', 'c':'3' } and a model like this: class Test(models.Model): a = models.CharField(maxlength=8) b = models.CharField(maxlength=8) b = models.CharField(maxlength=8) I would like (in a python script) to be able to say t

Re: Problem getting list from SelectMultipleField

2006-08-24 Thread James Mulholland
Chris, that's perfect, thanks for putting me out of my misery :) I still *love* Django but if I'd started with manipulators, etc, I think I would have quit almost immediately! -- James --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Saving ManyToMany relationships in custom manipulator

2006-08-24 Thread James Mulholland
Russ and Ivan -- thanks very much for your help! I'd spent several hours searching for info and could only find details of how to do it for old versions. Thanks again. -- James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Saving ManyToMany relationships in custom manipulator

2006-08-23 Thread James Mulholland
)) However, only the last selected team in the list gets saved. I would *really* appreciate it if someone could help me with this! -- James James Mulholland wrote: > Hi, I have a routine like this in a custom manipulator (which handles > SMS message-sending from a web-page): > > def sav

Re: Form from multiple models

2006-06-20 Thread James Mulholland
Thanks :-) I'll take a look at those resources. --~--~-~--~~~---~--~~ 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

Form from multiple models

2006-06-19 Thread James Mulholland
I'm trying to create an automated booking system for educational events. Admin user creates workshops in the admin interface, then creates a number of related accommodation options. Website visitor signs up for workshops (ie, potentially more than one workshop) and can also sign up for

Re: "Back-to-front" LDAP Authentication

2006-06-08 Thread James Mulholland
Thanks Ramiro! I'll take a look at that today. I'm always a bit reluctant to use non-standard code, but if it's being regularly merged that should be ok. -- James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

"Back-to-front" LDAP Authentication

2006-06-07 Thread James Mulholland
I've set up Django under Apache 2, so that users are prompted for their LDAP username/password when they try to visit my Django site. This authentication is the standard Apache http-auth dialog which has nothing to do with Django itself. I also created this (below) as a way to populate the Django

Re: Additional controls in admin interface?

2006-06-06 Thread James Mulholland
Wilson, thanks -- that answers both issues. Really appreciate your website, btw: it was one of the reasons I started learning to use Django. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Additional controls in admin interface?

2006-06-06 Thread James Mulholland
Excuse me if this is a daft question -- I'm new to both Python and Django, but I guess it's a credit to both of them that I'm doing some fairly nifty stuff building a new corporate intranet. One feature I'd like to add is a meeting scheduler, where someone can set up a meeting and invite various