Re: Scripts to update Django tables

2013-05-29 Thread Mike Dewhirst
On 30/05/2013 12:01am, Brian wrote: I'm new to Django (and frameworks in general) and having an issue with a project I'm working on. Basically, I want to scrape data from a sports league website on a regular schedule and add updated stats into my database. I think the way you have described th

Re: Scripts to update Django tables

2013-05-29 Thread Tom Evans
On Wed, May 29, 2013 at 3:01 PM, Brian wrote: > I'm new to Django (and frameworks in general) and having an issue with a > project I'm working on. Basically, I want to scrape data from a sports > league website on a regular schedule and add updated stats into my database. > All of the Django tuto

Re: Scripts to update Django tables

2013-05-29 Thread C. Kirby
Django models instances are python objects and are manipulated as such. Lets say you had a model: def Game(Model): team1 = TextField() team2 = TextField() date = DateField() location = TextField() In order to create new model instances and save them to a database you would do:

Re: Scripts to update Django tables

2013-05-29 Thread Avraham Serour
add your script to celery and make the necessary imports so the script can use your model just like you did in manage shell take a look at http://stackoverflow.com/questions/1310495/running-a-python-script-outside-of-django but in this case I suggest not creating a subcommand as the first answer sa

Scripts to update Django tables

2013-05-29 Thread Brian
I'm new to Django (and frameworks in general) and having an issue with a project I'm working on. Basically, I want to scrape data from a sports league website on a regular schedule and add updated stats into my database. All of the Django tutorials for models I've looked at seem to give me in