pokeapi/config/urls.py

27 lines
760 B
Python
Raw Normal View History

2014-12-04 11:11:46 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
2015-12-30 13:22:15 +00:00
from django.conf.urls import url, include
2014-12-04 11:11:46 +00:00
from django.conf.urls.static import static
from django.contrib import admin
2015-12-30 13:22:15 +00:00
from pokemon import urls as pokemon_urls
from pokemon_v2 import urls as pokemon_v2_urls
2015-09-06 01:22:06 +00:00
2015-12-30 13:22:15 +00:00
urlpatterns = [
url(r'^', include(pokemon_urls)),
2015-09-06 01:22:06 +00:00
2015-12-30 13:22:15 +00:00
url(r'^', include(pokemon_v2_urls)),
2015-09-06 01:22:06 +00:00
2014-12-04 11:11:46 +00:00
url(r'^admin/', include(admin.site.urls)),
2015-09-06 01:22:06 +00:00
2014-12-04 11:11:46 +00:00
url(r'^media/(?P<path>.*)',
'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
2015-09-06 01:22:06 +00:00
2014-12-04 11:11:46 +00:00
url(r'^static/(?P<path>.*)',
'django.views.static.serve',
{'document_root': settings.STATIC_ROOT}),
2015-12-30 13:22:15 +00:00
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)