2015-12-30 13:22:15 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.conf.urls import patterns, include, url
|
|
|
|
from django.views.generic import TemplateView
|
|
|
|
|
|
|
|
#####################################
|
|
|
|
#
|
|
|
|
# V2 API setup using Django Rest
|
|
|
|
#
|
|
|
|
#####################################
|
|
|
|
|
|
|
|
from rest_framework import routers
|
|
|
|
from pokemon_v2.api import *
|
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
|
|
|
|
|
|
|
router.register(r"ability", AbilityResource)
|
|
|
|
router.register(r"berry", BerryResource)
|
|
|
|
router.register(r"berry-firmness", BerryFirmnessResource)
|
|
|
|
router.register(r"berry-flavor", BerryFlavorResource)
|
|
|
|
router.register(r"characteristic", CharacteristicResource)
|
|
|
|
router.register(r"contest-type", ContestTypeResource)
|
|
|
|
router.register(r"contest-effect", ContestEffectResource)
|
|
|
|
router.register(r"egg-group", EggGroupResource)
|
|
|
|
router.register(r"encounter-method", EncounterMethodResource)
|
|
|
|
router.register(r"encounter-condition", EncounterConditionResource)
|
|
|
|
router.register(r"encounter-condition-value", EncounterConditionValueResource)
|
|
|
|
router.register(r"evolution-chain", EvolutionChainResource)
|
|
|
|
router.register(r"evolution-trigger", EvolutionTriggerResource)
|
|
|
|
router.register(r"generation", GenerationResource)
|
|
|
|
router.register(r"gender", GenderResource)
|
|
|
|
router.register(r"growth-rate", GrowthRateResource)
|
|
|
|
router.register(r"item", ItemResource)
|
|
|
|
router.register(r"item-category", ItemCategoryResource)
|
|
|
|
router.register(r"item-attribute", ItemAttributeResource)
|
|
|
|
router.register(r"item-fling-effect", ItemFlingEffectResource)
|
|
|
|
router.register(r"item-pocket", ItemPocketResource)
|
|
|
|
router.register(r"language", LanguageResource)
|
|
|
|
router.register(r"location", LocationResource)
|
|
|
|
router.register(r"location-area", LocationAreaResource)
|
|
|
|
router.register(r"move", MoveResource)
|
|
|
|
router.register(r"move-ailment", MoveMetaAilmentResource)
|
|
|
|
router.register(r"move-battle-style", MoveBattleStyleResource)
|
|
|
|
router.register(r"move-category", MoveMetaCategoryResource)
|
|
|
|
router.register(r"move-damage-class", MoveDamageClassResource)
|
|
|
|
router.register(r"move-learn-method", MoveLearnMethodResource)
|
|
|
|
router.register(r"move-target", MoveTargetResource)
|
|
|
|
router.register(r"nature", NatureResource)
|
|
|
|
router.register(r"pal-park-area", PalParkAreaResource)
|
|
|
|
router.register(r"pokedex", PokedexResource)
|
|
|
|
router.register(r"pokemon", PokemonResource)
|
|
|
|
router.register(r"pokemon-color", PokemonColorResource)
|
|
|
|
router.register(r"pokemon-form", PokemonFormResource)
|
|
|
|
router.register(r"pokemon-habitat", PokemonHabitatResource)
|
|
|
|
router.register(r"pokemon-shape", PokemonShapeResource)
|
|
|
|
router.register(r"pokemon-species", PokemonSpeciesResource)
|
|
|
|
router.register(r"pokeathlon-stat", PokeathlonStatResource)
|
|
|
|
router.register(r"region", RegionResource)
|
|
|
|
router.register(r"stat", StatResource)
|
|
|
|
router.register(r"super-contest-effect", SuperContestEffectResource)
|
|
|
|
router.register(r"type", TypeResource)
|
|
|
|
router.register(r"version", VersionResource)
|
|
|
|
router.register(r"version-group", VersionGroupResource)
|
|
|
|
|
|
|
|
|
|
|
|
###########################
|
|
|
|
#
|
|
|
|
# Gotta Get Em' All
|
|
|
|
#
|
|
|
|
###########################
|
|
|
|
|
|
|
|
urlpatterns = [
|
2016-01-02 01:05:39 +00:00
|
|
|
|
|
|
|
url(r'^api/v2/', include(router.urls)),
|
2015-12-30 13:22:15 +00:00
|
|
|
|
2016-01-02 01:05:39 +00:00
|
|
|
url(r'^.*$',
|
2015-12-30 13:22:15 +00:00
|
|
|
TemplateView.as_view(template_name='home.html'),
|
|
|
|
name="home"
|
2016-01-02 01:05:39 +00:00
|
|
|
)
|
2015-12-30 13:22:15 +00:00
|
|
|
]
|