Re: Using the django orm outside a web system
thanks a lot everybody for your help, I really appreciate it jhv On Thu, Jun 4, 2009 at 11:22 AM, Tom Evanswrote: > > On Thu, 2009-06-04 at 10:44 +1930, Juan Hernandez wrote: > > Hey there people: > > > > I started developing a django application where a user takes a big > > text file and loads it into a database. I have been able to do pretty > > much everything but I've been having some problems on scheduling tasks > > involving the django ORM. > > > > I know that python manage.py shell loads the python prompt with the > > necessary environment settings for me to work with the shell but, what > > if I wanted to let's say, schedule a text file to be loaded every > > night using the django orm along with all the other python features? > > how can I set a script or what settings do I have so set in order to > > easily use the ORM automatically for me to be able to work with those > > files over the web interface later?? in other words, what settings are > > loded everytime I execute python manage.py shell? > > > > Thanks a lot > > jhv > > > > > The easiest way is to write a custom management command, see > http://docs.djangoproject.com/en/dev/howto/custom-management-commands/ > > Cheers > > Tom > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Using the django orm outside a web system
On Thu, 2009-06-04 at 10:44 +1930, Juan Hernandez wrote: > Hey there people: > > I started developing a django application where a user takes a big > text file and loads it into a database. I have been able to do pretty > much everything but I've been having some problems on scheduling tasks > involving the django ORM. > > I know that python manage.py shell loads the python prompt with the > necessary environment settings for me to work with the shell but, what > if I wanted to let's say, schedule a text file to be loaded every > night using the django orm along with all the other python features? > how can I set a script or what settings do I have so set in order to > easily use the ORM automatically for me to be able to work with those > files over the web interface later?? in other words, what settings are > loded everytime I execute python manage.py shell? > > Thanks a lot > jhv > The easiest way is to write a custom management command, see http://docs.djangoproject.com/en/dev/howto/custom-management-commands/ Cheers Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Using the django orm outside a web system
Django command extensions has 'runjob' and 'runjobs', one of which might do want you want. You can find the extensions at: http://code.google.com/p/django-command-extensions/ On Thu, 2009-06-04 at 10:44 +, Juan Hernandez wrote: > Hey there people: > > I started developing a django application where a user takes a big > text file and loads it into a database. I have been able to do pretty > much everything but I've been having some problems on scheduling tasks > involving the django ORM. > > I know that python manage.py shell loads the python prompt with the > necessary environment settings for me to work with the shell but, what > if I wanted to let's say, schedule a text file to be loaded every > night using the django orm along with all the other python features? > how can I set a script or what settings do I have so set in order to > easily use the ORM automatically for me to be able to work with those > files over the web interface later?? in other words, what settings are > loded everytime I execute python manage.py shell? > > Thanks a lot > jhv > > > -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam/] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Using the django orm outside a web system
On Wed, Jun 3, 2009 at 10:14 AM, Juan Hernandezwrote: > Hey there people: > > I started developing a django application where a user takes a big text > file and loads it into a database. I have been able to do pretty much > everything but I've been having some problems on scheduling tasks involving > the django ORM. > > I know that python manage.py shell loads the python prompt with the > necessary environment settings for me to work with the shell but, what if I > wanted to let's say, schedule a text file to be loaded every night using the > django orm along with all the other python features? how can I set a script > or what settings do I have so set in order to easily use the ORM > automatically for me to be able to work with those files over the web > interface later?? in other words, what settings are loded everytime I > execute python manage.py shell? > > Thanks a lot > jhv > > > > Take a look at this: http://www.b-list.org/weblog/2007/sep/22/standalone-django-scripts/ which explains a few different ways you can get everything setup to have a standalone script use django. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Using the django orm outside a web system
Hey there people: I started developing a django application where a user takes a big text file and loads it into a database. I have been able to do pretty much everything but I've been having some problems on scheduling tasks involving the django ORM. I know that python manage.py shell loads the python prompt with the necessary environment settings for me to work with the shell but, what if I wanted to let's say, schedule a text file to be loaded every night using the django orm along with all the other python features? how can I set a script or what settings do I have so set in order to easily use the ORM automatically for me to be able to work with those files over the web interface later?? in other words, what settings are loded everytime I execute python manage.py shell? Thanks a lot jhv --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---