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
Thanks a lot, I'll try that. Hélène Le mardi 20 mai 2014 20:50:34 UTC+2, Ilya Kazakevich a écrit : > > Hello, > > Try managers: https://docs.djangoproject.com/en/1.6/topics/db/managers/ > > Ilya Kazakevich, > JetBrains PyCharm (Best Python/Django IDE) > http://www.jetbrains.com/pycharm/ > "D

RE: function to create objects in a given model

2014-05-20 Thread Ilya Kazakevich
Hello, Try managers: https://docs.djangoproject.com/en/1.6/topics/db/managers/ Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@googlegro

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