2013-11-19 18:32:11 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Copyright (c) 2013 by Pablo Martín <goinnn@gmail.com>
|
|
|
|
#
|
|
|
|
# This software is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This software is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# along with this software. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
try:
|
2016-09-22 17:16:41 +00:00
|
|
|
from django.conf.urls import include, url
|
2018-09-21 09:44:47 +00:00
|
|
|
except ImportError:
|
|
|
|
from django.urls import include, url
|
2013-11-19 18:32:11 +00:00
|
|
|
from django.contrib import admin
|
2016-09-22 17:16:41 +00:00
|
|
|
from django.views.static import serve
|
2013-11-19 18:32:11 +00:00
|
|
|
|
2018-09-21 09:44:47 +00:00
|
|
|
|
2013-11-19 18:32:11 +00:00
|
|
|
admin.autodiscover()
|
|
|
|
|
|
|
|
js_info_dict = {
|
|
|
|
'packages': ('django.conf',),
|
|
|
|
}
|
|
|
|
|
2018-09-21 09:44:47 +00:00
|
|
|
urlpatterns = [
|
2016-09-22 17:16:41 +00:00
|
|
|
url(r'^', include('app.urls')),
|
2018-09-21 09:44:47 +00:00
|
|
|
url(r'^admin/', admin.site.urls),
|
|
|
|
]
|
2013-11-19 18:32:11 +00:00
|
|
|
|
2018-09-21 09:44:47 +00:00
|
|
|
urlpatterns += [
|
|
|
|
url(
|
|
|
|
r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
|
2016-09-22 17:16:41 +00:00
|
|
|
serve,
|
2018-09-21 09:44:47 +00:00
|
|
|
{
|
|
|
|
'document_root': settings.MEDIA_ROOT,
|
|
|
|
'show_indexes': True,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|