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/ 
> "Develop with pleasure!" 
>
>
> >-----Original Message----- 
> >From: django...@googlegroups.com <javascript:> 
> >[mailto:django...@googlegroups.com <javascript:>] On Behalf Of Chansons 
> >Sent: Tuesday, May 20, 2014 7:10 PM 
> >To: django...@googlegroups.com <javascript:> 
> >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 
> 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 is easy, my problem is, where should I put it, so 
> it's easy to 
> >use when the application will be in production? 
> >Should it be in the model layer? Or in a separate module? Will I call it 
> with the 
> >shell? Is it possible to access it via the admin site? Or any other way? 
> > 
> >I don't find anything about that in the docs, or in google, any ideas 
> will be 
> >welcome. I can be more precise if needed... 
> >Thanks 
> > 
> > 
> > 
> > 
> >-- 
> >You received this message because you are subscribed to the Google Groups 
> >"Django users" group. 
> >To unsubscribe from this group and stop receiving emails from it, send an 
> email to 
> >django-users...@googlegroups.com <javascript:>. 
> >To post to this group, send email to 
> >django...@googlegroups.com<javascript:>. 
>
> >Visit this group at http://groups.google.com/group/django-users. 
> >To view this discussion on the web visit 
> >
> https://groups.google.com/d/msgid/django-users/81d42f98-04da-4e8f-8c0b-3ac 
> >86601e116%40googlegroups.com 
> ><
> https://groups.google.com/d/msgid/django-users/81d42f98-04da-4e8f-8c0b-3a 
> >c86601e116%40googlegroups.com?utm_medium=email&utm_source=footer> . 
> >For more options, visit https://groups.google.com/d/optout. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fbe173a8-cfbe-489c-bc56-e767edc914b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to