diff --git a/code/liam/django/pokedex-main/pokedex-main/.gitignore b/code/liam/django/pokedex-main/pokedex-main/.gitignore new file mode 100644 index 00000000..b6e47617 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/.gitignore @@ -0,0 +1,129 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ diff --git a/code/liam/django/pokedex-main/pokedex-main/Pipfile b/code/liam/django/pokedex-main/pokedex-main/Pipfile new file mode 100644 index 00000000..70309f7a --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/Pipfile @@ -0,0 +1,12 @@ +[[source]] +name = "pypi" +url = "https://pypi.org/simple" +verify_ssl = true + +[dev-packages] + +[packages] +django = "==3.2" + +[requires] +python_version = "3.8" diff --git a/code/liam/django/pokedex-main/pokedex-main/Pipfile.lock b/code/liam/django/pokedex-main/pokedex-main/Pipfile.lock new file mode 100644 index 00000000..8e3522a5 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/Pipfile.lock @@ -0,0 +1,52 @@ +{ + "_meta": { + "hash": { + "sha256": "19cfd5e42f57f56005b157dfa0339f9e877fea0cd51b016c55791df6db128462" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.8" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "asgiref": { + "hashes": [ + "sha256:4ef1ab46b484e3c706329cedeff284a5d40824200638503f5768edb6de7d58e9", + "sha256:ffc141aa908e6f175673e7b1b3b7af4fdb0ecb738fc5c8b88f69f055c2415214" + ], + "markers": "python_version >= '3.6'", + "version": "==3.4.1" + }, + "django": { + "hashes": [ + "sha256:0604e84c4fb698a5e53e5857b5aea945b2f19a18f25f10b8748dbdf935788927", + "sha256:21f0f9643722675976004eb683c55d33c05486f94506672df3d6a141546f389d" + ], + "index": "pypi", + "version": "==3.2" + }, + "pytz": { + "hashes": [ + "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da", + "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798" + ], + "version": "==2021.1" + }, + "sqlparse": { + "hashes": [ + "sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0", + "sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8" + ], + "markers": "python_version >= '3.5'", + "version": "==0.4.1" + } + }, + "develop": {} +} diff --git a/code/liam/django/pokedex-main/pokedex-main/README.md b/code/liam/django/pokedex-main/pokedex-main/README.md new file mode 100644 index 00000000..3e5db93e --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/README.md @@ -0,0 +1,20 @@ +# Pokedex Starter + +## Installation + +Make sure you have Python and Pipenv installed on your computer. + +Download the repo and save it to your code folder in the class repo. *make sure you download it, don't clone it or it won't upload to the class repo correctly* + +If you are not running Python 3.8, edit the last line of the `Pipfile` to refer to your version instead. + +Navigate to the pokedex folder in the terminal and do the following: + +- `pipenv install` Create the virtual enviroment and install dependencies. +- `pipenv shell` Enter the new virtual enviroment. +- `python manage.py migrate users` Migrate the user model. *this django project uses a custom user model, you MUST migrate the users app before migrating the rest!* +- `python manage.py migrate` Migrate all other models. +- `python manage.py createsuperuser` Create yourself a super user. +- `python manage.py load_pokemon` Load Pokemon into the database. + +You're good to go! This Django project comes with a database full of Pokemon, login/logout/registration pages, and a `home.html` template for you to create your Vue app. diff --git a/code/liam/django/pokedex-main/pokedex-main/api/__init__.py b/code/liam/django/pokedex-main/pokedex-main/api/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/code/liam/django/pokedex-main/pokedex-main/api/admin.py b/code/liam/django/pokedex-main/pokedex-main/api/admin.py new file mode 100644 index 00000000..8c38f3f3 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/api/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/code/liam/django/pokedex-main/pokedex-main/api/apps.py b/code/liam/django/pokedex-main/pokedex-main/api/apps.py new file mode 100644 index 00000000..66656fd2 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/api/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ApiConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'api' diff --git a/code/liam/django/pokedex-main/pokedex-main/api/migrations/__init__.py b/code/liam/django/pokedex-main/pokedex-main/api/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/code/liam/django/pokedex-main/pokedex-main/api/models.py b/code/liam/django/pokedex-main/pokedex-main/api/models.py new file mode 100644 index 00000000..71a83623 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/api/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/code/liam/django/pokedex-main/pokedex-main/api/serializers.py b/code/liam/django/pokedex-main/pokedex-main/api/serializers.py new file mode 100644 index 00000000..6dee6fad --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/api/serializers.py @@ -0,0 +1,26 @@ +from rest_framework import serializers +from pokemon.models import Pokemon, Type +from users.models import CustomUser + +class TypeSerializer(serializers.ModelSerializer): + class Meta: + model = Type + fields = ['id', 'type'] + +class PokemonSerializer(serializers.ModelSerializer): + + types = TypeSerializer( + many=True, + read_only=True, + ) + + class Meta: + model = Pokemon + fields = ['id', 'number', 'name', 'height', 'weight', + 'image_front', 'image_back', 'caught_by', + 'types'] + +class UserSerializer(serializers.ModelSerializer): + class Meta: + model = CustomUser + fields = ['username', 'id', 'caught'] \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/api/tests.py b/code/liam/django/pokedex-main/pokedex-main/api/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/api/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/code/liam/django/pokedex-main/pokedex-main/api/urls.py b/code/liam/django/pokedex-main/pokedex-main/api/urls.py new file mode 100644 index 00000000..0aa7b8b5 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/api/urls.py @@ -0,0 +1,10 @@ +from django.urls import path +from .views import * +from . import views + +urlpatterns = [ + path('', PokemonAPIView.as_view()), + path('users/', UserView.as_view()), + path('user//', UserDetail.as_view()), + path('current/', views.current_user, name='current_user'), +] \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/api/views.py b/code/liam/django/pokedex-main/pokedex-main/api/views.py new file mode 100644 index 00000000..e4827c1e --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/api/views.py @@ -0,0 +1,29 @@ +from rest_framework import generics +from pokemon.models import Pokemon, Type +from users.models import CustomUser +from .serializers import PokemonSerializer, TypeSerializer, UserSerializer +from rest_framework import permissions +from rest_framework.decorators import api_view +from rest_framework.response import Response + +# Create your views here. + +class PokemonAPIView(generics.ListAPIView): + permission_class = permissions.IsAuthenticated + serializer_class = PokemonSerializer + queryset = Pokemon.objects.all() + +class UserView(generics.ListAPIView): + permission_class = permissions.IsAuthenticated + serializer_class = UserSerializer + queryset = CustomUser.objects.all() + +class UserDetail(generics.RetrieveUpdateDestroyAPIView): + permission_class = permissions.IsAuthenticated + queryset = CustomUser.objects.all() + serializer_class = UserSerializer + +@api_view(['GET']) +def current_user(request): + serializer = UserSerializer(request.user) + return Response(serializer.data) \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/manage.py b/code/liam/django/pokedex-main/pokedex-main/manage.py new file mode 100644 index 00000000..ec23cc29 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pokedex_project.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/code/liam/django/pokedex-main/pokedex-main/pokedex_project/__init__.py b/code/liam/django/pokedex-main/pokedex-main/pokedex_project/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/code/liam/django/pokedex-main/pokedex-main/pokedex_project/asgi.py b/code/liam/django/pokedex-main/pokedex-main/pokedex_project/asgi.py new file mode 100644 index 00000000..f9a43b50 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokedex_project/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for pokedex_project project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pokedex_project.settings') + +application = get_asgi_application() diff --git a/code/liam/django/pokedex-main/pokedex-main/pokedex_project/settings.py b/code/liam/django/pokedex-main/pokedex-main/pokedex_project/settings.py new file mode 100644 index 00000000..d247b1ad --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokedex_project/settings.py @@ -0,0 +1,138 @@ +""" +Django settings for pokedex_project project. + +Generated by 'django-admin startproject' using Django 3.2. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/3.2/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-d^eg$3s_wy81)7qwig*8s#1u+zbi^7&h*id_qcfw@^4lra-@b2' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + + 'pokemon.apps.PokemonConfig', + 'users.apps.UsersConfig', + 'api.apps.ApiConfig', + 'rest_framework' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'pokedex_project.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [BASE_DIR / 'templates'], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'pokedex_project.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/3.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/3.2/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/3.2/howto/static-files/ + +STATIC_URL = '/static/' +STATICFILES_DIRS = [BASE_DIR / 'static'] + +# Default primary key field type +# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + +AUTH_USER_MODEL = 'users.CustomUser' + +LOGIN_REDIRECT_URL = 'home' +LOGOUT_REDIRECT_URL = 'home' + +LOGIN_URL = 'login' diff --git a/code/liam/django/pokedex-main/pokedex-main/pokedex_project/urls.py b/code/liam/django/pokedex-main/pokedex-main/pokedex_project/urls.py new file mode 100644 index 00000000..829ec71d --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokedex_project/urls.py @@ -0,0 +1,26 @@ +"""pokedex_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/3.2/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path, include +from django.views.generic import TemplateView + +urlpatterns = [ + path('admin/', admin.site.urls), + path('users/', include('django.contrib.auth.urls')), + path('users/', include('users.urls')), + path('', TemplateView.as_view(template_name='home.html'), name='home'), + path('api/', include('api.urls')) +] diff --git a/code/liam/django/pokedex-main/pokedex-main/pokedex_project/wsgi.py b/code/liam/django/pokedex-main/pokedex-main/pokedex_project/wsgi.py new file mode 100644 index 00000000..b482e56b --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokedex_project/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for pokedex_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pokedex_project.settings') + +application = get_wsgi_application() diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon.json b/code/liam/django/pokedex-main/pokedex-main/pokemon.json new file mode 100644 index 00000000..0e383d62 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokemon.json @@ -0,0 +1,1883 @@ +{ + "pokemon": [ + { + "number": 1, + "name": "bulbasaur", + "height": 7, + "weight": 69, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/1.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/1.png", + "types": [ + "poison", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/bulbasaur" + }, + { + "number": 2, + "name": "ivysaur", + "height": 10, + "weight": 130, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/2.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/2.png", + "types": [ + "poison", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/ivysaur" + }, + { + "number": 3, + "name": "venusaur", + "height": 20, + "weight": 1000, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/3.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/3.png", + "types": [ + "poison", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/venusaur" + }, + { + "number": 4, + "name": "charmander", + "height": 6, + "weight": 85, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/4.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/4.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/charmander" + }, + { + "number": 5, + "name": "charmeleon", + "height": 11, + "weight": 190, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/5.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/5.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/charmeleon" + }, + { + "number": 6, + "name": "charizard", + "height": 17, + "weight": 905, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/6.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/6.png", + "types": [ + "flying", + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/charizard" + }, + { + "number": 7, + "name": "squirtle", + "height": 5, + "weight": 90, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/7.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/7.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/squirtle" + }, + { + "number": 8, + "name": "wartortle", + "height": 10, + "weight": 225, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/8.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/8.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/wartortle" + }, + { + "number": 9, + "name": "blastoise", + "height": 16, + "weight": 855, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/9.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/9.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/blastoise" + }, + { + "number": 10, + "name": "caterpie", + "height": 3, + "weight": 29, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/10.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/10.png", + "types": [ + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/caterpie" + }, + { + "number": 11, + "name": "metapod", + "height": 7, + "weight": 99, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/11.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/11.png", + "types": [ + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/metapod" + }, + { + "number": 12, + "name": "butterfree", + "height": 11, + "weight": 320, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/12.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/12.png", + "types": [ + "flying", + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/butterfree" + }, + { + "number": 13, + "name": "weedle", + "height": 3, + "weight": 32, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/13.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/13.png", + "types": [ + "poison", + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/weedle" + }, + { + "number": 14, + "name": "kakuna", + "height": 6, + "weight": 100, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/14.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/14.png", + "types": [ + "poison", + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/kakuna" + }, + { + "number": 15, + "name": "beedrill", + "height": 10, + "weight": 295, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/15.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/15.png", + "types": [ + "poison", + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/beedrill" + }, + { + "number": 16, + "name": "pidgey", + "height": 3, + "weight": 18, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/16.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/16.png", + "types": [ + "flying", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/pidgey" + }, + { + "number": 17, + "name": "pidgeotto", + "height": 11, + "weight": 300, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/17.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/17.png", + "types": [ + "flying", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/pidgeotto" + }, + { + "number": 18, + "name": "pidgeot", + "height": 15, + "weight": 395, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/18.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/18.png", + "types": [ + "flying", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/pidgeot" + }, + { + "number": 19, + "name": "rattata", + "height": 3, + "weight": 35, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/19.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/19.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/rattata" + }, + { + "number": 20, + "name": "raticate", + "height": 7, + "weight": 185, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/20.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/20.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/raticate" + }, + { + "number": 21, + "name": "spearow", + "height": 3, + "weight": 20, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/21.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/21.png", + "types": [ + "flying", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/spearow" + }, + { + "number": 22, + "name": "fearow", + "height": 12, + "weight": 380, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/22.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/22.png", + "types": [ + "flying", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/fearow" + }, + { + "number": 23, + "name": "ekans", + "height": 20, + "weight": 69, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/23.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/23.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/ekans" + }, + { + "number": 24, + "name": "arbok", + "height": 35, + "weight": 650, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/24.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/24.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/arbok" + }, + { + "number": 25, + "name": "pikachu", + "height": 4, + "weight": 60, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/25.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/25.png", + "types": [ + "electric" + ], + "url": "https://pokemon.fandom.com/wiki/pikachu" + }, + { + "number": 26, + "name": "raichu", + "height": 8, + "weight": 300, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/26.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/26.png", + "types": [ + "electric" + ], + "url": "https://pokemon.fandom.com/wiki/raichu" + }, + { + "number": 27, + "name": "sandshrew", + "height": 6, + "weight": 120, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/27.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/27.png", + "types": [ + "ground" + ], + "url": "https://pokemon.fandom.com/wiki/sandshrew" + }, + { + "number": 28, + "name": "sandslash", + "height": 10, + "weight": 295, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/28.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/28.png", + "types": [ + "ground" + ], + "url": "https://pokemon.fandom.com/wiki/sandslash" + }, + { + "number": 29, + "name": "nidoran-f", + "height": 4, + "weight": 70, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/29.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/29.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/nidoran-f" + }, + { + "number": 30, + "name": "nidorina", + "height": 8, + "weight": 200, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/30.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/30.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/nidorina" + }, + { + "number": 31, + "name": "nidoqueen", + "height": 13, + "weight": 600, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/31.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/31.png", + "types": [ + "ground", + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/nidoqueen" + }, + { + "number": 32, + "name": "nidoran-m", + "height": 5, + "weight": 90, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/32.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/32.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/nidoran-m" + }, + { + "number": 33, + "name": "nidorino", + "height": 9, + "weight": 195, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/33.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/33.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/nidorino" + }, + { + "number": 34, + "name": "nidoking", + "height": 14, + "weight": 620, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/34.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/34.png", + "types": [ + "ground", + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/nidoking" + }, + { + "number": 35, + "name": "clefairy", + "height": 6, + "weight": 75, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/35.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/35.png", + "types": [ + "fairy" + ], + "url": "https://pokemon.fandom.com/wiki/clefairy" + }, + { + "number": 36, + "name": "clefable", + "height": 13, + "weight": 400, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/36.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/36.png", + "types": [ + "fairy" + ], + "url": "https://pokemon.fandom.com/wiki/clefable" + }, + { + "number": 37, + "name": "vulpix", + "height": 6, + "weight": 99, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/37.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/37.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/vulpix" + }, + { + "number": 38, + "name": "ninetales", + "height": 11, + "weight": 199, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/38.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/38.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/ninetales" + }, + { + "number": 39, + "name": "jigglypuff", + "height": 5, + "weight": 55, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/39.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/39.png", + "types": [ + "fairy", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/jigglypuff" + }, + { + "number": 40, + "name": "wigglytuff", + "height": 10, + "weight": 120, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/40.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/40.png", + "types": [ + "fairy", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/wigglytuff" + }, + { + "number": 41, + "name": "zubat", + "height": 8, + "weight": 75, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/41.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/41.png", + "types": [ + "flying", + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/zubat" + }, + { + "number": 42, + "name": "golbat", + "height": 16, + "weight": 550, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/42.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/42.png", + "types": [ + "flying", + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/golbat" + }, + { + "number": 43, + "name": "oddish", + "height": 5, + "weight": 54, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/43.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/43.png", + "types": [ + "poison", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/oddish" + }, + { + "number": 44, + "name": "gloom", + "height": 8, + "weight": 86, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/44.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/44.png", + "types": [ + "poison", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/gloom" + }, + { + "number": 45, + "name": "vileplume", + "height": 12, + "weight": 186, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/45.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/45.png", + "types": [ + "poison", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/vileplume" + }, + { + "number": 46, + "name": "paras", + "height": 3, + "weight": 54, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/46.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/46.png", + "types": [ + "grass", + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/paras" + }, + { + "number": 47, + "name": "parasect", + "height": 10, + "weight": 295, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/47.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/47.png", + "types": [ + "grass", + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/parasect" + }, + { + "number": 48, + "name": "venonat", + "height": 10, + "weight": 300, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/48.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/48.png", + "types": [ + "poison", + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/venonat" + }, + { + "number": 49, + "name": "venomoth", + "height": 15, + "weight": 125, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/49.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/49.png", + "types": [ + "poison", + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/venomoth" + }, + { + "number": 50, + "name": "diglett", + "height": 2, + "weight": 8, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/50.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/50.png", + "types": [ + "ground" + ], + "url": "https://pokemon.fandom.com/wiki/diglett" + }, + { + "number": 51, + "name": "dugtrio", + "height": 7, + "weight": 333, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/51.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/51.png", + "types": [ + "ground" + ], + "url": "https://pokemon.fandom.com/wiki/dugtrio" + }, + { + "number": 52, + "name": "meowth", + "height": 4, + "weight": 42, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/52.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/52.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/meowth" + }, + { + "number": 53, + "name": "persian", + "height": 10, + "weight": 320, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/53.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/53.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/persian" + }, + { + "number": 54, + "name": "psyduck", + "height": 8, + "weight": 196, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/54.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/54.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/psyduck" + }, + { + "number": 55, + "name": "golduck", + "height": 17, + "weight": 766, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/55.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/55.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/golduck" + }, + { + "number": 56, + "name": "mankey", + "height": 5, + "weight": 280, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/56.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/56.png", + "types": [ + "fighting" + ], + "url": "https://pokemon.fandom.com/wiki/mankey" + }, + { + "number": 57, + "name": "primeape", + "height": 10, + "weight": 320, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/57.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/57.png", + "types": [ + "fighting" + ], + "url": "https://pokemon.fandom.com/wiki/primeape" + }, + { + "number": 58, + "name": "growlithe", + "height": 7, + "weight": 190, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/58.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/58.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/growlithe" + }, + { + "number": 59, + "name": "arcanine", + "height": 19, + "weight": 1550, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/59.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/59.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/arcanine" + }, + { + "number": 60, + "name": "poliwag", + "height": 6, + "weight": 124, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/60.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/60.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/poliwag" + }, + { + "number": 61, + "name": "poliwhirl", + "height": 10, + "weight": 200, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/61.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/61.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/poliwhirl" + }, + { + "number": 62, + "name": "poliwrath", + "height": 13, + "weight": 540, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/62.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/62.png", + "types": [ + "fighting", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/poliwrath" + }, + { + "number": 63, + "name": "abra", + "height": 9, + "weight": 195, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/63.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/63.png", + "types": [ + "psychic" + ], + "url": "https://pokemon.fandom.com/wiki/abra" + }, + { + "number": 64, + "name": "kadabra", + "height": 13, + "weight": 565, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/64.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/64.png", + "types": [ + "psychic" + ], + "url": "https://pokemon.fandom.com/wiki/kadabra" + }, + { + "number": 65, + "name": "alakazam", + "height": 15, + "weight": 480, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/65.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/65.png", + "types": [ + "psychic" + ], + "url": "https://pokemon.fandom.com/wiki/alakazam" + }, + { + "number": 66, + "name": "machop", + "height": 8, + "weight": 195, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/66.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/66.png", + "types": [ + "fighting" + ], + "url": "https://pokemon.fandom.com/wiki/machop" + }, + { + "number": 67, + "name": "machoke", + "height": 15, + "weight": 705, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/67.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/67.png", + "types": [ + "fighting" + ], + "url": "https://pokemon.fandom.com/wiki/machoke" + }, + { + "number": 68, + "name": "machamp", + "height": 16, + "weight": 1300, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/68.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/68.png", + "types": [ + "fighting" + ], + "url": "https://pokemon.fandom.com/wiki/machamp" + }, + { + "number": 69, + "name": "bellsprout", + "height": 7, + "weight": 40, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/69.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/69.png", + "types": [ + "poison", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/bellsprout" + }, + { + "number": 70, + "name": "weepinbell", + "height": 10, + "weight": 64, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/70.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/70.png", + "types": [ + "poison", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/weepinbell" + }, + { + "number": 71, + "name": "victreebel", + "height": 17, + "weight": 155, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/71.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/71.png", + "types": [ + "poison", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/victreebel" + }, + { + "number": 72, + "name": "tentacool", + "height": 9, + "weight": 455, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/72.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/72.png", + "types": [ + "poison", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/tentacool" + }, + { + "number": 73, + "name": "tentacruel", + "height": 16, + "weight": 550, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/73.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/73.png", + "types": [ + "poison", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/tentacruel" + }, + { + "number": 74, + "name": "geodude", + "height": 4, + "weight": 200, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/74.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/74.png", + "types": [ + "ground", + "rock" + ], + "url": "https://pokemon.fandom.com/wiki/geodude" + }, + { + "number": 75, + "name": "graveler", + "height": 10, + "weight": 1050, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/75.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/75.png", + "types": [ + "ground", + "rock" + ], + "url": "https://pokemon.fandom.com/wiki/graveler" + }, + { + "number": 76, + "name": "golem", + "height": 14, + "weight": 3000, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/76.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/76.png", + "types": [ + "ground", + "rock" + ], + "url": "https://pokemon.fandom.com/wiki/golem" + }, + { + "number": 77, + "name": "ponyta", + "height": 10, + "weight": 300, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/77.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/77.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/ponyta" + }, + { + "number": 78, + "name": "rapidash", + "height": 17, + "weight": 950, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/78.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/78.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/rapidash" + }, + { + "number": 79, + "name": "slowpoke", + "height": 12, + "weight": 360, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/79.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/79.png", + "types": [ + "psychic", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/slowpoke" + }, + { + "number": 80, + "name": "slowbro", + "height": 16, + "weight": 785, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/80.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/80.png", + "types": [ + "psychic", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/slowbro" + }, + { + "number": 81, + "name": "magnemite", + "height": 3, + "weight": 60, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/81.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/81.png", + "types": [ + "steel", + "electric" + ], + "url": "https://pokemon.fandom.com/wiki/magnemite" + }, + { + "number": 82, + "name": "magneton", + "height": 10, + "weight": 600, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/82.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/82.png", + "types": [ + "steel", + "electric" + ], + "url": "https://pokemon.fandom.com/wiki/magneton" + }, + { + "number": 83, + "name": "farfetchd", + "height": 8, + "weight": 150, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/83.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/83.png", + "types": [ + "flying", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/farfetchd" + }, + { + "number": 84, + "name": "doduo", + "height": 14, + "weight": 392, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/84.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/84.png", + "types": [ + "flying", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/doduo" + }, + { + "number": 85, + "name": "dodrio", + "height": 18, + "weight": 852, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/85.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/85.png", + "types": [ + "flying", + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/dodrio" + }, + { + "number": 86, + "name": "seel", + "height": 11, + "weight": 900, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/86.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/86.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/seel" + }, + { + "number": 87, + "name": "dewgong", + "height": 17, + "weight": 1200, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/87.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/87.png", + "types": [ + "ice", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/dewgong" + }, + { + "number": 88, + "name": "grimer", + "height": 9, + "weight": 300, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/88.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/88.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/grimer" + }, + { + "number": 89, + "name": "muk", + "height": 12, + "weight": 300, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/89.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/89.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/muk" + }, + { + "number": 90, + "name": "shellder", + "height": 3, + "weight": 40, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/90.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/90.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/shellder" + }, + { + "number": 91, + "name": "cloyster", + "height": 15, + "weight": 1325, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/91.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/91.png", + "types": [ + "ice", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/cloyster" + }, + { + "number": 92, + "name": "gastly", + "height": 13, + "weight": 1, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/92.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/92.png", + "types": [ + "poison", + "ghost" + ], + "url": "https://pokemon.fandom.com/wiki/gastly" + }, + { + "number": 93, + "name": "haunter", + "height": 16, + "weight": 1, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/93.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/93.png", + "types": [ + "poison", + "ghost" + ], + "url": "https://pokemon.fandom.com/wiki/haunter" + }, + { + "number": 94, + "name": "gengar", + "height": 15, + "weight": 405, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/94.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/94.png", + "types": [ + "poison", + "ghost" + ], + "url": "https://pokemon.fandom.com/wiki/gengar" + }, + { + "number": 95, + "name": "onix", + "height": 88, + "weight": 2100, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/95.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/95.png", + "types": [ + "ground", + "rock" + ], + "url": "https://pokemon.fandom.com/wiki/onix" + }, + { + "number": 96, + "name": "drowzee", + "height": 10, + "weight": 324, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/96.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/96.png", + "types": [ + "psychic" + ], + "url": "https://pokemon.fandom.com/wiki/drowzee" + }, + { + "number": 97, + "name": "hypno", + "height": 16, + "weight": 756, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/97.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/97.png", + "types": [ + "psychic" + ], + "url": "https://pokemon.fandom.com/wiki/hypno" + }, + { + "number": 98, + "name": "krabby", + "height": 4, + "weight": 65, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/98.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/98.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/krabby" + }, + { + "number": 99, + "name": "kingler", + "height": 13, + "weight": 600, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/99.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/99.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/kingler" + }, + { + "number": 100, + "name": "voltorb", + "height": 5, + "weight": 104, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/100.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/100.png", + "types": [ + "electric" + ], + "url": "https://pokemon.fandom.com/wiki/voltorb" + }, + { + "number": 101, + "name": "electrode", + "height": 12, + "weight": 666, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/101.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/101.png", + "types": [ + "electric" + ], + "url": "https://pokemon.fandom.com/wiki/electrode" + }, + { + "number": 102, + "name": "exeggcute", + "height": 4, + "weight": 25, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/102.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/102.png", + "types": [ + "psychic", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/exeggcute" + }, + { + "number": 103, + "name": "exeggutor", + "height": 20, + "weight": 1200, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/103.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/103.png", + "types": [ + "psychic", + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/exeggutor" + }, + { + "number": 104, + "name": "cubone", + "height": 4, + "weight": 65, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/104.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/104.png", + "types": [ + "ground" + ], + "url": "https://pokemon.fandom.com/wiki/cubone" + }, + { + "number": 105, + "name": "marowak", + "height": 10, + "weight": 450, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/105.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/105.png", + "types": [ + "ground" + ], + "url": "https://pokemon.fandom.com/wiki/marowak" + }, + { + "number": 106, + "name": "hitmonlee", + "height": 15, + "weight": 498, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/106.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/106.png", + "types": [ + "fighting" + ], + "url": "https://pokemon.fandom.com/wiki/hitmonlee" + }, + { + "number": 107, + "name": "hitmonchan", + "height": 14, + "weight": 502, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/107.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/107.png", + "types": [ + "fighting" + ], + "url": "https://pokemon.fandom.com/wiki/hitmonchan" + }, + { + "number": 108, + "name": "lickitung", + "height": 12, + "weight": 655, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/108.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/108.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/lickitung" + }, + { + "number": 109, + "name": "koffing", + "height": 6, + "weight": 10, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/109.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/109.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/koffing" + }, + { + "number": 110, + "name": "weezing", + "height": 12, + "weight": 95, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/110.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/110.png", + "types": [ + "poison" + ], + "url": "https://pokemon.fandom.com/wiki/weezing" + }, + { + "number": 111, + "name": "rhyhorn", + "height": 10, + "weight": 1150, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/111.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/111.png", + "types": [ + "rock", + "ground" + ], + "url": "https://pokemon.fandom.com/wiki/rhyhorn" + }, + { + "number": 112, + "name": "rhydon", + "height": 19, + "weight": 1200, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/112.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/112.png", + "types": [ + "rock", + "ground" + ], + "url": "https://pokemon.fandom.com/wiki/rhydon" + }, + { + "number": 113, + "name": "chansey", + "height": 11, + "weight": 346, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/113.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/113.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/chansey" + }, + { + "number": 114, + "name": "tangela", + "height": 10, + "weight": 350, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/114.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/114.png", + "types": [ + "grass" + ], + "url": "https://pokemon.fandom.com/wiki/tangela" + }, + { + "number": 115, + "name": "kangaskhan", + "height": 22, + "weight": 800, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/115.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/115.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/kangaskhan" + }, + { + "number": 116, + "name": "horsea", + "height": 4, + "weight": 80, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/116.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/116.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/horsea" + }, + { + "number": 117, + "name": "seadra", + "height": 12, + "weight": 250, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/117.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/117.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/seadra" + }, + { + "number": 118, + "name": "goldeen", + "height": 6, + "weight": 150, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/118.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/118.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/goldeen" + }, + { + "number": 119, + "name": "seaking", + "height": 13, + "weight": 390, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/119.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/119.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/seaking" + }, + { + "number": 120, + "name": "staryu", + "height": 8, + "weight": 345, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/120.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/120.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/staryu" + }, + { + "number": 121, + "name": "starmie", + "height": 11, + "weight": 800, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/121.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/121.png", + "types": [ + "psychic", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/starmie" + }, + { + "number": 122, + "name": "mr-mime", + "height": 13, + "weight": 545, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/122.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/122.png", + "types": [ + "fairy", + "psychic" + ], + "url": "https://pokemon.fandom.com/wiki/mr-mime" + }, + { + "number": 123, + "name": "scyther", + "height": 15, + "weight": 560, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/123.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/123.png", + "types": [ + "flying", + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/scyther" + }, + { + "number": 124, + "name": "jynx", + "height": 14, + "weight": 406, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/124.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/124.png", + "types": [ + "psychic", + "ice" + ], + "url": "https://pokemon.fandom.com/wiki/jynx" + }, + { + "number": 125, + "name": "electabuzz", + "height": 11, + "weight": 300, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/125.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/125.png", + "types": [ + "electric" + ], + "url": "https://pokemon.fandom.com/wiki/electabuzz" + }, + { + "number": 126, + "name": "magmar", + "height": 13, + "weight": 445, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/126.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/126.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/magmar" + }, + { + "number": 127, + "name": "pinsir", + "height": 15, + "weight": 550, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/127.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/127.png", + "types": [ + "bug" + ], + "url": "https://pokemon.fandom.com/wiki/pinsir" + }, + { + "number": 128, + "name": "tauros", + "height": 14, + "weight": 884, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/128.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/128.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/tauros" + }, + { + "number": 129, + "name": "magikarp", + "height": 9, + "weight": 100, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/129.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/129.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/magikarp" + }, + { + "number": 130, + "name": "gyarados", + "height": 65, + "weight": 2350, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/130.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/130.png", + "types": [ + "flying", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/gyarados" + }, + { + "number": 131, + "name": "lapras", + "height": 25, + "weight": 2200, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/131.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/131.png", + "types": [ + "ice", + "water" + ], + "url": "https://pokemon.fandom.com/wiki/lapras" + }, + { + "number": 132, + "name": "ditto", + "height": 3, + "weight": 40, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/132.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/132.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/ditto" + }, + { + "number": 133, + "name": "eevee", + "height": 3, + "weight": 65, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/133.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/133.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/eevee" + }, + { + "number": 134, + "name": "vaporeon", + "height": 10, + "weight": 290, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/134.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/134.png", + "types": [ + "water" + ], + "url": "https://pokemon.fandom.com/wiki/vaporeon" + }, + { + "number": 135, + "name": "jolteon", + "height": 8, + "weight": 245, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/135.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/135.png", + "types": [ + "electric" + ], + "url": "https://pokemon.fandom.com/wiki/jolteon" + }, + { + "number": 136, + "name": "flareon", + "height": 9, + "weight": 250, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/136.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/136.png", + "types": [ + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/flareon" + }, + { + "number": 137, + "name": "porygon", + "height": 8, + "weight": 365, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/137.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/137.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/porygon" + }, + { + "number": 138, + "name": "omanyte", + "height": 4, + "weight": 75, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/138.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/138.png", + "types": [ + "water", + "rock" + ], + "url": "https://pokemon.fandom.com/wiki/omanyte" + }, + { + "number": 139, + "name": "omastar", + "height": 10, + "weight": 350, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/139.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/139.png", + "types": [ + "water", + "rock" + ], + "url": "https://pokemon.fandom.com/wiki/omastar" + }, + { + "number": 140, + "name": "kabuto", + "height": 5, + "weight": 115, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/140.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/140.png", + "types": [ + "water", + "rock" + ], + "url": "https://pokemon.fandom.com/wiki/kabuto" + }, + { + "number": 141, + "name": "kabutops", + "height": 13, + "weight": 405, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/141.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/141.png", + "types": [ + "water", + "rock" + ], + "url": "https://pokemon.fandom.com/wiki/kabutops" + }, + { + "number": 142, + "name": "aerodactyl", + "height": 18, + "weight": 590, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/142.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/142.png", + "types": [ + "flying", + "rock" + ], + "url": "https://pokemon.fandom.com/wiki/aerodactyl" + }, + { + "number": 143, + "name": "snorlax", + "height": 21, + "weight": 4600, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/143.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/143.png", + "types": [ + "normal" + ], + "url": "https://pokemon.fandom.com/wiki/snorlax" + }, + { + "number": 144, + "name": "articuno", + "height": 17, + "weight": 554, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/144.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/144.png", + "types": [ + "flying", + "ice" + ], + "url": "https://pokemon.fandom.com/wiki/articuno" + }, + { + "number": 145, + "name": "zapdos", + "height": 16, + "weight": 526, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/145.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/145.png", + "types": [ + "flying", + "electric" + ], + "url": "https://pokemon.fandom.com/wiki/zapdos" + }, + { + "number": 146, + "name": "moltres", + "height": 20, + "weight": 600, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/146.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/146.png", + "types": [ + "flying", + "fire" + ], + "url": "https://pokemon.fandom.com/wiki/moltres" + }, + { + "number": 147, + "name": "dratini", + "height": 18, + "weight": 33, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/147.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/147.png", + "types": [ + "dragon" + ], + "url": "https://pokemon.fandom.com/wiki/dratini" + }, + { + "number": 148, + "name": "dragonair", + "height": 40, + "weight": 165, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/148.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/148.png", + "types": [ + "dragon" + ], + "url": "https://pokemon.fandom.com/wiki/dragonair" + }, + { + "number": 149, + "name": "dragonite", + "height": 22, + "weight": 2100, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/149.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/149.png", + "types": [ + "flying", + "dragon" + ], + "url": "https://pokemon.fandom.com/wiki/dragonite" + }, + { + "number": 150, + "name": "mewtwo", + "height": 20, + "weight": 1220, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/150.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/150.png", + "types": [ + "psychic" + ], + "url": "https://pokemon.fandom.com/wiki/mewtwo" + }, + { + "number": 151, + "name": "mew", + "height": 4, + "weight": 40, + "image_front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/151.png", + "image_back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/151.png", + "types": [ + "psychic" + ], + "url": "https://pokemon.fandom.com/wiki/mew" + } + ] +} \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon/__init__.py b/code/liam/django/pokedex-main/pokedex-main/pokemon/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon/admin.py b/code/liam/django/pokedex-main/pokedex-main/pokemon/admin.py new file mode 100644 index 00000000..cc700d6f --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokemon/admin.py @@ -0,0 +1,6 @@ +from django.contrib import admin + +from .models import Pokemon, Type + +admin.site.register(Pokemon) +admin.site.register(Type) diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon/apps.py b/code/liam/django/pokedex-main/pokedex-main/pokemon/apps.py new file mode 100644 index 00000000..0b4175f1 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokemon/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class PokemonConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'pokemon' diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon/management/commands/load_pokemon.py b/code/liam/django/pokedex-main/pokedex-main/pokemon/management/commands/load_pokemon.py new file mode 100644 index 00000000..0d863c8b --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokemon/management/commands/load_pokemon.py @@ -0,0 +1,40 @@ +import json + +from django.core.management.base import BaseCommand + +from ...models import Pokemon, Type + +class Command(BaseCommand): + + def handle(self, *args, **options): + + # Clear existing Pokemon and Types + Pokemon.objects.all().delete() + Type.objects.all().delete() + + # Open Pokemon JSON and load to list of dictionaries + with open('pokemon.json') as p: + pokemon_list = json.loads(p.read()) + + # Loop through Pokemon to add to DB + for pokemon in pokemon_list['pokemon']: + + # Convert units to m and kg + pokemon['height'] /= 10 + pokemon['weight'] /= 10 + + # Add Pokemon to DB + poke_obj = Pokemon.objects.create( + number=pokemon['number'], + name=pokemon['name'], + height=pokemon['height'], + weight=pokemon['weight'], + image_front=pokemon['image_front'], + image_back=pokemon['image_back'] + ) + + # Loop through types list + # For each type, create type if it doesn't exist yet, than add that type to current Pokemon + for type in pokemon['types']: + type_obj, created = Type.objects.get_or_create(type=type) + type_obj.pokemon.add(poke_obj) diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon/migrations/0001_initial.py b/code/liam/django/pokedex-main/pokedex-main/pokemon/migrations/0001_initial.py new file mode 100644 index 00000000..87cf535c --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokemon/migrations/0001_initial.py @@ -0,0 +1,37 @@ +# Generated by Django 3.2 on 2021-08-03 01:21 + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Pokemon', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('number', models.IntegerField()), + ('name', models.CharField(max_length=200)), + ('height', models.FloatField()), + ('weight', models.FloatField()), + ('image_front', models.URLField()), + ('image_back', models.URLField()), + ('caught_by', models.ManyToManyField(related_name='caught', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Type', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('type', models.CharField(max_length=50)), + ('pokemon', models.ManyToManyField(related_name='types', to='pokemon.Pokemon')), + ], + ), + ] diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon/migrations/__init__.py b/code/liam/django/pokedex-main/pokedex-main/pokemon/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon/models.py b/code/liam/django/pokedex-main/pokedex-main/pokemon/models.py new file mode 100644 index 00000000..92e1d5a4 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokemon/models.py @@ -0,0 +1,23 @@ +from django.db import models +from django.contrib.auth import get_user_model + +class Pokemon(models.Model): + number = models.IntegerField() + name = models.CharField(max_length=200) + height = models.FloatField() + weight = models.FloatField() + image_front = models.URLField() + image_back = models.URLField() + caught_by = models.ManyToManyField(get_user_model(), related_name='caught') + # types = the set of Types associated with that Pokemon + + def __str__(self): + return self.name + +class Type(models.Model): + type = models.CharField(max_length=50) + pokemon = models.ManyToManyField(Pokemon, related_name='types') + + def __str__(self): + return self.type + diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon/tests.py b/code/liam/django/pokedex-main/pokedex-main/pokemon/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokemon/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/code/liam/django/pokedex-main/pokedex-main/pokemon/views.py b/code/liam/django/pokedex-main/pokedex-main/pokemon/views.py new file mode 100644 index 00000000..91ea44a2 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/pokemon/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/code/liam/django/pokedex-main/pokedex-main/static/js/app.js b/code/liam/django/pokedex-main/pokedex-main/static/js/app.js new file mode 100644 index 00000000..bab8b3e6 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/static/js/app.js @@ -0,0 +1,69 @@ + +new Vue({ + el: '#app', + delimiters: ['[[', ']]'], + data: { + pokemon: [], + token: '', + currentUser: {}, + caughtPokemon: [], + type: 'normal', + }, + methods: { + getPokemon() { + axios.get('/api/') + .then(response => { + this.pokemon = response.data + }) + }, + getCurrentUser() { + axios.get('/api/current/') + .then(response => { + this.currentUser = response.data + }) + }, + catchPokemon(poke) { + let match = this.currentUser.caught.includes(poke.id) + if (!match) { + this.caughtPokemon.push(poke.name) + this.currentUser.caught.push(poke.id) + axios.patch(`/api/user/${this.currentUser.id}/`, { + 'caught': this.currentUser.caught + }, { + headers: { 'X-CSRFToken': this.token } + }) + } + }, + releasePokemon(poke) { + // find indexOf and splice out + const match = this.currentUser.caught.find(el => el === poke.id) + const index = this.currentUser.caught.indexOf(match) + if (index !== -1) { + this.currentUser.caught.splice(index, 1) + axios.patch(`/api/user/${this.currentUser.id}/`, { + 'caught': this.currentUser.caught + }, { + headers: { 'X-CSRFToken': this.token } + }).then(() => this.getCurrentUser()) + } + + }, + hasPokemon(poke) { + let match = this.currentUser.caught.includes(poke.id) + return match + } + }, + computed: { + hasCaughtPokemon() { + if (this.currentUser.caught.length > 0) { + return true + } + return false + }, + }, + mounted() { + this.getPokemon() + this.getCurrentUser() + this.token = document.querySelector('input[name=csrfmiddlewaretoken]').value + }, +}) \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/static/main.css b/code/liam/django/pokedex-main/pokedex-main/static/main.css new file mode 100644 index 00000000..2034a471 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/static/main.css @@ -0,0 +1,238 @@ +html { + background-color: #749cd1; + + font-family: sans-serif; + color: #001527; +} + +#app { + background: repeating-linear-gradient( + #14a04f, + #14a04f 5px, + #085528 5px, + #085528 10px); + margin: 1em; + padding: 1em; + border: 1px solid #313131; +} + +h1 { + color: #fff; +} + +#login { + background-color: #102c46; + padding: 1em; +} + +#login>p { + color: #fff; +} + +a { + border-radius: 2px; + background-image: linear-gradient(45deg, #80a3b9, #749cd1); + padding: 0.3em; + text-decoration: none; + font-weight: 500; + color: #102c46; +} + +a:visited { + color: #281a5a; +} + +#dex-entry { + display: flex; + flex-wrap: wrap; +} + +.outer-border { + background-color: #313131; + padding: 0.2em; + border-radius: 3px 3px 30px 3px; + margin: 0.5em; + width: fit-content; +} + +.inner-area { + background-color: #b8b8b8; + border: 3px solid #fff; + border-radius: 4px 4px 30px 4px; + padding: 1em; + width: 300px; + + display: grid; + grid-template-areas: + 'img stat caught' + 'img type type'; +} + +.image { + grid-area: img; +} + +.stats { + grid-area: stat; +} + +.caught { + grid-area: caught; + width: fit-content; + justify-self: end; +} + +.typelist { + grid-area: type; +} + +.catch { + text-align: center; +} + +.pokeball { + width: 0.8em; +} + +.information { + background-color: #fff; + border-left: 3px solid #b63b0e; + border-right: 3px solid #b63b0e; + padding: 1em; +} + +.fire { + color: #fff; + background-color: #d4784d; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.water { + color: #fff; + background-color: #4f73b6; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.grass { + color: #fff; + background-color: #55c464; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.poison { + color: #fff; + background-color: #723162; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.ghost { + color: #fff; + background-color: #503b55; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.flying { + color: #fff; + background-color: #a284ad; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.bug { + color: #fff; + background-color: #8eac5f; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.dragon { + color: #fff; + background-color: #742ab9; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.ground { + color: #fff; + background-color: #e2aa6a; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.rock { + color: #fff; + background-color: #b48734; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.normal { + color: #fff; + background-color: #a19575; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.fairy { + color: #fff; + background-color: #da7191; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.fighting { + color: #fff; + background-color: #a82e19; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.electric { + color: #fff; + background-color: #dbc337; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.psychic { + color: #fff; + background-color: #cf489b; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.steel { + color: #fff; + background-color: #949494; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} + +.ice { + color: #fff; + background-color: #79e9df; + margin: 0.2em; + padding: 0.3em; + border-radius: 2px; +} \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/static/media/caught.png b/code/liam/django/pokedex-main/pokedex-main/static/media/caught.png new file mode 100644 index 00000000..62cf60e3 Binary files /dev/null and b/code/liam/django/pokedex-main/pokedex-main/static/media/caught.png differ diff --git a/code/liam/django/pokedex-main/pokedex-main/templates/home.html b/code/liam/django/pokedex-main/pokedex-main/templates/home.html new file mode 100644 index 00000000..914d539b --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/templates/home.html @@ -0,0 +1,77 @@ +{% load static %} + + + + + + + + + + + + Pokedex + + + {% csrf_token %} +
+
+ {% if user.is_authenticated %} +

Welcome, {{ user.username }}!

+

Logout

+ {% else %} +

Welcome, visitor!

+

You are not logged in. Login Sign Up

+ {% endif %} +
+
+ {% if user.is_authenticated %} +
+
+
+
+ +
+
+ ● + O +
+
+
+ #[[ p.number]]: [[ p.name ]] +
+
+
Height:
+
[[p.height]]m
+
Weight:
+
[[p.weight]]kg
+
+
+
+ [[ t.type ]] +
+
+
+ + +
+
+
+ +
+ Catch some new pokemon! +

Pokemon caught this session:

+
    +
  • [[ p ]]
  • +
+
+ + {% else %} +
+ Log in or Sign Up to see! +
+ {% endif %} +
+
+ + \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/templates/registration/login.html b/code/liam/django/pokedex-main/pokedex-main/templates/registration/login.html new file mode 100644 index 00000000..797d9e4c --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/templates/registration/login.html @@ -0,0 +1,6 @@ +

Login

+
+ {% csrf_token %} + {{ form.as_p }} + +
\ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/templates/registration/signup.html b/code/liam/django/pokedex-main/pokedex-main/templates/registration/signup.html new file mode 100644 index 00000000..7c681dbc --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/templates/registration/signup.html @@ -0,0 +1,6 @@ +

Sign up

+
+ {% csrf_token %} + {{ form.as_p }} + +
\ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/users/__init__.py b/code/liam/django/pokedex-main/pokedex-main/users/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/code/liam/django/pokedex-main/pokedex-main/users/admin.py b/code/liam/django/pokedex-main/pokedex-main/users/admin.py new file mode 100644 index 00000000..60590641 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/users/admin.py @@ -0,0 +1,13 @@ +from django.contrib import admin +from django.contrib.auth.admin import UserAdmin + +from .forms import CustomUserCreationForm, CustomUserChangeForm +from .models import CustomUser + +class CustomUserAdmin(UserAdmin): + add_form = CustomUserCreationForm + form = CustomUserChangeForm + model = CustomUser + list_display = ['email', 'username',] + +admin.site.register(CustomUser, CustomUserAdmin) \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/users/apps.py b/code/liam/django/pokedex-main/pokedex-main/users/apps.py new file mode 100644 index 00000000..72b14010 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/users/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class UsersConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'users' diff --git a/code/liam/django/pokedex-main/pokedex-main/users/forms.py b/code/liam/django/pokedex-main/pokedex-main/users/forms.py new file mode 100644 index 00000000..b0f8bfca --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/users/forms.py @@ -0,0 +1,13 @@ +from django import forms +from django.contrib.auth.forms import UserCreationForm, UserChangeForm +from .models import CustomUser + +class CustomUserCreationForm(UserCreationForm): + class Meta: + model = CustomUser + fields = ('username', 'email') + +class CustomUserChangeForm(UserChangeForm): + class Meta: + model = CustomUser + fields = ('username', 'email') \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/users/migrations/0001_initial.py b/code/liam/django/pokedex-main/pokedex-main/users/migrations/0001_initial.py new file mode 100644 index 00000000..72f498d2 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/users/migrations/0001_initial.py @@ -0,0 +1,44 @@ +# Generated by Django 3.2 on 2021-08-03 01:11 + +import django.contrib.auth.models +import django.contrib.auth.validators +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ] + + operations = [ + migrations.CreateModel( + name='CustomUser', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), + ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), + ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), + ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), + ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), + ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), + ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), + ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), + ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), + ], + options={ + 'verbose_name': 'user', + 'verbose_name_plural': 'users', + 'abstract': False, + }, + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + ] diff --git a/code/liam/django/pokedex-main/pokedex-main/users/migrations/__init__.py b/code/liam/django/pokedex-main/pokedex-main/users/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/code/liam/django/pokedex-main/pokedex-main/users/models.py b/code/liam/django/pokedex-main/pokedex-main/users/models.py new file mode 100644 index 00000000..a598ab63 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/users/models.py @@ -0,0 +1,12 @@ +from django.db import models +from django.contrib.auth.models import AbstractUser + +class CustomUser(AbstractUser): + # caught = the set of Pokemon associated with that user + caught = [] + + # This is where you would add additional fields. + # These will be in the DB alongside username, email, etc + + def __str__(self): + return self.username diff --git a/code/liam/django/pokedex-main/pokedex-main/users/tests.py b/code/liam/django/pokedex-main/pokedex-main/users/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/users/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/code/liam/django/pokedex-main/pokedex-main/users/urls.py b/code/liam/django/pokedex-main/pokedex-main/users/urls.py new file mode 100644 index 00000000..b33a796e --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/users/urls.py @@ -0,0 +1,8 @@ +from django.urls import path +from .views import SignUpView + +app_name = 'users' + +urlpatterns = [ + path('signup/', SignUpView.as_view(), name='signup'), +] \ No newline at end of file diff --git a/code/liam/django/pokedex-main/pokedex-main/users/views.py b/code/liam/django/pokedex-main/pokedex-main/users/views.py new file mode 100644 index 00000000..d0ac3eb9 --- /dev/null +++ b/code/liam/django/pokedex-main/pokedex-main/users/views.py @@ -0,0 +1,9 @@ +from django.urls import reverse_lazy +from django.views.generic.edit import CreateView + +from .forms import CustomUserCreationForm + +class SignUpView(CreateView): + form_class = CustomUserCreationForm + success_url = reverse_lazy('login') + template_name = 'registration/signup.html' \ No newline at end of file diff --git a/code/liam/django/pokedex-main/requirements.txt b/code/liam/django/pokedex-main/requirements.txt new file mode 100644 index 00000000..22e3cd4f --- /dev/null +++ b/code/liam/django/pokedex-main/requirements.txt @@ -0,0 +1,4 @@ +asgiref==3.4.1 +django==3.2 +pytz==2021.1 +sqlparse==0.4.1 \ No newline at end of file