Re: running script in django database
Jirka, aRkadeFR, Thank you very much. I was able to create the command successfully. Regards, Mohammad On الأربعاء 30 تـمـوز 2014 22:41, aRkadeFR wrote: Agree with Jirka, I'm just adding the link: https://docs.djangoproject.com/en/1.6/howto/custom-management-commands/ On 30/07/14 07:53, jirka.vejra...@gmail.com wrote: Hi Mohammad, this can be easily achieved using a custom management command - check the Django documentation. HTH Jirka -Original Message- From: alghafli <theb...@gmail.com> Sender: django-users@googlegroups.com Date: Wed, 30 Jul 2014 07:02:59 To: <django-users@googlegroups.com> Reply-To: django-users@googlegroups.com Subject: running script in django database Hello, I made a library application using django 1.6. currently I only need to populate the database. at the beginning, it is easier to write the information in a csv file and import it using a script. the script is running fine if I use manage.py shell and import the necessary file and call the necessary function. however, I want to make the script run from the system commandline rather than from the python interpreter since it is easier to pass arguments to it. I could not find a way in the manage.py documentation page. Is it possible? thank you, Mohammad -- 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/53D86E73.9060806%40gmail.com. 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/417657233-1406705276-cardhu_decombobulator_blackberry.rim.net-1073591500-%40b4.c3.bise7.blackberry. 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/53D98587.3030602%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: running script in django database
Agree with Jirka, I'm just adding the link: https://docs.djangoproject.com/en/1.6/howto/custom-management-commands/ On 30/07/14 07:53, jirka.vejra...@gmail.com wrote: > > Hi Mohammad, > > this can be easily achieved using a custom management command - check the > Django documentation. > > HTH > > Jirka > > -Original Message- > From: alghafli <theb...@gmail.com> > Sender: django-users@googlegroups.com > Date: Wed, 30 Jul 2014 07:02:59 > To: <django-users@googlegroups.com> > Reply-To: django-users@googlegroups.com > Subject: running script in django database > > Hello, > I made a library application using django 1.6. currently I only need to > populate the database. at the beginning, it is easier to write the > information in a csv file and import it using a script. > > the script is running fine if I use manage.py shell and import the > necessary file and call the necessary function. however, I want to make > the script run from the system commandline rather than from the python > interpreter since it is easier to pass arguments to it. I could not find > a way in the manage.py documentation page. > > Is it possible? > > thank you, > Mohammad > > -- > 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/53D86E73.9060806%40gmail.com. > 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/417657233-1406705276-cardhu_decombobulator_blackberry.rim.net-1073591500-%40b4.c3.bise7.blackberry. > 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/20140730194130.GC2235%40rkade-thinkpad. For more options, visit https://groups.google.com/d/optout.
Re: running script in django database
Hi Mohammad, this can be easily achieved using a custom management command - check the Django documentation. HTH Jirka -Original Message- From: alghafli <theb...@gmail.com> Sender: django-users@googlegroups.com Date: Wed, 30 Jul 2014 07:02:59 To: <django-users@googlegroups.com> Reply-To: django-users@googlegroups.com Subject: running script in django database Hello, I made a library application using django 1.6. currently I only need to populate the database. at the beginning, it is easier to write the information in a csv file and import it using a script. the script is running fine if I use manage.py shell and import the necessary file and call the necessary function. however, I want to make the script run from the system commandline rather than from the python interpreter since it is easier to pass arguments to it. I could not find a way in the manage.py documentation page. Is it possible? thank you, Mohammad -- 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/53D86E73.9060806%40gmail.com. 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/417657233-1406705276-cardhu_decombobulator_blackberry.rim.net-1073591500-%40b4.c3.bise7.blackberry. For more options, visit https://groups.google.com/d/optout.
running script in django database
Hello, I made a library application using django 1.6. currently I only need to populate the database. at the beginning, it is easier to write the information in a csv file and import it using a script. the script is running fine if I use manage.py shell and import the necessary file and call the necessary function. however, I want to make the script run from the system commandline rather than from the python interpreter since it is easier to pass arguments to it. I could not find a way in the manage.py documentation page. Is it possible? thank you, Mohammad -- 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/53D86E73.9060806%40gmail.com. For more options, visit https://groups.google.com/d/optout.