in a nice dictionary.
When I create a new item, I'm able to do this:
obj = MyModel(**dictionary_of_field_values)
Is there something similar I can do with my obj once the data is retrieved?
Thanks
--Ray
--
Ray Cote, President
Appropriate Solutions, Inc.
We Build Software
603.924.6079
--
Hi Tim:
Thanks for the pointers.
I think the setattr is probably safest way to deal with the Django models.
--Ray
- Original Message -
From: "Tim Chase"
To: django-users@googlegroups.com
Cc: "Ray Cote"
Sent: Tuesday, June 29, 2010 2:03:05 PM GMT -05:00 US/Canada
Thanks for everybody's comments.
I ended up using the setattr method and, since I always know the data I have is
a subset of the data in the model, that works wonderfully.
--Ray
- Original Message -
From: "euan.godd...@googlemail.com"
To: "Django users"
Sent: Wednesday, June 30, 201
@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
--
Ray Cote, President
Appropriate Solutions, Inc.
We Build Software
603.924.6079
--
You receive
At 4:59 AM + 9/5/07, Steve Potter wrote:
>... you have many different modules, each of them being a separate
>application that
>functions independently of the others, but they are all displayed on
>one page.
>I want to be able to convert these modules one by one without having
>to replace th
At 4:22 PM + 9/5/07, Steve Potter wrote:
> >
>> Try coding each module as a Django template tag.
>> Then, create a template that returns an html fragment rather than a
>> full html page.
>> Associate each rendered template with a specific URL.
>> Perhaps something like:
>>mysite
I have file uploads working using newforms.
However, if I run into validation errors on the form (say a mandatory
field is not filled), then when the form re-displays for the user,
the file they previously selected is no longer selected.
I've been reading through a variety of file upload sugge
At 1:31 AM +1100 3/5/08, Malcolm Tredinnick wrote:
>On Tue, 2008-03-04 at 08:58 -0500, Ray Cote wrote:
>> I have file uploads working using newforms.
>>
>> However, if I run into validation errors on the form (say a mandatory
>> field is not filled), then when the fo
At 12:38 PM -0400 5/29/08, didier rano wrote:
>Hi all,
>
>I am trying to evaluate to migrate from Site5 hosting to WebFaction.
>I have some problems with Site5 to compile some third-parties tools
>like scipy (subversion) and dependances.
>
>But I don't have ideas about memories size with WebFact
Hello:
I'm trying to figure out the approved Django way to add a Javascript
date picker (pop-up calendar) to a field while using newforms.
One way I see people adding date pickers is to give the field a
specific class which the Javascript then attaches to during onload of
the page. However,
admin/django/contrib/admin/widgets.py
>
>On
>
>2007-04-14 11:32:53 -0600, Ray Cote <[EMAIL PROTECTED]> said:
>
>>
>>
>> Hello:
>>
>> I'm trying to figure out the approved Django way to add a Javascript
>> date picker (pop-up calendar) to a f
;
>adding a custom class to the input field via the attrs parameter
>should cover it nicely. i use this approach without the need for a
>special widget.
>
>On 4/15/07, Ray Cote <[EMAIL PROTECTED]> wrote:
>>
>> Thanks, that is very helpful.
>>
>> At 11:45
- Original Message -
> From: "benp"
> To: "Django users"
> Sent: Monday, April 25, 2011 8:54:15 AM
> Subject: Django 1.2 Dropped Sessions when single view contains registration
> and login authentication
> I've seen other Django developers have the same exact issue with
> registering and
13 matches
Mail list logo