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
|
2016-01-06 22:10:05 +00:00
|
|
|
from django.views.generic import TemplateView
|
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
|
|
|
|
2016-01-02 01:05:39 +00:00
|
|
|
# need to make sure v2 urls resolve last so angular routes have control
|
2016-01-06 22:10:05 +00:00
|
|
|
# v2 = [ url(r'^', include(pokemon_v2_urls)) ]
|
2015-09-06 01:22:06 +00:00
|
|
|
|
2016-01-02 01:05:39 +00:00
|
|
|
urlpatterns = [
|
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}),
|
|
|
|
|
2016-01-06 22:10:05 +00:00
|
|
|
url(r'^$', 'config.views.home'),
|
|
|
|
|
|
|
|
url(r'^docs/$',
|
|
|
|
TemplateView.as_view(template_name='docs.html'),
|
|
|
|
name="documentation"
|
|
|
|
),
|
|
|
|
|
|
|
|
url(r'^docs2/$',
|
|
|
|
TemplateView.as_view(template_name='docs2.html'),
|
|
|
|
name="documentation_v2"
|
|
|
|
),
|
|
|
|
|
|
|
|
url(r'^about/$', 'config.views.about'),
|
|
|
|
|
2016-01-02 01:05:39 +00:00
|
|
|
url(r'^', include(pokemon_urls)),
|
2016-01-06 22:10:05 +00:00
|
|
|
|
|
|
|
url(r'^', include(pokemon_v2_urls)),
|
2016-01-02 01:05:39 +00:00
|
|
|
|
2016-01-06 22:10:05 +00:00
|
|
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # + v2
|