Re: Ideas for adding default records

2007-10-01 Thread Paddy Joy
Thanks for the tip. I don't think the override will work in my particular case because I don't always add the defaults. I have a check box on the form "Add default DNS Records" and I check for this in the view: if form.is_valid(): domain = form.save(commit=True) if request.POS

Re: Ideas for adding default records

2007-10-01 Thread Jonathan Buchanan
On 10/1/07, Paddy Joy <[EMAIL PROTECTED]> wrote: > > I have a many to one relationship between domain and DNSRecord. When > adding a domain I need to add some default DNSRecords. I do this after > saving the domain using the following code. > > > domain = form.save(commit=True) > > d = DNSRecord(d

Ideas for adding default records

2007-10-01 Thread Paddy Joy
I have a many to one relationship between domain and DNSRecord. When adding a domain I need to add some default DNSRecords. I do this after saving the domain using the following code. domain = form.save(commit=True) d = DNSRecord(domain=domain, type='NS', data='ns1.mydomain.com', aux=0, ttl=720