You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to figure out how to add games to the database. When running
python manage.py shell<build.py
I get
NameError: name 'add_game' is not defined
In [6]: ------------------------------------------------------------------------
NameError Traceback (most recent call last)
/usr/local/lib/python2.7/dist-packages/django/core/management/commands/shell.pyc
in ()
----> 1 add_game(12020598)
NameError: name 'add_game' is not defined
Updating the readme to explain how to add games would be helpful.
The text was updated successfully, but these errors were encountered:
Hey, I'm not sure what shell<build.py does. I'm kind of a novice at django and this is my first real programming project in general so you'll have to forgive me. I didn't really actually expect anyone to try to use this.
You can load a game to the db by running manage.py shell, then import datamanger.models and run the load_headers() class method of GameProcessor. This will grab a page of game headers from nhl.com and load it to the database. After that you should be able to load the complete shift data for each of those games using django's admin.
Alternately, you can skip the header stuff and load the games by game number by importing datamanager.utility and running add_game(12020598)
I am unable to figure out how to add games to the database. When running
python manage.py shell<build.py
I get
NameError: name 'add_game' is not defined
In [6]: ------------------------------------------------------------------------
NameError Traceback (most recent call last)
/usr/local/lib/python2.7/dist-packages/django/core/management/commands/shell.pyc
in ()
----> 1 add_game(12020598)
NameError: name 'add_game' is not defined
Updating the readme to explain how to add games would be helpful.
The text was updated successfully, but these errors were encountered: