Procházet zdrojové kódy

update settings and urls files

sxoinas12 před 2 roky
rodič
revize
8c410f2d73

+ 2 - 1
telecaster/telecaster/settings.py

@@ -37,6 +37,7 @@ INSTALLED_APPS = [
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
+    'telecaster',
 ]
 
 MIDDLEWARE = [
@@ -67,7 +68,7 @@ TEMPLATES = [
     },
 ]
 
-WSGI_APPLICATION = 'telecaster.wsgi.application'
+WSGI_APPLICATION = 'wsgi.application'
 
 
 # Database

+ 7 - 1
telecaster/telecaster/urls.py

@@ -14,8 +14,14 @@ Including another URLconf
     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
 """
 from django.contrib import admin
-from django.urls import path
+from django.urls import path, re_path
+from rest_framework import routers
+from .views import XmlGeneratorView
+
+
+router = routers.SimpleRouter(trailing_slash=False)
 
 urlpatterns = [
+    re_path(r'^generate/xml', view=XmlGeneratorView.as_view()),
     path('admin/', admin.site.urls),
 ]