Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue_django_test
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周田
vue_django_test
Commits
9e879fb6
Commit
9e879fb6
authored
Aug 16, 2023
by
周田
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:生产环境下的静态文件打包问题
parent
5fa674b1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
__init__.py
vue_django/__init__.py
+4
-0
urls.py
vue_django/urls.py
+8
-2
No files found.
vue_django/__init__.py
View file @
9e879fb6
import
mimetypes
mimetypes
.
add_type
(
"text/css"
,
".css"
,
True
)
mimetypes
.
add_type
(
"text/javascript"
,
".js"
,
True
)
vue_django/urls.py
View file @
9e879fb6
...
...
@@ -17,6 +17,9 @@ from django.contrib import admin
from
django.urls
import
path
,
include
,
re_path
from
.views
import
index
,
test
from
django.conf
import
settings
from
django.views.static
import
serve
from
drf_yasg.views
import
get_schema_view
from
drf_yasg
import
openapi
...
...
@@ -33,9 +36,12 @@ urlpatterns = [
path
(
'admin/'
,
admin
.
site
.
urls
),
path
(
""
,
index
),
# path("test/", test),
#
path("mqtt/", include("mqtt.urls")),
#
path("chat/", include("chat.urls")),
path
(
"mqtt/"
,
include
(
"mqtt.urls"
)),
path
(
"chat/"
,
include
(
"chat.urls"
)),
path
(
"op/"
,
include
(
"device_data_op.urls"
)),
re_path
(
r'^assets/(?P<path>.*)/$'
,
serve
,
{
'document_root'
:
settings
.
STATIC_ROOT
}),
re_path
(
r'^swagger/$'
,
schema_view
.
with_ui
(
'swagger'
,
cache_timeout
=
0
),
name
=
'schema-swagger-ui'
),
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment