thanks DR! yeah, i'm just learning python, and was fuzzy on the object
model stuff.
works perfect.
On Dec 23, 1:09 pm, Daniel Roseman
wrote:
> On Dec 23, 8:11 pm, "dick...@gmail.com" wrote:
>
>
>
> > i'm working on a simple concept i'm sure others have solved, but i
> > can't get it.
>
> > b
On Dec 23, 8:11 pm, "dick...@gmail.com" wrote:
> i'm working on a simple concept i'm sure others have solved, but i
> can't get it.
>
> basically, given some input, i parse it, find which objects to
> create, and do it.
>
> so with a model:
>
> class Foo(models.Model):
> name = models.Char
yeah, but that's hardcoding in the "Foo" and "name" value, where they
may be dynamic. Ie, imagine the xml is today
would require the python code to instantiate a Bar(date="today")
class.
> Does this work?
>
> from myproject.test.models import Foo
> f = Foo(name="bar")
> f.save()
>
> Colin
--~--
On Tue, Dec 23, 2008 at 12:11 PM, dick...@gmail.com wrote:
>
> i'm working on a simple concept i'm sure others have solved, but i
> can't get it.
>
> basically, given some input, i parse it, find which objects to
> create, and do it.
>
> so with a model:
>
> class Foo(models.Model):
> name
i'm working on a simple concept i'm sure others have solved, but i
can't get it.
basically, given some input, i parse it, find which objects to
create, and do it.
so with a model:
class Foo(models.Model):
name = models.CharField(max_length=20)
and input xml of bar
my view would parse t
5 matches
Mail list logo