Re: function to create objects in a given model

2014-05-21 Thread chansonsyiddish
Thanks a lot, Tom, I think this is just what I need, I will try it asap and see which is better, between the two solutions. Regards, Hélène On 21/05/2014 19:35, Tom Lockhart wrote: On 2014-05-21, at 9:15 AM, chansonsyiddish > wrote: Thanks, Tom, I'm not

Re: function to create objects in a given model

2014-05-21 Thread Tom Lockhart
On 2014-05-21, at 9:15 AM, chansonsyiddish wrote: > Thanks, Tom, > > I'm not sure I need to use signals altogether, as I know when a Song is > added. If I make a method in the Song model, I suppose I can import the model > and run it in the shell? Or is there a way I could run it directly from

Re: function to create objects in a given model

2014-05-21 Thread chansonsyiddish
Thanks, Tom, I'm not sure I need to use signals altogether, as I know when a Song is added. If I make a method in the Song model, I suppose I can import the model and run it in the shell? Or is there a way I could run it directly from the admin site? Hélène On 21/05/2014 17:15, Tom Lockh

Re: function to create objects in a given model

2014-05-21 Thread Chansons
p://www.jetbrains.com/pycharm/ > "Develop with pleasure!" > > > >-Original Message- > >From: django...@googlegroups.com > >[mailto:django...@googlegroups.com ] On Behalf Of Chansons > >Sent: Tuesday, May 20, 2014 7:10 PM > >To: django

RE: function to create objects in a given model

2014-05-20 Thread Ilya Kazakevich
mailto:django-users@googlegroups.com] On Behalf Of Chansons >Sent: Tuesday, May 20, 2014 7:10 PM >To: django-users@googlegroups.com >Subject: function to create objects in a given model > >Hello everybody, > >I'm new to django, and writing my first app, I have a question before >

Re: function to create objects in a given model

2014-05-20 Thread Chansons
Hello, thanks for your answer, I knew about fixtures, but I'm not sure it's really adapted to what I need. Adding or modifying those instances of a model will depend on a precise instance of another model: when I create a song, I also want to find in the existing glossary / or add the words of

Re: function to create objects in a given model

2014-05-20 Thread Venkatraman S
On Tue, May 20, 2014 at 8:39 PM, Chansons wrote: > Hello everybody, > > I'm new to django, and writing my first app, I have a question before > deploying it. > > I need to have a function that would create or modify, according to a few > rules and a precise instance of a model (Song), many instan

function to create objects in a given model

2014-05-20 Thread Chansons
Hello everybody, I'm new to django, and writing my first app, I have a question before deploying it. I need to have a function that would create or modify, according to a few rules and a precise instance of a model (Song), many instances of another model (Words) at once. Writing that function